From eb8ab48324e8654ee2930e3483d7784ed95e43e9 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 10 Jul 2023 09:44:06 +0200 Subject: [PATCH 1/2] system(H7): allow VECT_TAB_BASE_ADDRESS redefinition Fixes #2054 Signed-off-by: Frederic Pillon --- system/STM32H7xx/system_stm32h7xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/STM32H7xx/system_stm32h7xx.c b/system/STM32H7xx/system_stm32h7xx.c index f64f68d894..d0a10b5e97 100644 --- a/system/STM32H7xx/system_stm32h7xx.c +++ b/system/STM32H7xx/system_stm32h7xx.c @@ -81,6 +81,7 @@ This value must be a multiple of 0x300. */ #endif +#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. @@ -99,7 +100,7 @@ This value must be a multiple of 0x300. */ #endif /* VECT_TAB_SRAM */ #endif /* DUAL_CORE && CORE_CM4 */ - +#endif /* !VECT_TAB_BASE_ADDRESS */ /******************************************************************************/ From 3b1bd3b0f2ef305d586849c27980dfea29f79442 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Mon, 10 Jul 2023 09:51:50 +0200 Subject: [PATCH 2/2] system(WL): allow VECT_TAB_BASE_ADDRESS redefinition Signed-off-by: Frederic Pillon --- system/STM32WLxx/system_stm32wlxx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/STM32WLxx/system_stm32wlxx.c b/system/STM32WLxx/system_stm32wlxx.c index e88b556831..ca733511a3 100644 --- a/system/STM32WLxx/system_stm32wlxx.c +++ b/system/STM32WLxx/system_stm32wlxx.c @@ -117,6 +117,7 @@ #define VECT_TAB_OFFSET 0x00008000U /*!< Vector Table base offset field. This value must be a multiple of 0x100. */ #endif +#ifndef VECT_TAB_BASE_ADDRESS #if defined(VECT_TAB_SRAM) #define VECT_TAB_BASE_ADDRESS SRAM2_BASE /*!< Vector Table base address field. This value must be a multiple of 0x100. */ @@ -124,12 +125,13 @@ #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. This value must be a multiple of 0x100. */ #endif /* VECT_TAB_SRAM */ - +#endif /* !VECT_TAB_BASE_ADDRESS */ #else /* CORE_CM4 */ #ifndef VECT_TAB_OFFSET #define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. This value must be a multiple of 0x100. */ #endif +#ifndef VECT_TAB_BASE_ADDRESS #if defined(VECT_TAB_SRAM) #define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base address field. This value must be a multiple of 0x100. */ @@ -137,6 +139,7 @@ #define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. This value must be a multiple of 0x100. */ #endif /* VECT_TAB_SRAM */ +#endif /* !VECT_TAB_BASE_ADDRESS */ #endif /* CORE_CM0PLUS */ /**