lpcware

Variables or data declared and allocated in external SDRAM

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by marcolando on Wed Jan 27 04:16:30 MST 2016
Hello everybody,
I'm working with an LPC1788 with external SDRAM. The memory is already configured in my code but I'm facing a problem regarding memory access.
Can anyone tell a simple way to declare a variable or a structure (for example a frame buffer for an LCD display...) so that the linker will place them in the external SDRAM?
I tried to specify a new memory region through Project Property -> MCU settings called SDRAM starting at address 0xA0000000 as mapped in the EMC interface but a simple variable declaration of the form
__attribute__((section("SDRAM"))) long my_variable;

doesn't work: my_variable is anyway allocated in internal RAM.

Any comment will be appreciated,
Regards.

Outcomes