2020-04-17 06:30 AM
I've encountered the problem with not enough space on the internal SRAM many times when I've tried to add more view or container in the TouchGFX application.
Eventually, I've found that high memory usage has occurred from the 'static FrontendHeap' singleton object when I've analyzed the memory map file.
How can I move the 'FrontendHeap' to external memory such as SDRAM?
My hardware board specification:
Please find the pie chart (attachment image) for more detail about memory usages.
Thank you in advance for any answers or any solutions.:smiling_face_with_smiling_eyes:
Solved! Go to Solution.
2020-04-20 02:23 AM
You can define your linker scripts (whatever you're using) to place specific .o files (like FrontEndHeap.o) in specific memory regions.
2020-04-20 02:23 AM
You can define your linker scripts (whatever you're using) to place specific .o files (like FrontEndHeap.o) in specific memory regions.
2022-10-18 03:23 AM
Sorry!
Could you give me more details about this step?
2022-10-19 03:09 AM
Hi,
Are you working with a custom project or from a TouchGFX Board Setup from TouchGFX Designer ? If you are working with pre configured Touchgfx projects you will see that there are linker scripts for the different toolchains/IDEs supported, like for gcc you should see a file called <name of project>_FLASH.ld under the /gcc folder (for IAR something called _flash.icf and for Keil .sct I think).
In this file you will see how and where the different sections are set in the memory, gor example on some of the project we set the images or fonts in external flash and framebuffers in external ram. Now depending on what files you want to have in internal flash you can add this kind of line in a section set in external ram (this is just an example for gcc, I would also look online on better tutorials on how to work with linker scripts):
FrontEndHeapExtRAMSection ():
{
*(FrontEndHeap.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >SDRAM
/Romain
2022-10-19 06:46 AM
Hi Romain.
Thank you for your answer. In my case I have a customized board. I made a project with STM32CUBEide and I made a Graphic interface with TouchGFX designer 4.17. I need to put at least some array of CUSTOM containers that are very large in size into SDRAM segment in order to free some internal uC RAM. My hardware architecture is very similar to STM32F746G_DISCOVERY board (external SDRAM connected to FMC with LCD display connected trough LTDC peripheral)
I have some SDRAM segment dedicated to LCD buffer.
All I want is to find a way to put some graphic element loaded into a ListLayout widget into SDRAM segment and tell to ToucGFX to fetch them from the SDRAM.