[PATCH] STM32H7 BSP: Commented out legacy define which causes nameclashes
Robin Mueller
robin.mueller.m at gmail.com
Thu Jan 28 12:24:13 UTC 2021
---
I had a warning related to nameclash of defines for the arm/stm32h7 BSP.
More specifically, the define PAGESIZE which is defined in stm32_hal_legacy.h
as well as in limits.h (which is located in arm-rtems6/include)
I solved the problem for now by commenting out the define in stm32_hal_legacy.h
The BSP still built without issues. I searched the stm32h7 BSP folder in the sources
to check whether the legacy define is actually used somewhere and it is not.
bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
index c311c1618e..c4fa5d7151 100644
--- a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
+++ b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
@@ -420,7 +420,9 @@
#define TYPEPROGRAMDATA_FASTBYTE FLASH_TYPEPROGRAMDATA_FASTBYTE
#define TYPEPROGRAMDATA_FASTHALFWORD FLASH_TYPEPROGRAMDATA_FASTHALFWORD
#define TYPEPROGRAMDATA_FASTWORD FLASH_TYPEPROGRAMDATA_FASTWORD
-#define PAGESIZE FLASH_PAGE_SIZE
+/* Commented out for the RTEMS BSP because there can be nameclashes with another
+similar defininition in limits.h */
+//#define PAGESIZE FLASH_PAGE_SIZE
#define TYPEPROGRAM_FASTBYTE FLASH_TYPEPROGRAM_BYTE
#define TYPEPROGRAM_FASTHALFWORD FLASH_TYPEPROGRAM_HALFWORD
#define TYPEPROGRAM_FASTWORD FLASH_TYPEPROGRAM_WORD
--
2.29.2.windows.2
More information about the devel
mailing list