Hey folks, I'm trying to jump from a boot-loader into an application. So far (with the help of folks on here) I've:
- Built two running projects
- Edited the linker file of one to bring in the binary of the other
- Wrote the following function to execute the application (from Jumping from bootloader to user application )
// Manual Entry Point
runProgramAddress = 0x00020000;
runProgram = (void (*) (void))runProgramAddress;
0x20000 is the location of the program that works when flashed independently. I've also tried using the address 0x20410 to go into the .text section, and 0x20454 to go to .text.main section (according to the corresponding .map file)
In all the above cases, the program seems to hang and it gets caught at WDOG_EWM_IRQ_Handler() at 0x450. Is there anything I need to do prior to making the jump, or any special assembly commands I should be using?
I've also tried re-writing the jump function as the following:
FuncPtr Fseg_Main = (FuncPtr) BOOTLOADER_ADDRESS;
and dabbled with some _asm commands to manually set the SP to the new address and the PC to the address incremented by 4, but still no luck. In another ARM example, the SCB Vector Table Offset Register had to be modified before the jump - going to look into modifying it.