cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SDRAM instead of internal RAM

Dinh Duong
Associate II

Hi, I'm using touchgfx on STM3F746-Disco kit, and I'm having some trouble with internal RAM, it's too small for my application. So I'm trying to configure my project to use SDRAM instead of internal RAM. And I mean my variables get auto allocated on SDRAM, not by using a function to put it on SDRAM. I've found some post about changing the linker file (.ld). But I just can make it work. Can someone help me with a detail linker script file for SDRAM.

4 REPLIES 4
Alexandre RENOUX
Principal

Hello,

The linker file being dependent on the IDE you are using, what is your IDE ?

You can look at the H750-DK Application Template available in TouchGFX Designer for reference.

Also, when you write a post related to TouchGFX, please add TouchGFX as the Topic, otherwise we might not see it.

/Alexandre

I'm using STM32CubeIDE

The F750-DK Application Template uses also external RAM to store the framebuffers. YOu will find the .ld file in STM32CubeIDE/ folder.

Here is one extract :

/* Memories definition */
MEMORY
{
  ITCMRAM      (xrw)    : ORIGIN = 0x00000000,   LENGTH = 16K
  RAM          (xrw)    : ORIGIN = 0x20000000,   LENGTH = 320K
  SDRAM        (xrw)    : ORIGIN = 0xC0000000,   LENGTH = 8M
  FLASH	       (xrw)    : ORIGIN = 0x90000000,   LENGTH = 1M
  ASSETS_FLASH (r)      : ORIGIN = 0x90100000,   LENGTH = 15M
  BOOTLOADER   (xrw)    : ORIGIN = 0x08000000,   LENGTH = 64k
}
 
/* ... */
 
BmpCacheSection (NOLOAD) : { *(BmpCacheSection) } >SDRAM
TouchGFX_Framebuffer (NOLOAD) : { *(TouchGFX_Framebuffer) } >SDRAM
TouchGFX_Framebuffer1 (NOLOAD) : { *(TouchGFX_Framebuffer1) } >SDRAM
TouchGFX_Framebuffer2 (NOLOAD) : { *(TouchGFX_Framebuffer2) } >SDRAM

/Alexandre

Thanks to you, I've found that file, I'll follow that file