2019-05-03 12:09 AM
Hello,
I followed this guide (https://touchgfx.zendesk.com/hc/en-us/articles/115002741432-Create-custom-Application-Template) to adding TouchGFX to my existing project.
I'm working with IAR 8.30.1 and tgfx 4.10.0 and STM32F429ZG and FreeRTOS V9.0.0 ( with `heap_4.c` as memory manager ).
Everything works well now, except texts. Every time I added components that contain text, Hard Fault occurs during redraw (*.invalidate()) it.
I added
virtual void handleTickEvent() { container.invalidate(); }
to my ScreenView class to verifying DMA2D and LTDC configurations. All components work well. But existing just a text component causes HardFault.
By tracking `LR` and `PC`, I find out that HardFault occures in `TextProvider` class.
I think stack corrupted. Due to often times, `PC` is in the `DataSection`.
I increased the stack size of my GUI task and `configTOTAL_HEAP_SIZE` of FreeRTOS configuration, But results not changed. Is there any other stack size ( or heap size ) limitation?
Or, May I has been configured `BoardConfiguration.cpp`, `STM32F4DMA.cpp` or `STM32F4HAL.cpp` in a wrong way ?
For more details :
Please share your suggestions about my problem with me.
Thanks in advance.
Solved! Go to Solution.
2020-10-18 06:07 AM
Hi, I have a similar problem. Any text added to TouchGFX designer causes the application to HardFault. Setting the Wildcard characters doesn't fix the issue.
This has not been a problem before, but after messing with wildcard fonts in designer I cannot revert to the before state. Even reverting the .touchgfx file to the state when it was working does not fix the issue.
If I remove text from Designer everything works. Is this a bug known by ST? Is there a fix ?
Thanks,
Tytus
edit: same thing after upgrading to touchgfx designer 4.15 (in cubemx too).
2020-10-29 12:32 AM
I am having the same issue too. Generated project with TouchGFX 4.14. editing with CubeIDE.
It looks like the SingleUseId keeps incrementing even if I remove a text and add a new.
2020-10-29 03:23 PM
I'm also having this same issue. I've tried putting the wildcard characters and character range with no luck. I even completely started my project over and ended up getting the same issue once I've added a bunch of the text back. I upgrading to V4.15 and it didn't get fixed.
2020-10-30 09:47 AM
Yes, Same here... once there is a bunch of the text there I get the issue. But even if I remove one it does not solve the issue once its happened.
2020-10-30 09:55 AM
Compiling the code through the TouchGFX Designer instead of cubeIDE fixed the issue for me.
There seems to be a problem with text and bitmaps when put to external flash if generated with cubeIDE - fonts give HardFault and bitmaps are not displayed correctly. This is not a case when only internal flash is used.
Hope this bug will be fixed.
2020-10-30 10:23 AM
It seems for me that the hard fault occurs in MVPApplication.hpp line 174.
Instruction: ScreenType* newScreen = new (&heap.screenStorage.at<ScreenType>(0)) ScreenType;
2020-11-02 05:54 AM
TouchGFXX will placement new when a new screen becomes active. is new implemented for you? What kind of memory strategy are you using with your OS?
/Martin
2020-11-02 07:30 AM
It is happening on start up on that line, the hard fault.
My project is built on touchgfx 4.13 or 4.14 project with the template for STM32F746G DISCO.
2020-11-05 10:02 PM
I am using the STM32F746G-DISCO example from touchgfx.
/Robin
2020-11-06 04:27 AM
Peculiar - it's working on my desk here. Which version of the Application template are you using? Which compiler?