void JumpToUserApplication(LWord userSP, LWord userStartup) {
volatile LWord avoid_optimization; avoid_optimization = userSP; //In order to avoid optimization issue when -Os avoid_optimization = userStartup; //In order to avoid optimization issue when -Os
// set up stack pointer __asm("msr msp,r0"); __asm("msr psp,r0");
// Jump to PC (r1) __asm("mov pc,r1");
}
Build target 'KL26bootloader' compiling bootloader.c... ..\Sources\bootloader.c(110): warning: #1267-D: Implicit physical register R0 should be defined as a variable __asm("msr msp,r0"); ..\Sources\bootloader.c(110): error: #549: variable "R0" is used before its value is set __asm("msr msp,r0"); ..\Sources\bootloader.c(114): error: #20: identifier "pc" is undefined __asm("mov pc,r1"); ..\Sources\bootloader.c: 1 warning, 2 errors ".\Objects\KL26bootloader.axf" - 2 Error(s), 1 Warning(s). Target not created.