custom bootloader - jump to specific address
Hello guys,
I am trying to implement a custom bootloader based on stm32f103rb.
I would like to jump in a flash address page e.g 0x8004000
When i am calling the app_reset_handler(), debugger break at address 0xfffffffe with no debug information.
I appreciate if someone could guide me to resolve this issue.
Let me attach the code:
void jump_application(void)
{
void (*app_reset_handler)(void);
volatile uint32_t addr = 0x8004000;
HAL_RCC_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
SCB->VTOR = (FLASH_BASE | 0x4000);
app_reset_handler = (void*)(*(__IO uint32_t *)(addr + 4));
__set_MSP(*(uint32_t *)addr);
app_reset_handler();
}
