It is possible to set two vector table in same flash
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.
Issue:
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).
My Questions:
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.
