2025-07-08 10:50 PM
1.i flash the app in flash address 0x08010000
2.and flash the bootloader in flash address 0x0800000
3. use bootloader jump 0x08010000, but i can not found the app run(because led cannot Flicker)
please see my project bootloader and app,how i can let it run normal ????
2025-07-09 2:59 AM
2025-07-09 4:08 AM
in SystemInit() function try to assign your application address directly instead of Doing OR operation with Base address and offset. try once doing this.
SCB->VTOR = 0x08010000; //VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
Make sure this address is valid starting address of a perticuler sector. for that you can go through with data sheet or reference manual of your controller.
2025-07-09 6:04 PM
i modify code like this
but the problem still exist!!!! the problem is led on but not flicker, the correct is flick.
do you have stm32f107vc6t board, you can test my project and see the phenomenon.
2025-07-09 9:44 PM
Sorry i cant check you code, I have other works to do.
At your application code ... make that LED pulled down .... if it is getting turned on.... so we could get clearity that bootloader code is able to jump to application code properly .... but application code is getting hanged...
2025-07-09 10:17 PM
i gon through with your Bootloader code..
while (1)
{
extern void start_app(unsigned int vector);
// start_app(0x8010000);
jump_to_app();
}
You're jumping to the application inside a while(1) loop.
The application starts, but once it returns (or crashes), the bootloader jumps again — this creates undefined behavior.
If the application LED turns on during HAL_GPIO_WritePin(...) (and then stalls due to vector table or clock misconfig), it will appear "stuck on" — exactly what you're observing.
Suggested bootloader main():
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
// Check if valid user app exists
if (((*(__IO uint32_t *)APP_FLASH_ADDR) & 0x2FFE0000) == 0x20000000)
{
jump_to_app(); // call once
}
// If app not found, stay in bootloader
while (1)
{
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); // Example: show bootloader alive
HAL_Delay(500);
}
}
2025-07-09 10:35 PM
But in that way, you can write firmware only once. Do you mean that there should be for example some UART routines before which can receive new firmware or some if case, button held down during startup....