Skip to main content
Associate
August 1, 2023
Solved

TouchGFX and Textarea problem

  • August 1, 2023
  • 4 replies
  • 2644 views

Hello

This problem has arised when creating a more complex program and I have narrow it down to a single test.project. I have created the usual project for the STM32F769 Disco using TouchGFX 4.20 Designer . I have set only one single TextArea, configured a wilcard to use the buffer with enough space and initial value of 0. The wildcard range is 0-9

Then, I have exported the source code and I have modified it in STM32CubeIDE 1.10.1 and HAL1.16 to increase a counter in Screen1View::handleTickEvent() with the following code

Unicode::snprintf(textArea1Buffer,TEXTAREA1_SIZE,"%u",ctr++);
textArea1.resizeToCurrentText();
textArea1.invalidate();

ctr is a uint32_t protected member in Scereen1View.hpp

The problem is:

- Executable generated by the simulator runs as expected.

- Elf compiled and flashed by the TouchGFX Designer runs in the target as expected.

- Elf compiled by STM32CubeIDE does not work.It crashes when initializing the TextArea1 in Screen1ViewBase

Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%s", touchgfx::TypedText(T___SINGLEUSE_YO0H).getText());

either by not passing an assertion in touchgfx::TypedText::getText() (assert(IsValidID...) or some other times (I cannot say when) by triggering the MemManage_Handler.

I have used TextAreas in a previous project with the same toolchain and I had never an issue.

Any hint on what I am doing wrong is greatily appreciated.

Best regards

 

 

This topic has been closed for replies.
Best answer by JTP1

Hello

Have you remember to update also external flash after CubeIDE build ? For some reason, external flash content is bit different compared the TGFX designer Target build and CudeIDE build. Empty or TGFX target build content on the external flash causes the assertion failure when running cudeIDE internal flash.

Br J.T

 

 

 

4 replies

Graduate II
August 3, 2023

Hello

Maybe you could share your simple test project ?

Br J.T

jtpgilejAuthor
Associate
August 3, 2023

Please, follow the link to get the zipped project.

I also enclose a capture of the stack when running the compiled version from STM32CubeIDE.

Captura.PNG

Thank you in advance.

 

JTP1Best answer
Graduate II
August 3, 2023

Hello

Have you remember to update also external flash after CubeIDE build ? For some reason, external flash content is bit different compared the TGFX designer Target build and CudeIDE build. Empty or TGFX target build content on the external flash causes the assertion failure when running cudeIDE internal flash.

Br J.T

 

 

 

jtpgilejAuthor
Associate
August 4, 2023

You are right!

I have that in mind when I use the CubePrgrammer to restore the boards to their default demo, but I overlooked it in CubeIDE. Thank you for your help.

Best regards.