How To Jump To Application Program
Jump to navigation
Jump to search
When we don't want to updata application program,
the bootloader program should run to application program.
In order to achieve this goal, we can add under code in your bootloader program.
asm volatile("ldr r0, =0x4000"); //"the 0x4000 is my application program's MSP point, you must change it adapt to your"
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");
asm volatile("ldr r0, =0x4004"); //"the 0x4004 is my application program reset-function entry address, you must change it adapt to your"
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");