summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-14 20:51:49 +0700
committerhathach <[email protected]>2025-10-14 23:02:32 +0700
commit367044e4873fc9ca9cdac918cee684e1e08216e0 (patch)
tree4ae740db975c5df02ad488f144026150b889796f
parent4bdd08ed2dacaf22ce2a442f8e13c97b03dfc2cb (diff)
fix lots of warnings for missing-prototypes for irqhandler
-rw-r--r--examples/host/msc_file_explorer/CMakeLists.txt4
-rw-r--r--hw/bsp/at32f402_405/family.c1
-rw-r--r--hw/bsp/at32f423/at32f423_int.h2
-rw-r--r--hw/bsp/broadcom_32bit/family.cmake4
-rw-r--r--hw/bsp/broadcom_64bit/family.cmake4
-rw-r--r--hw/bsp/ch32f20x/ch32f20x_it.h12
-rw-r--r--hw/bsp/ch32f20x/family.c1
-rw-r--r--hw/bsp/ch32v10x/ch32v10x_it.h14
-rw-r--r--hw/bsp/ch32v10x/family.c3
-rw-r--r--hw/bsp/ch32v20x/ch32v20x_it.h17
-rw-r--r--hw/bsp/ch32v20x/family.c3
-rw-r--r--hw/bsp/ch32v30x/ch32v30x_it.h14
-rw-r--r--hw/bsp/ch32v30x/debug_uart.c3
-rw-r--r--hw/bsp/ch32v30x/family.c3
-rw-r--r--hw/bsp/da1469x/family.cmake5
-rw-r--r--hw/bsp/fomu/family.c1
-rw-r--r--hw/bsp/fomu/family.cmake4
-rw-r--r--hw/bsp/gd32vf103/family.cmake12
-rw-r--r--hw/bsp/imxrt/family.cmake5
-rw-r--r--hw/bsp/kinetis_k/family.cmake4
-rw-r--r--hw/bsp/kinetis_k32l2/family.cmake4
-rw-r--r--hw/bsp/kinetis_kl/family.cmake4
-rw-r--r--hw/bsp/lpc13/family.cmake5
-rw-r--r--hw/bsp/lpc15/family.cmake5
-rw-r--r--hw/bsp/lpc17/family.cmake5
-rw-r--r--hw/bsp/lpc40/family.cmake5
-rw-r--r--hw/bsp/lpc51/family.cmake4
-rw-r--r--hw/bsp/lpc54/family.cmake4
-rw-r--r--hw/bsp/lpc55/family.cmake9
-rw-r--r--hw/bsp/maxim/family.c2
-rw-r--r--hw/bsp/maxim/family.cmake4
-rw-r--r--hw/bsp/mcx/family.cmake4
-rw-r--r--hw/bsp/mm32/family.cmake4
-rw-r--r--hw/bsp/msp430/family.c9
-rw-r--r--hw/bsp/msp432e4/family.cmake5
-rw-r--r--hw/bsp/nrf/family.cmake1
-rw-r--r--hw/bsp/ra/family.cmake5
-rw-r--r--hw/bsp/samd11/family.c5
-rw-r--r--hw/bsp/samg/family.c1
-rw-r--r--hw/bsp/saml2x/family.c1
-rw-r--r--hw/bsp/stm32c0/family.cmake5
-rw-r--r--hw/bsp/stm32f0/family.cmake5
-rw-r--r--hw/bsp/stm32f1/family.cmake5
-rw-r--r--hw/bsp/stm32f2/family.cmake5
-rw-r--r--hw/bsp/stm32f3/family.cmake5
-rw-r--r--hw/bsp/stm32f4/family.cmake5
-rw-r--r--hw/bsp/stm32f7/family.cmake5
-rw-r--r--hw/bsp/stm32g0/family.cmake5
-rw-r--r--hw/bsp/stm32g4/family.cmake5
-rw-r--r--hw/bsp/stm32h5/family.cmake5
-rw-r--r--hw/bsp/stm32h7/family.cmake5
-rw-r--r--hw/bsp/stm32h7rs/family.cmake5
-rw-r--r--hw/bsp/stm32l0/family.cmake5
-rw-r--r--hw/bsp/stm32l4/family.cmake5
-rw-r--r--hw/bsp/stm32n6/boards/stm32n6570dk/board.h10
-rw-r--r--hw/bsp/stm32n6/boards/stm32n657nucleo/board.h2
-rw-r--r--hw/bsp/stm32n6/family.cmake8
-rw-r--r--hw/bsp/stm32u0/family.cmake5
-rw-r--r--hw/bsp/stm32u5/family.cmake5
-rw-r--r--hw/bsp/stm32wb/family.cmake5
-rw-r--r--hw/bsp/stm32wba/family.cmake5
-rw-r--r--hw/bsp/tm4c/family.cmake4
-rw-r--r--hw/bsp/xmc4000/family.cmake4
-rw-r--r--src/portable/mentor/musb/musb_max32.h10
-rw-r--r--src/portable/sunxi/dcd_sunxi_musb.c4
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c1
-rw-r--r--src/portable/wch/hcd_ch32_usbfs.c10
-rwxr-xr-xtools/get_deps.py6
68 files changed, 310 insertions, 41 deletions
diff --git a/examples/host/msc_file_explorer/CMakeLists.txt b/examples/host/msc_file_explorer/CMakeLists.txt
index 95d532fc9..e9c15b7c1 100644
--- a/examples/host/msc_file_explorer/CMakeLists.txt
+++ b/examples/host/msc_file_explorer/CMakeLists.txt
@@ -28,9 +28,7 @@ target_sources(${PROJECT} PUBLIC
# Suppress warnings on fatfs
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
- set_source_files_properties(
- ${TOP}/lib/fatfs/source/ff.c
- PROPERTIES
+ set_source_files_properties(${TOP}/lib/fatfs/source/ff.c PROPERTIES
COMPILE_FLAGS "-Wno-conversion -Wno-cast-qual"
)
endif ()
diff --git a/hw/bsp/at32f402_405/family.c b/hw/bsp/at32f402_405/family.c
index 6f3196744..beac1a7f8 100644
--- a/hw/bsp/at32f402_405/family.c
+++ b/hw/bsp/at32f402_405/family.c
@@ -30,7 +30,6 @@
#include "at32f402_405_clock.h"
#include "at32f402_405_int.h"
-#include "at32f403a_407_usb.h"
#include "bsp/board_api.h"
#include "board.h"
diff --git a/hw/bsp/at32f423/at32f423_int.h b/hw/bsp/at32f423/at32f423_int.h
index bf73ae6c0..aa707346d 100644
--- a/hw/bsp/at32f423/at32f423_int.h
+++ b/hw/bsp/at32f423/at32f423_int.h
@@ -39,7 +39,7 @@ extern "C" {
/* exported functions ------------------------------------------------------- */
void NMI_Handler(void);
-//void HardFault_Handler(void);
+void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
diff --git a/hw/bsp/broadcom_32bit/family.cmake b/hw/bsp/broadcom_32bit/family.cmake
index 5e57d8b1e..1ec54b06f 100644
--- a/hw/bsp/broadcom_32bit/family.cmake
+++ b/hw/bsp/broadcom_32bit/family.cmake
@@ -86,6 +86,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/broadcom_64bit/family.cmake b/hw/bsp/broadcom_64bit/family.cmake
index 1a088c2c0..e87aaa3a4 100644
--- a/hw/bsp/broadcom_64bit/family.cmake
+++ b/hw/bsp/broadcom_64bit/family.cmake
@@ -93,6 +93,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/ch32f20x/ch32f20x_it.h b/hw/bsp/ch32f20x/ch32f20x_it.h
index 34f3bbf96..7daf0d76e 100644
--- a/hw/bsp/ch32f20x/ch32f20x_it.h
+++ b/hw/bsp/ch32f20x/ch32f20x_it.h
@@ -1,9 +1,9 @@
/********************************** (C) COPYRIGHT *******************************
-* File Name : ch32f20x_it.h
-* Author : WCH
-* Version : V1.0.0
-* Date : 2021/08/08
-* Description : This file contains the headers of the interrupt handlers.
+ * File Name : ch32f20x_it.h
+ * Author : WCH
+ * Version : V1.0.0
+ * Date : 2021/08/08
+ * Description : This file contains the headers of the interrupt handlers.
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* Attention: This software (modified or not) and binary are used for
@@ -21,5 +21,7 @@ void BusFault_Handler(void);
void UsageFault_Handler(void);
void DebugMon_Handler(void);
+void USBHS_IRQHandler(void);
+void SysTick_Handler(void);
#endif /* __CH32F20xIT_H */
diff --git a/hw/bsp/ch32f20x/family.c b/hw/bsp/ch32f20x/family.c
index 7fef71d47..7eae62fa4 100644
--- a/hw/bsp/ch32f20x/family.c
+++ b/hw/bsp/ch32f20x/family.c
@@ -32,6 +32,7 @@
#include "debug_uart.h"
#include "ch32f20x.h"
+#include "ch32f20x_it.h"
#include "bsp/board_api.h"
#include "board.h"
diff --git a/hw/bsp/ch32v10x/ch32v10x_it.h b/hw/bsp/ch32v10x/ch32v10x_it.h
index 13afc2412..34615bb69 100644
--- a/hw/bsp/ch32v10x/ch32v10x_it.h
+++ b/hw/bsp/ch32v10x/ch32v10x_it.h
@@ -12,4 +12,18 @@
#ifndef __CH32V10x_IT_H
#define __CH32V10x_IT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ch32v10x.h"
+
+void USBHD_IRQHandler(void);
+void USBWakeUp_IRQHandler(void);
+void SysTick_Handler(void);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __CH32V10x_IT_H */
diff --git a/hw/bsp/ch32v10x/family.c b/hw/bsp/ch32v10x/family.c
index f25102494..dfc041462 100644
--- a/hw/bsp/ch32v10x/family.c
+++ b/hw/bsp/ch32v10x/family.c
@@ -12,6 +12,7 @@
#endif
#include "ch32v10x.h"
+#include "ch32v10x_it.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
@@ -44,7 +45,7 @@ void SysTick_Handler(void) {
system_ticks++;
}
-uint32_t SysTick_Config(uint32_t ticks) {
+static uint32_t SysTick_Config(uint32_t ticks) {
NVIC_EnableIRQ(SysTicK_IRQn);
SysTick->CTLR = 0;
SysTick->CNTL0 = SysTick->CNTL1 = SysTick->CNTL2 = SysTick->CNTL3 = 0;
diff --git a/hw/bsp/ch32v20x/ch32v20x_it.h b/hw/bsp/ch32v20x/ch32v20x_it.h
index e49c61ae2..d1e8db255 100644
--- a/hw/bsp/ch32v20x/ch32v20x_it.h
+++ b/hw/bsp/ch32v20x/ch32v20x_it.h
@@ -12,4 +12,21 @@
#ifndef __CH32V20x_IT_H
#define __CH32V20x_IT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ch32v20x.h"
+
+void USB_LP_CAN1_RX0_IRQHandler(void);
+void USB_HP_CAN1_TX_IRQHandler(void);
+void USBWakeUp_IRQHandler(void);
+void USBHD_IRQHandler(void);
+void USBHDWakeUp_IRQHandler(void);
+void SysTick_Handler(void);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __CH32V20x_IT_H */
diff --git a/hw/bsp/ch32v20x/family.c b/hw/bsp/ch32v20x/family.c
index 510f82981..690acee1e 100644
--- a/hw/bsp/ch32v20x/family.c
+++ b/hw/bsp/ch32v20x/family.c
@@ -12,6 +12,7 @@ manufacturer: WCH
#endif
#include "ch32v20x.h"
+#include "ch32v20x_it.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
@@ -74,7 +75,7 @@ __attribute__((interrupt)) void SysTick_Handler(void) {
system_ticks++;
}
-uint32_t SysTick_Config(uint32_t ticks) {
+static uint32_t SysTick_Config(uint32_t ticks) {
NVIC_EnableIRQ(SysTicK_IRQn);
SysTick->CTLR = 0;
SysTick->SR = 0;
diff --git a/hw/bsp/ch32v30x/ch32v30x_it.h b/hw/bsp/ch32v30x/ch32v30x_it.h
index f3977a8be..b9bf0b82e 100644
--- a/hw/bsp/ch32v30x/ch32v30x_it.h
+++ b/hw/bsp/ch32v30x/ch32v30x_it.h
@@ -10,7 +10,19 @@
#ifndef __CH32V30x_IT_H
#define __CH32V30x_IT_H
-// #include "debug.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "ch32v30x.h"
+
+void USBHS_IRQHandler(void);
+void OTG_FS_IRQHandler(void);
+void SysTick_Handler(void);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* __CH32V30x_IT_H */
diff --git a/hw/bsp/ch32v30x/debug_uart.c b/hw/bsp/ch32v30x/debug_uart.c
index 2fd3a9d64..4d2992c58 100644
--- a/hw/bsp/ch32v30x/debug_uart.c
+++ b/hw/bsp/ch32v30x/debug_uart.c
@@ -49,7 +49,8 @@ void USART1_IRQHandler(void) {
__asm volatile ("call USART1_IRQHandler_impl; mret");
}
-__attribute__((used)) void USART1_IRQHandler_impl(void)
+void USART1_IRQHandler_impl(void) __attribute__((used)) ;
+void USART1_IRQHandler_impl(void)
{
if(USART_GetITStatus(USART1, USART_IT_TC) != RESET)
{
diff --git a/hw/bsp/ch32v30x/family.c b/hw/bsp/ch32v30x/family.c
index bd01f4f46..c694f1a08 100644
--- a/hw/bsp/ch32v30x/family.c
+++ b/hw/bsp/ch32v30x/family.c
@@ -40,6 +40,7 @@
#include "debug_uart.h"
#include "ch32v30x.h"
+#include "ch32v30x_it.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
@@ -70,7 +71,7 @@ __attribute__((interrupt)) void OTG_FS_IRQHandler(void) {
// MACRO TYPEDEF CONSTANT ENUM
//--------------------------------------------------------------------+
-uint32_t SysTick_Config(uint32_t ticks) {
+static uint32_t SysTick_Config(uint32_t ticks) {
NVIC_EnableIRQ(SysTicK_IRQn);
SysTick->CTLR = 0;
SysTick->SR = 0;
diff --git a/hw/bsp/da1469x/family.cmake b/hw/bsp/da1469x/family.cmake
index 20d6cbc44..b5bec52c8 100644
--- a/hw/bsp/da1469x/family.cmake
+++ b/hw/bsp/da1469x/family.cmake
@@ -118,6 +118,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/fomu/family.c b/hw/bsp/fomu/family.c
index 61943cb01..9d7977bea 100644
--- a/hw/bsp/fomu/family.c
+++ b/hw/bsp/fomu/family.c
@@ -38,7 +38,6 @@
//--------------------------------------------------------------------+
// Board porting API
//--------------------------------------------------------------------+
-
void fomu_error(uint32_t line)
{
(void)line;
diff --git a/hw/bsp/fomu/family.cmake b/hw/bsp/fomu/family.cmake
index 639373695..0c7eae90e 100644
--- a/hw/bsp/fomu/family.cmake
+++ b/hw/bsp/fomu/family.cmake
@@ -69,6 +69,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/gd32vf103/family.cmake b/hw/bsp/gd32vf103/family.cmake
index a47871b38..4f5a945e8 100644
--- a/hw/bsp/gd32vf103/family.cmake
+++ b/hw/bsp/gd32vf103/family.cmake
@@ -97,6 +97,18 @@ function(family_configure_example TARGET RTOS)
${SOC_DIR}/Common/Source/Stubs/lseek.c
${SOC_DIR}/Common/Source/Stubs/read.c
)
+ 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
+ ${SOC_DIR}/Common/Source/Stubs/sbrk.c
+ ${SOC_DIR}/Common/Source/Stubs/close.c
+ ${SOC_DIR}/Common/Source/Stubs/isatty.c
+ ${SOC_DIR}/Common/Source/Stubs/fstat.c
+ ${SOC_DIR}/Common/Source/Stubs/lseek.c
+ ${SOC_DIR}/Common/Source/Stubs/read.c
+ PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake
index feec4973f..37acab06d 100644
--- a/hw/bsp/imxrt/family.cmake
+++ b/hw/bsp/imxrt/family.cmake
@@ -122,10 +122,13 @@ function(family_configure_example TARGET RTOS)
add_board_target(board_${BOARD})
target_sources(${TARGET} PUBLIC
- # BSP
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/kinetis_k/family.cmake b/hw/bsp/kinetis_k/family.cmake
index ce91777c9..426004b4e 100644
--- a/hw/bsp/kinetis_k/family.cmake
+++ b/hw/bsp/kinetis_k/family.cmake
@@ -89,6 +89,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/kinetis_k32l2/family.cmake b/hw/bsp/kinetis_k32l2/family.cmake
index 946614a03..8e1b25a95 100644
--- a/hw/bsp/kinetis_k32l2/family.cmake
+++ b/hw/bsp/kinetis_k32l2/family.cmake
@@ -84,6 +84,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/kinetis_kl/family.cmake b/hw/bsp/kinetis_kl/family.cmake
index 51a646258..335e67375 100644
--- a/hw/bsp/kinetis_kl/family.cmake
+++ b/hw/bsp/kinetis_kl/family.cmake
@@ -88,6 +88,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc13/family.cmake b/hw/bsp/lpc13/family.cmake
index e3c0b18c7..4ced216cb 100644
--- a/hw/bsp/lpc13/family.cmake
+++ b/hw/bsp/lpc13/family.cmake
@@ -79,6 +79,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc15/family.cmake b/hw/bsp/lpc15/family.cmake
index 761c5a619..f07044c24 100644
--- a/hw/bsp/lpc15/family.cmake
+++ b/hw/bsp/lpc15/family.cmake
@@ -81,6 +81,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc17/family.cmake b/hw/bsp/lpc17/family.cmake
index 771a0f405..2cbb261ca 100644
--- a/hw/bsp/lpc17/family.cmake
+++ b/hw/bsp/lpc17/family.cmake
@@ -78,6 +78,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc40/family.cmake b/hw/bsp/lpc40/family.cmake
index 3a680eae6..21ed18057 100644
--- a/hw/bsp/lpc40/family.cmake
+++ b/hw/bsp/lpc40/family.cmake
@@ -79,6 +79,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc51/family.cmake b/hw/bsp/lpc51/family.cmake
index 09d97d256..615fab6b8 100644
--- a/hw/bsp/lpc51/family.cmake
+++ b/hw/bsp/lpc51/family.cmake
@@ -98,6 +98,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/lpc54/family.cmake b/hw/bsp/lpc54/family.cmake
index 66320870a..3a0de4648 100644
--- a/hw/bsp/lpc54/family.cmake
+++ b/hw/bsp/lpc54/family.cmake
@@ -126,6 +126,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
# https://github.com/gsteiert/sct_neopixel/pull/1
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set_source_files_properties(${TOP}/lib/sct_neopixel/sct_neopixel.c PROPERTIES
diff --git a/hw/bsp/lpc55/family.cmake b/hw/bsp/lpc55/family.cmake
index a89548635..08c186ca1 100644
--- a/hw/bsp/lpc55/family.cmake
+++ b/hw/bsp/lpc55/family.cmake
@@ -126,10 +126,11 @@ function(family_configure_example TARGET RTOS)
${TOP}/lib/sct_neopixel/sct_neopixel.c
)
- # https://github.com/gsteiert/sct_neopixel/pull/1
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- set_source_files_properties(${TOP}/lib/sct_neopixel/sct_neopixel.c PROPERTIES
- COMPILE_FLAGS "-Wno-unused-parameter")
+ 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")
+ set_source_files_properties(${TOP}/lib/sct_neopixel/sct_neopixel.c
+ PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes -Wno-unused-parameter")
endif ()
target_include_directories(${TARGET} PUBLIC
diff --git a/hw/bsp/maxim/family.c b/hw/bsp/maxim/family.c
index 0ef6b8c4d..92b5adb6d 100644
--- a/hw/bsp/maxim/family.c
+++ b/hw/bsp/maxim/family.c
@@ -31,6 +31,7 @@
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes" // _mxc_crit_get_state()
+#pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
#include "gpio.h"
@@ -154,6 +155,7 @@ uint32_t board_button_read(void) {
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
#if defined(MAX32650)
// USN is 13 bytes on this device
+ (void) max_len;
MXC_SYS_GetUSN(id, 13);
return 13;
#else
diff --git a/hw/bsp/maxim/family.cmake b/hw/bsp/maxim/family.cmake
index 75daec753..e4b1b2c46 100644
--- a/hw/bsp/maxim/family.cmake
+++ b/hw/bsp/maxim/family.cmake
@@ -160,6 +160,10 @@ endfunction()
function(family_configure_example TARGET RTOS)
family_configure_common(${TARGET} ${RTOS})
+ 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")
+ endif ()
+
# Board target
add_board_target(board_${BOARD})
diff --git a/hw/bsp/mcx/family.cmake b/hw/bsp/mcx/family.cmake
index f857ed31a..a8f50773d 100644
--- a/hw/bsp/mcx/family.cmake
+++ b/hw/bsp/mcx/family.cmake
@@ -105,6 +105,10 @@ endfunction()
function(family_configure_example TARGET RTOS)
family_configure_common(${TARGET} ${RTOS})
+ 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")
+ endif ()
+
# Board target
add_board_target(board_${BOARD})
diff --git a/hw/bsp/mm32/family.cmake b/hw/bsp/mm32/family.cmake
index 0561a63a0..d5e62a2da 100644
--- a/hw/bsp/mm32/family.cmake
+++ b/hw/bsp/mm32/family.cmake
@@ -79,6 +79,10 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/msp430/family.c b/hw/bsp/msp430/family.c
index a45bd5f93..390a9915e 100644
--- a/hw/bsp/msp430/family.c
+++ b/hw/bsp/msp430/family.c
@@ -35,8 +35,8 @@
//--------------------------------------------------------------------+
// Forward USB interrupt events to TinyUSB IRQ Handler
//--------------------------------------------------------------------+
-void __attribute__ ((interrupt(USB_UBM_VECTOR))) USB_UBM_ISR(void)
-{
+void USB_UBM_ISR(void) __attribute__ ((interrupt(USB_UBM_VECTOR)));
+void USB_UBM_ISR(void) {
tud_int_handler(0);
}
@@ -200,8 +200,9 @@ int board_uart_write(void const * buf, int len)
#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
-void __attribute__ ((interrupt(TIMER0_A0_VECTOR))) TIMER0_A0_ISR (void)
-{
+
+void TIMER0_A0_ISR (void) __attribute__ ((interrupt(TIMER0_A0_VECTOR)));
+void TIMER0_A0_ISR (void) {
system_ticks++;
// TAxCCR0 CCIFG resets itself as soon as interrupt is invoked.
}
diff --git a/hw/bsp/msp432e4/family.cmake b/hw/bsp/msp432e4/family.cmake
index f6939ecfe..62ab83866 100644
--- a/hw/bsp/msp432e4/family.cmake
+++ b/hw/bsp/msp432e4/family.cmake
@@ -77,6 +77,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/nrf/family.cmake b/hw/bsp/nrf/family.cmake
index cc2b7a2e5..3384aeaf3 100644
--- a/hw/bsp/nrf/family.cmake
+++ b/hw/bsp/nrf/family.cmake
@@ -141,7 +141,6 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
-
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")
endif ()
diff --git a/hw/bsp/ra/family.cmake b/hw/bsp/ra/family.cmake
index 42a32631c..bf6bcfb4a 100644
--- a/hw/bsp/ra/family.cmake
+++ b/hw/bsp/ra/family.cmake
@@ -127,6 +127,11 @@ function(family_configure_example TARGET RTOS)
# Explicitly added bsp_rom_registers here, otherwise MCU can be bricked if g_bsp_rom_registers is dropped by linker
${FSP_RA}/src/bsp/mcu/all/bsp_rom_registers.c
)
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ set_source_files_properties(${FSP_RA}/src/bsp/mcu/all/bsp_rom_registers.c PROPERTIES COMPILE_FLAGS "-Wno-undef")
+ set_source_files_properties(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c PROPERTIES COMPILE_FLAGS "-Wno-missing-prototypes")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/samd11/family.c b/hw/bsp/samd11/family.c
index 79ca9de02..62e060c8e 100644
--- a/hw/bsp/samd11/family.c
+++ b/hw/bsp/samd11/family.c
@@ -155,12 +155,11 @@ uint32_t board_millis(void)
return system_ticks;
}
-void _init(void)
-{
+void _init(void);
+void _init(void) {
// This _init() standin makes certain GCC environments happier.
// They expect the main binary to have a constructor called _init; but don't provide a weak default.
// Providing an empty constructor satisfies this odd case, and doesn't harm anything.
}
-
#endif
diff --git a/hw/bsp/samg/family.c b/hw/bsp/samg/family.c
index 8db429e79..234dc0ec0 100644
--- a/hw/bsp/samg/family.c
+++ b/hw/bsp/samg/family.c
@@ -154,6 +154,7 @@ uint32_t board_millis(void) {
// Required by __libc_init_array in startup code if we are compiling using
// -nostdlib/-nostartfiles.
+void _init(void);
void _init(void) {
}
diff --git a/hw/bsp/saml2x/family.c b/hw/bsp/saml2x/family.c
index cdc65baf1..275dbbd2e 100644
--- a/hw/bsp/saml2x/family.c
+++ b/hw/bsp/saml2x/family.c
@@ -167,6 +167,7 @@ uint32_t board_millis(void) {
#endif
+void _init(void);
void _init(void) {
}
diff --git a/hw/bsp/stm32c0/family.cmake b/hw/bsp/stm32c0/family.cmake
index c6a90fff6..85562d474 100644
--- a/hw/bsp/stm32c0/family.cmake
+++ b/hw/bsp/stm32c0/family.cmake
@@ -94,6 +94,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f0/family.cmake b/hw/bsp/stm32f0/family.cmake
index 12c7b592c..8d584a8e1 100644
--- a/hw/bsp/stm32f0/family.cmake
+++ b/hw/bsp/stm32f0/family.cmake
@@ -92,6 +92,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f1/family.cmake b/hw/bsp/stm32f1/family.cmake
index cbb9c3568..72fe17482 100644
--- a/hw/bsp/stm32f1/family.cmake
+++ b/hw/bsp/stm32f1/family.cmake
@@ -91,6 +91,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f2/family.cmake b/hw/bsp/stm32f2/family.cmake
index dc6bc2885..30ee23eb9 100644
--- a/hw/bsp/stm32f2/family.cmake
+++ b/hw/bsp/stm32f2/family.cmake
@@ -91,6 +91,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f3/family.cmake b/hw/bsp/stm32f3/family.cmake
index 0ba2920d5..b708c667f 100644
--- a/hw/bsp/stm32f3/family.cmake
+++ b/hw/bsp/stm32f3/family.cmake
@@ -89,6 +89,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f4/family.cmake b/hw/bsp/stm32f4/family.cmake
index db5736192..18e8676c5 100644
--- a/hw/bsp/stm32f4/family.cmake
+++ b/hw/bsp/stm32f4/family.cmake
@@ -117,6 +117,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32f7/family.cmake b/hw/bsp/stm32f7/family.cmake
index 1a3365332..48c0edae6 100644
--- a/hw/bsp/stm32f7/family.cmake
+++ b/hw/bsp/stm32f7/family.cmake
@@ -119,6 +119,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32g0/family.cmake b/hw/bsp/stm32g0/family.cmake
index 4da26f27e..d489a40b5 100644
--- a/hw/bsp/stm32g0/family.cmake
+++ b/hw/bsp/stm32g0/family.cmake
@@ -93,6 +93,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32g4/family.cmake b/hw/bsp/stm32g4/family.cmake
index 5ec9926fe..3a4c8ae32 100644
--- a/hw/bsp/stm32g4/family.cmake
+++ b/hw/bsp/stm32g4/family.cmake
@@ -89,6 +89,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32h5/family.cmake b/hw/bsp/stm32h5/family.cmake
index 1df6bcb90..1240901e8 100644
--- a/hw/bsp/stm32h5/family.cmake
+++ b/hw/bsp/stm32h5/family.cmake
@@ -93,6 +93,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32h7/family.cmake b/hw/bsp/stm32h7/family.cmake
index b4f0bebbf..a1e49d1fd 100644
--- a/hw/bsp/stm32h7/family.cmake
+++ b/hw/bsp/stm32h7/family.cmake
@@ -124,6 +124,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32h7rs/family.cmake b/hw/bsp/stm32h7rs/family.cmake
index 40230ef12..e67cabd4b 100644
--- a/hw/bsp/stm32h7rs/family.cmake
+++ b/hw/bsp/stm32h7rs/family.cmake
@@ -127,6 +127,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32l0/family.cmake b/hw/bsp/stm32l0/family.cmake
index 954bdb158..3278d2645 100644
--- a/hw/bsp/stm32l0/family.cmake
+++ b/hw/bsp/stm32l0/family.cmake
@@ -93,6 +93,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32l4/family.cmake b/hw/bsp/stm32l4/family.cmake
index eebcff4f3..8d44f2506 100644
--- a/hw/bsp/stm32l4/family.cmake
+++ b/hw/bsp/stm32l4/family.cmake
@@ -93,6 +93,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32n6/boards/stm32n6570dk/board.h b/hw/bsp/stm32n6/boards/stm32n6570dk/board.h
index a3d945f76..bbcad6340 100644
--- a/hw/bsp/stm32n6/boards/stm32n6570dk/board.h
+++ b/hw/bsp/stm32n6/boards/stm32n6570dk/board.h
@@ -97,7 +97,7 @@ static board_pindef_t board_pindef[] = {
//--------------------------------------------------------------------+
// RCC Clock
//--------------------------------------------------------------------+
-void SystemClock_Config(void) {
+static void SystemClock_Config(void) {
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/* Configure the power domain */
@@ -214,7 +214,7 @@ static I2C_HandleTypeDef i2c_handle = {
}};
static TCPP0203_Object_t tcpp0203_obj = {0};
-int32_t board_tcpp0203_init(void) {
+static int32_t board_tcpp0203_init(void) {
board_pindef_t *pindef = &board_pindef[PINID_TCPP0203_EN];
HAL_GPIO_WritePin(pindef->port, pindef->pin_init.Pin, GPIO_PIN_SET);
@@ -231,16 +231,16 @@ int32_t board_tcpp0203_init(void) {
return 0;
}
-int32_t board_tcpp0203_deinit(void) {
+static int32_t board_tcpp0203_deinit(void) {
return 0;
}
-int32_t i2c_readreg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
+static int32_t i2c_readreg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
TU_ASSERT(HAL_OK == HAL_I2C_Mem_Read(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
return 0;
}
-int32_t i2c_writereg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
+static int32_t i2c_writereg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length) {
TU_ASSERT(HAL_OK == HAL_I2C_Mem_Write(&i2c_handle, DevAddr, Reg, I2C_MEMADD_SIZE_8BIT, pData, Length, 10000));
return 0;
}
diff --git a/hw/bsp/stm32n6/boards/stm32n657nucleo/board.h b/hw/bsp/stm32n6/boards/stm32n657nucleo/board.h
index 963ecad61..33c68f7cf 100644
--- a/hw/bsp/stm32n6/boards/stm32n657nucleo/board.h
+++ b/hw/bsp/stm32n6/boards/stm32n657nucleo/board.h
@@ -97,7 +97,7 @@ static board_pindef_t board_pindef[] = {
//--------------------------------------------------------------------+
// RCC Clock
//--------------------------------------------------------------------+
-void SystemClock_Config(void) {
+static void SystemClock_Config(void) {
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/* Configure the power domain */
diff --git a/hw/bsp/stm32n6/family.cmake b/hw/bsp/stm32n6/family.cmake
index 76763937e..e1b8524bf 100644
--- a/hw/bsp/stm32n6/family.cmake
+++ b/hw/bsp/stm32n6/family.cmake
@@ -76,7 +76,7 @@ function(add_board_target BOARD_TARGET)
)
target_include_directories(${BOARD_TARGET} PUBLIC
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
- ${CMSIS_5}/CMSIS/Core/Include
+ ${TOP}/lib/CMSIS_6/CMSIS/Core/Include
${ST_CMSIS}/Include
${ST_HAL_DRIVER}/Inc
)
@@ -125,6 +125,12 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32u0/family.cmake b/hw/bsp/stm32u0/family.cmake
index fefaea9de..535b4716f 100644
--- a/hw/bsp/stm32u0/family.cmake
+++ b/hw/bsp/stm32u0/family.cmake
@@ -94,6 +94,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32u5/family.cmake b/hw/bsp/stm32u5/family.cmake
index 7a5935961..f1f9f6502 100644
--- a/hw/bsp/stm32u5/family.cmake
+++ b/hw/bsp/stm32u5/family.cmake
@@ -93,6 +93,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32wb/family.cmake b/hw/bsp/stm32wb/family.cmake
index 0ea937257..e749e2fcc 100644
--- a/hw/bsp/stm32wb/family.cmake
+++ b/hw/bsp/stm32wb/family.cmake
@@ -96,6 +96,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/stm32wba/family.cmake b/hw/bsp/stm32wba/family.cmake
index 3f42879be..391989a6d 100644
--- a/hw/bsp/stm32wba/family.cmake
+++ b/hw/bsp/stm32wba/family.cmake
@@ -111,6 +111,11 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c
)
+
+ 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")
+ endif ()
+
target_include_directories(${TARGET} PUBLIC
# family, hw, board
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
diff --git a/hw/bsp/tm4c/family.cmake b/hw/bsp/tm4c/family.cmake
index e1cf94e96..7fe256fb6 100644
--- a/hw/bsp/tm4c/family.cmake
+++ b/hw/bsp/tm4c/family.cmake
@@ -61,6 +61,10 @@ endfunction()
function(family_configure_example TARGET RTOS)
family_configure_common(${TARGET} ${RTOS})
+ 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")
+ endif ()
+
# Board target
add_board_target(board_${BOARD})
diff --git a/hw/bsp/xmc4000/family.cmake b/hw/bsp/xmc4000/family.cmake
index 6edd72caf..594bd1116 100644
--- a/hw/bsp/xmc4000/family.cmake
+++ b/hw/bsp/xmc4000/family.cmake
@@ -64,6 +64,10 @@ endfunction()
function(family_configure_example TARGET RTOS)
family_configure_common(${TARGET} ${RTOS})
+ 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")
+ endif ()
+
# Board target
add_board_target(board_${BOARD})
diff --git a/src/portable/mentor/musb/musb_max32.h b/src/portable/mentor/musb/musb_max32.h
index 35849b5f8..599de2ca1 100644
--- a/src/portable/mentor/musb/musb_max32.h
+++ b/src/portable/mentor/musb/musb_max32.h
@@ -31,7 +31,17 @@
extern "C" {
#endif
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
#include "mxc_device.h"
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
#include "usbhs_regs.h"
#define MUSB_CFG_SHARED_FIFO 1 // shared FIFO for TX and RX endpoints
diff --git a/src/portable/sunxi/dcd_sunxi_musb.c b/src/portable/sunxi/dcd_sunxi_musb.c
index 9801a485f..f1f4897cb 100644
--- a/src/portable/sunxi/dcd_sunxi_musb.c
+++ b/src/portable/sunxi/dcd_sunxi_musb.c
@@ -176,7 +176,7 @@ static void USBC_ForceVbusValidToHigh(void)
USBC_Writel(reg_val, USBC_REG_ISCR(USBC0_BASE));
}
-void USBC_SelectBus(u32 io_type, u32 ep_type, u32 ep_index)
+static void USBC_SelectBus(u32 io_type, u32 ep_type, u32 ep_index)
{
u32 reg_val = 0;
@@ -952,7 +952,7 @@ void dcd_remote_wakeup(uint8_t rhport)
{
(void)rhport;
USBC_REG_set_bit_b(USBC_BP_POWER_D_RESUME, USBC_REG_PCTL(USBC0_BASE));
- delay_ms(10);
+ tusb_time_delay_ms_api(10);
USBC_REG_clear_bit_b(USBC_BP_POWER_D_RESUME, USBC_REG_PCTL(USBC0_BASE));
}
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index e3c21a86d..f1e4dbd77 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -77,6 +77,7 @@ CFG_TUD_MEM_SECTION static struct {
TU_ATTR_ALWAYS_INLINE static inline uint8_t dwc2_ep_count(const dwc2_regs_t* dwc2) {
#if TU_CHECK_MCU(OPT_MCU_GD32VF103)
+ (void) dwc2;
return DWC2_EP_MAX;
#else
const dwc2_ghwcfg2_t ghwcfg2 = {.value = dwc2->ghwcfg2};
diff --git a/src/portable/wch/hcd_ch32_usbfs.c b/src/portable/wch/hcd_ch32_usbfs.c
index 200136906..7bbf122dd 100644
--- a/src/portable/wch/hcd_ch32_usbfs.c
+++ b/src/portable/wch/hcd_ch32_usbfs.c
@@ -36,7 +36,17 @@
#include "bsp/board_api.h"
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
#include "ch32v20x.h"
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
#include "ch32v20x_usb.h"
#define USBFS_RX_BUF_LEN 64
diff --git a/tools/get_deps.py b/tools/get_deps.py
index c243137fa..c1e2c075d 100755
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -246,12 +246,12 @@ deps_optional = {
'imxrt kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx mm32 msp432e4 nrf saml2x '
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43 '
'stm32c0 stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 stm32h5 '
- 'stm32h7 stm32h7rs stm32l0 stm32l1 stm32l4 stm32l5 stm32n6 stm32u0 stm32u5 stm32wb stm32wba'
+ 'stm32h7 stm32h7rs stm32l0 stm32l1 stm32l4 stm32l5 stm32u0 stm32u5 stm32wb stm32wba'
'sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg '
'tm4c '],
'lib/CMSIS_6': ['https://github.com/ARM-software/CMSIS_6.git',
- 'b0bbb0423b278ca632cfe1474eb227961d835fd2',
- 'ra'],
+ '6f0a58d01aa9bd2feba212097f9afe7acd991d52',
+ 'ra stm32n6'],
'lib/sct_neopixel': ['https://github.com/gsteiert/sct_neopixel.git',
'e73e04ca63495672d955f9268e003cffe168fcd8',
'lpc55'],