cancel
Showing results for 
Search instead for 
Did you mean: 

How the move the FrontendHeap of the TouchGFX application to the external RAM (SDRAM)?

Soda
Associate II

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:

  • STM32F429BI (192KB Internal SRAM, 64KB CCM SRAM )
  • External SDRAM (8MB)

Please find the pie chart (attachment image) for more detail about memory usages.

0693W000000W148QAC.png

Thank you in advance for any answers or any solutions.😊

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

You can define your linker scripts (whatever you're using) to place specific .o files (like FrontEndHeap.o) in specific memory regions.

View solution in original post

4 REPLIES 4
Martin KJELDSEN
Chief III

You can define your linker scripts (whatever you're using) to place specific .o files (like FrontEndHeap.o) in specific memory regions.

Sorry!

Could you give me more details about this step?

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

CiuppaPT
Associate III

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.