cancel
Showing results for 
Search instead for 
Did you mean: 

Literal Strings over 16 chars blowing up FreeRTOS with TouchGFX on STM32F469DISCO

CLord.1
Associate

I have an issue, apparently with the version of FreeRTOS that is included with TouchGFX 4.16 and dynamic memory allocation in C++. I have an extensive code block that assigns std::string variables to various literal strings as the user switches from page to page in the application. I then convert these in the calls from the model to presenter to screens as *char (then converting to unicode) without a hitch. The problem is that a string of more than 16 characters (including \0) blows up the program when C++ asks for the dynamic memory allocation for any string greater than the standard length (in this case 16) (see snapshot from STM32CubeIDE). The system calls new() and it blows up. The code works great in the simulator and works on the STM32 *IF* I keep the strings <16 chars.

Certainly I'm not the one with this issue! Is there a wrapper for FreeRTOS new() or better workaround - other than rewriting 3000 lines of code to assign the vars as char arrays?

Note that the issue is NOT with the TouchGFX code itself, which once I learned is doing well for me...0693W000007ZAFYQA4.png

1 REPLY 1

Hello @CLord.1​ ,

Try to increase the heap size. This may solve your problem.

BeST Regards,

Walid