I am using LPC1788 and have successfully written EMC code. H57V2562GTR (SDRAM 16Mx16) is interfaced with the controller. Two ICs are used in parallel to write 32Bytes (16MSB in one chip and 16LSB in other). I have tested the code and it works fine (The read and write operations).
I know that by using __attribute__((at(address))) i can define variables at specific memory address.
Will i have to initialize the EMC before defining the variables in the external memory area?
Thanks Westonsupermare Pier for answering. I will investigate and post my results. Not my comment. some one has been using my name.
Add code in your startup.s file to initialize your external memory prior to calling __main, which is Keil's routine to copy/clear the static areas prior to calling your main() function. I was doubtful about the technique. but now that doubt is cleared, will go with it. But do i still have to use __attribute__? if no, then what is the other way around to let the compile know that 0xA0000000-0xAFFFFFFF memory area is available for allocation?