forked from stm32duino/Arduino_Core_STM32
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
Description
This line:
| SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ |
incorrectly assumes that the flash vectors are at location zero. This is not true if a stage two bootloader is used. The actual address of the vector table can be easily found and should be used instead of a macro.
FLASH_BASE cannot be changed as it's used all over the BSP. The error is not that FLASH_BASE is wrong, but rather that it's being used here.
Same mistake also appears in the templates; but these are not being used (and the source templates could be removed to avoid confusion):
Arduino_Core_STM32/system/Drivers/CMSIS/Device/ST/STM32L0xx/Source/Templates/system_stm32l0xx.c
Line 178 in f8c1f7d
| SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ |