This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reset Handler Relocation Confusion

Hello,

I am locating executable code at 0x8000 in ROM. The code builds and links fine. However, since the Reset Handler is located at 0x8064 (in memory map) the reset address at 0x0000 is not loaded with the address of the Reset_Handler. I have setup options file to load IROM1 at 0x8000

How can I just place the 4 bytes of the Reset_Handler (0x00008064) at offset 0x00000000 so that I can run test this in the debugger? I have muddled with the scatterfile, but it seems that since the Reset_Handler is embedded in the AREA RESET, CODE, READONLY area I cannot just modify the Load/execution regions because the entire startup code is then located there.

Device is LPC21xx ARM7

Thanks

Parents
  • If just debugging, i.e. testing, then you use a debugger script file that sets PC to the correct address and starts from there. This is done by many of the example programs, when specifying the RAM build.

    If creating a "real" application, then you must either write a boot loader that is running at the start of flash, and that jumps to your application. Or you must craete a scatter file that stores all of the application in flash, but scatter-loads the application into RAM before jumping to the code now copied into RAM.

Reply
  • If just debugging, i.e. testing, then you use a debugger script file that sets PC to the correct address and starts from there. This is done by many of the example programs, when specifying the RAM build.

    If creating a "real" application, then you must either write a boot loader that is running at the start of flash, and that jumps to your application. Or you must craete a scatter file that stores all of the application in flash, but scatter-loads the application into RAM before jumping to the code now copied into RAM.

Children