summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-28 13:21:38 +0700
committerhathach <[email protected]>2025-10-28 14:14:01 +0700
commitd92b810df7670aae0e195fd02abef5014470c2f7 (patch)
tree483d0928f9c1f5bd75770b23d9309dcb5113312c /hw
parent417f44acab92c42338b584bd0511e51781ff2821 (diff)
fix Identifiers that start with '__' or '_[A-Z]' are reserved.
fix compiling with nuc family
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/ansi_escape.h6
-rw-r--r--hw/bsp/nuc100_120/family.cmake12
-rw-r--r--hw/bsp/nuc121_125/family.cmake12
-rw-r--r--hw/bsp/nuc126/family.cmake12
-rw-r--r--hw/bsp/nuc505/family.cmake12
5 files changed, 26 insertions, 28 deletions
diff --git a/hw/bsp/ansi_escape.h b/hw/bsp/ansi_escape.h
index 15af2f3ab..0b72bea17 100644
--- a/hw/bsp/ansi_escape.h
+++ b/hw/bsp/ansi_escape.h
@@ -28,8 +28,8 @@
* \defgroup group_ansi_esc ANSI Escape Code
* @{ */
-#ifndef _TUSB_ANSI_ESC_CODE_H_
-#define _TUSB_ANSI_ESC_CODE_H_
+#ifndef TUSB_ANSI_ESC_CODE_H_
+#define TUSB_ANSI_ESC_CODE_H_
#ifdef __cplusplus
@@ -92,6 +92,6 @@
}
#endif
-#endif /* _TUSB_ANSI_ESC_CODE_H_ */
+#endif /* TUSB_ANSI_ESC_CODE_H_ */
/** @} */
diff --git a/hw/bsp/nuc100_120/family.cmake b/hw/bsp/nuc100_120/family.cmake
index f81447596..b8f36bb9b 100644
--- a/hw/bsp/nuc100_120/family.cmake
+++ b/hw/bsp/nuc100_120/family.cmake
@@ -69,19 +69,17 @@ function(family_configure_example TARGET RTOS)
"LINKER:--script=${LD_FILE_GNU}"
--specs=nosys.specs --specs=nano.specs
)
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--script=${LD_FILE_Clang}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--script=${LD_FILE_Clang}")
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--config=${LD_FILE_IAR}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--config=${LD_FILE_IAR}")
endif ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set_source_files_properties(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c PROPERTIES
- COMPILE_FLAGS "-Wno-missing-prototypes -Wno-redundant-decls")
+ COMPILE_FLAGS "-Wno-missing-prototypes")
endif ()
set_source_files_properties(${STARTUP_FILE_${CMAKE_C_COMPILER_ID}} PROPERTIES
SKIP_LINTING ON
diff --git a/hw/bsp/nuc121_125/family.cmake b/hw/bsp/nuc121_125/family.cmake
index 718f8db9a..ee52e9ce4 100644
--- a/hw/bsp/nuc121_125/family.cmake
+++ b/hw/bsp/nuc121_125/family.cmake
@@ -72,14 +72,14 @@ function(family_configure_example TARGET RTOS)
"LINKER:--script=${LD_FILE_GNU}"
--specs=nosys.specs --specs=nano.specs
)
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--script=${LD_FILE_Clang}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--script=${LD_FILE_Clang}")
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--config=${LD_FILE_IAR}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--config=${LD_FILE_IAR}")
endif ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
diff --git a/hw/bsp/nuc126/family.cmake b/hw/bsp/nuc126/family.cmake
index 3fc670cf0..d0f99ba1a 100644
--- a/hw/bsp/nuc126/family.cmake
+++ b/hw/bsp/nuc126/family.cmake
@@ -75,14 +75,14 @@ function(family_configure_example TARGET RTOS)
"LINKER:--script=${LD_FILE_GNU}"
--specs=nosys.specs --specs=nano.specs
)
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--script=${LD_FILE_Clang}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--script=${LD_FILE_Clang}")
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--config=${LD_FILE_IAR}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--config=${LD_FILE_IAR}")
endif ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
diff --git a/hw/bsp/nuc505/family.cmake b/hw/bsp/nuc505/family.cmake
index a31f5ff73..581cad4d0 100644
--- a/hw/bsp/nuc505/family.cmake
+++ b/hw/bsp/nuc505/family.cmake
@@ -71,14 +71,14 @@ function(family_configure_example TARGET RTOS)
"LINKER:--script=${LD_FILE_GNU}"
--specs=nosys.specs --specs=nano.specs
)
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--script=${LD_FILE_Clang}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--script=${LD_FILE_Clang}")
+ target_compile_options(${TARGET} PRIVATE -Wno-redundant-decls)
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
- target_link_options(${TARGET} PUBLIC
- "LINKER:--config=${LD_FILE_IAR}"
- )
+ target_link_options(${TARGET} PUBLIC "LINKER:--config=${LD_FILE_IAR}")
endif ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")