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:
- The target core is released from reset and stopped at the beginning of the boot code.
- The initial stack pointer and reset vector are read from Flash.
- A breakpoint is set on the initial reset vector from Flash.
- The core runs, and the boot is executed.
- 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.
- 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