Description
Please add the option to relocate the vector table from build_opt.h for STM32H7xx
The STM32F7xx has that feature with #ifndef VECT_TAB_BASE_ADDRESS
in /system/STM32F7xx/system_stm32f7xx.c
Please add this to system/STM32H7xx/system_stm32h7xx.c as well per below. The only thing to be added is the #ifndef VECT_TAB_BASE_ADDRESS
around the block of code shown below extracted from system_stm32h7xx.c.
This allows me to specify the vector table address in built_opt.h in the sketch (such as -DVECT_TAB_BASE_ADDRESS=0x90000000
). I have a separate boot loader so that I can boot from QSPI. (For those that what to try this, note that the Arduino IDE can't program the QSPI, at least not without modification of the programming script, so I just use the STM32CubeProgrammer. it is quite handy that once I point it to the sketch bin file, it remembers the location the next time I start the tool).
#ifndef VECT_TAB_BASE_ADDRESS
#if defined(DUAL_CORE) && defined(CORE_CM4)
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS D2_AXISRAM_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x300. */
#else
#define VECT_TAB_BASE_ADDRESS FLASH_BANK2_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x300. */
#endif /* VECT_TAB_SRAM */
#else
#if defined(VECT_TAB_SRAM)
#define VECT_TAB_BASE_ADDRESS D1_AXISRAM_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x300. */
#else
#define VECT_TAB_BASE_ADDRESS FLASH_BANK1_BASE /*!< Vector Table base address field.
This value must be a multiple of 0x300. */
#endif /* VECT_TAB_SRAM */
#endif /* DUAL_CORE && CORE_CM4 */
#endif