Skip to main content
Dinh Duong
Associate
July 25, 2020
Question

How to use SDRAM instead of internal RAM

  • July 25, 2020
  • 4 replies
  • 1430 views

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.

This topic has been closed for replies.

4 replies

Alexandre RENOUX
Visitor II
August 24, 2020

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

Dinh Duong
Associate
August 25, 2020

I'm using STM32CubeIDE

Alexandre RENOUX
Visitor II
August 25, 2020

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