AnsweredAssumed Answered

Vector Table Relocation

Question asked by Odd Gunnar Dahl on Dec 11, 2017
Latest reply on Feb 19, 2018 by Clive One

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":


/* #define VECT_TAB_SRAM */

#if !defined(VECT_TAB_OFFSET)

#define VECT_TAB_OFFSET  0x00 /*!< Vector Table base offset field.

                                   This value must be a multiple of 0x200. */



Memory regions definition in the linker file:







  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?