Content originally posted in LPCWare by Wouter on Mon Feb 09 11:02:00 MST 2015
Instead of:
place at start of SPIFI_region {readonly object MyFile.o};
initialize by copy { section userMyFile };
place in RAM_region {section userMyFile};
Try:
initialize by copy { section userMyFile };
place in SPIFI_region {section userMyFile_init};
place in RAM_region {rw section userMyFile}
Then two more things:
- in your post you mention you want to execute from SDRAM, but your linker script places the code in on-chip SRAM. Note that performance of code execution from SDRAM is expected to be worse compared to execution from SPIFI.
- If you really want to relocate the code to SDRAM, make sure your startup file calls SystemInit() before __main(), and that SystemInit() also initializes the EMC.
If that still does not help, please post the .map file.
Regards,
Wouter