Vector Table Relocation
To make the firmware (flash offset 0x20000) start properly when branched into from my Bootloader (flash offset 0x0), I had to make the following changes to the system_stm32f4xx.c file and define a project symbol 'VECT_TAB_OFFSET=0x20000':
/* &sharpdefine VECT_TAB_SRAM */
&sharpif !defined(VECT_TAB_OFFSET)
&sharpdefine VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
&sharpendif
Memory regions definition in the linker file:
MEMORY
{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 896K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
}
Is there a better way to specify the address of the vector table without having to modify any Cube MX generated files?
#vector-table