Arm Cortex-M NXP LPC: Boot and Memory Remapping

01-Aug-2024

On Cortex-M devices from the LPC family a Boot Rom is present with:

  • Code that is executed on reset
  • A memory mapping register (MEMMAP, SYSMEMREMAP)

After the debug connection is established:

  1. The target core is released from reset and stopped at the beginning of the boot code.
  2. The initial stack pointer and reset vector are read from Flash.
  3. A breakpoint is set on the initial reset vector from Flash.
  4. The core runs, and the boot is executed.
  5. The core is stopped when the code hits the breakpoint. If the Flash does not contain a valid reset vector, the core is stopped with delay.
  6. Flash is then mapped to address 0x00000000 and the initial stack pointer and reset vector are loaded to the R13 and R15 registers. You find the core in this state.


An initialization script can be used if mapping RAM to the beginning of memory space is desired after reset.



More resources in winIDEA Help

Was this answer helpful?