Hello all, I'm attempting to store all of my __irq() functions in the internal RAM. I have created an IRAM2 section (for LPC2129) I have the code mapped to the IRAM2 section. But, I haven't seen a good example of how to get the code into RAM. On previous ARM projects, I would have copied the IRAM2 section into flash in the "Startup.s" code. I don't understand how to get the "IRAM2_START" and "IRAM2_END" addresses for the ROM and RAM. I'm assuming that these are available and could be used in the assembly startup code. Thanks, Al
The scatter loader will copy sections out of flash into the appropriate section of RAM. The sesolution that you have is to load a whole object file into ram, you can not do individual routines (unless you just put 1 per file) You will need to add an entry in the scatter file for the IRAM2 section, and make it the first entry if you want that object file to go there first RW_IRAM2 0x00000000 0x00000200 { nameofobj.o (+RO,+RW,+ZI) ; load nameofobj.o file first * (+RW +ZI) ; loads everything else (save RO, which are not likely to be in ram) } You may also be able to just put it first in the RW_IRAM1 section if that is what is actually mapped to address 0 In the C-Init, before the main is called the scatter file entries will be copied properly to RAM. I will assume that the other issues are taken care of (Flash is origianlly mapped to address zero so you can start the board bring up, you run to main and then you remap RAM to address 0 so that it can then handle interrupts)