Skip to content

Commit 6397a1d

Browse files
committed
Mbed patch of STM32cube for bootloader: use NVIC_FLASH_VECTOR_ADDRESS
1 parent 02cdac5 commit 6397a1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I/system_stm32h7xx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050

5151
#include "stm32h7xx.h"
5252
#include <math.h>
53+
#include "nvic_addr.h" // MBED PATCH for Bootloader
5354

5455
#if !defined (HSE_VALUE)
5556
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
@@ -223,7 +224,7 @@ void SystemInit (void)
223224
#ifdef VECT_TAB_SRAM
224225
SCB->VTOR = D2_AHBSRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
225226
#else
226-
SCB->VTOR = FLASH_BANK2_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
227+
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */ // MBED PATCH for Bootloader
227228
#endif
228229

229230
#else
@@ -233,7 +234,7 @@ void SystemInit (void)
233234
#ifdef VECT_TAB_SRAM
234235
SCB->VTOR = D1_AXISRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal D1 AXI-RAM */
235236
#else
236-
SCB->VTOR = FLASH_BANK1_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
237+
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */ // MBED PATCH for Bootloader
237238
#endif
238239

239240
#else

0 commit comments

Comments
 (0)