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.
Content originally posted in LPCWare by lpcxpresso-support on Wed Jan 27 08:31:58 MST 2016 Simplest way in LPCXpresso IDE is to use the macros described in: