Cortex-M0 Vector table relocation.
To give a context:
I'm working to implement OTA for an existing project which uses stm32f091xx.
And it already contains separate bootloader(0x08000000) and application(0x08001000) with their own vector tables.
Currently, when a reset occurs, the bootloader which is remapped to 0x0 will call the application at 0x08001000.
Question:
Both bootloader and application have their own vector table.
But on the internet, I found that Cortex-M0 doesn't have a vector table offset.
Just to know more about it, I tried to create a hard fault on the application and surprisingly, the hard fault is now in a location which is relative to the application and not the bootloader.
This is map of the bootloader:
HardFault_Handler 0x080000e3 Thumb Code 2 startup_stm32f0xx.o(.text)This is map of the application:
HardFault_Handler 0x08002447 Thumb Code 2 stm32f0xx_startup.o(.text)Why is this working? I mean when I set a hard fault, it should go to 0x080000e3 but why it is going to 0x08002447? Can someone give me any ideas about what is happening?
