I have problem trying to start the application that is loaded with the secondary bootloader at the location 0x8000.
I did a flash memory dump, and the location 0x8000 and further matches the binary file of the application I am loading. So problem is either in the setup of the application project or the bootloader sequence for the program jump.
In the application project settings I have set Flash start as 0x8000 and flash size which corresponds to the mcu size - 32kb.
In the bootloader I run following commands to make the jump:
static void boot_jump (uint32_t address)
{
asm(" LDR SP, [R0]"); //load new stack pointer address
asm(" LDR PC, [R0, #4]");//load new program counter address
}
void bootSystem (void)
{
SCB->VTOR = USER_FLASH_START & 0x1FFFFF80;
boot_jump(USER_FLASH_START);
}All interrupts are disabled before calling bootSystem function.
Debugging the bootloader application I just repeatedly end up in the main function. (0x0000)
Any idea ?