2025-06-19 4:26 AM
I am implementing a dual-firmware architecture on an STM32 microcontroller that does not natively support dual-bank flash. In this setup, I have partitioned the internal flash memory into two separate blocks:
Block 1 (Bootloader + Application) begins at address 0x08000000
Block 2 (Bootloader + Application) begins at address 0x08020000
Each block contains its own independent bootloader and main application code.
When executing firmware from Block 2 and a system reset occurs, the microcontroller restarts execution from Block 1 (i.e., address 0x08000000), instead of continuing from Block 2 (0x08020000).
In this type of dual-block configuration, how should the vector table be set for each block to ensure correct interrupt handling and boot behavior?
What specific modifications are required in the IAR .icf (linker) file for both Block 1 and Block 2 to support this configuration?
How can I ensure that when Block 2 is actively running, a reset will result in restarting Block 2 instead of falling back to Block 1?
Any guidance or best practices for managing vector table relocation and startup logic in this scenario would be greatly appreciated.
Solved! Go to Solution.
2025-06-19 5:19 AM
When the chip resets, it will always start at 0x08000000. You'll have to implement logic in that program to jump to 0x08020000 under certain conditions. Set an address in RAM that doesn't get clobbered on startup and use that to determine whether or not to jump to the other application or stay in the current one.
2025-06-19 5:19 AM
When the chip resets, it will always start at 0x08000000. You'll have to implement logic in that program to jump to 0x08020000 under certain conditions. Set an address in RAM that doesn't get clobbered on startup and use that to determine whether or not to jump to the other application or stay in the current one.