IT lexicon › Programming › Bootloader jump

Bootloader jump

Programming På svenska → Updated: 2026-11-05

The handoff where a bootloader cleans up after itself and gives the CPU to the application as if it had just come out of reset.

On Cortex-M the recipe is nearly identical everywhere. Disable interrupts, stop SysTick and clear pending interrupts in the NVIC. Point VTOR at the application's vector table. Load the stack pointer from the table's first word into MSP. Then read the reset vector from the second word and branch to it — with the Thumb bit set, or you get a HardFault on the first instruction.

What goes wrong is almost always something the bootloader left switched on. A timer still ticking or a DMA channel still writing hits the application before it has installed its own handlers. The safest variant is for the bootloader to request a software reset, leave a flag in RAM, and jump straight after reset, when everything is already clean.

← Back to the lexicon