diff --git a/hw/bsp/adafruit_clue/board.mk b/hw/bsp/adafruit_clue/board.mk index d5f7c7cd4..ef6e093f5 100644 --- a/hw/bsp/adafruit_clue/board.mk +++ b/hw/bsp/adafruit_clue/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld diff --git a/hw/bsp/arduino_nano33_ble/board.mk b/hw/bsp/arduino_nano33_ble/board.mk index d1d62bdf2..63d1550d1 100644 --- a/hw/bsp/arduino_nano33_ble/board.mk +++ b/hw/bsp/arduino_nano33_ble/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. #LD_FILE = hw/bsp/$(BOARD)/linker_script.ld diff --git a/hw/bsp/circuitplayground_bluefruit/board.mk b/hw/bsp/circuitplayground_bluefruit/board.mk index d5f7c7cd4..ef6e093f5 100644 --- a/hw/bsp/circuitplayground_bluefruit/board.mk +++ b/hw/bsp/circuitplayground_bluefruit/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld diff --git a/hw/bsp/da14695_dk_usb/board.mk b/hw/bsp/da14695_dk_usb/board.mk index 8fef7d10f..b097262dc 100644 --- a/hw/bsp/da14695_dk_usb/board.mk +++ b/hw/bsp/da14695_dk_usb/board.mk @@ -21,7 +21,7 @@ SRC_C += \ $(MCU_FAMILY_DIR)/src/da1469x_clock.c \ $(MCU_FAMILY_DIR)/src/hal_gpio.c \ -SRC_S += $(TOP)/hw/bsp/$(BOARD)/gcc_startup_da1469x.S +SRC_S += hw/bsp/$(BOARD)/gcc_startup_da1469x.S INC += \ $(TOP)/hw/bsp/$(BOARD) \ diff --git a/hw/bsp/da1469x_dk_pro/board.mk b/hw/bsp/da1469x_dk_pro/board.mk index 60a62378c..16bd6de6b 100644 --- a/hw/bsp/da1469x_dk_pro/board.mk +++ b/hw/bsp/da1469x_dk_pro/board.mk @@ -21,7 +21,7 @@ SRC_C += \ $(MCU_FAMILY_DIR)/src/da1469x_clock.c \ $(MCU_FAMILY_DIR)/src/hal_gpio.c \ -SRC_S += $(TOP)/hw/bsp/$(BOARD)/gcc_startup_da1469x.S +SRC_S += hw/bsp/$(BOARD)/gcc_startup_da1469x.S INC += \ $(TOP)/hw/bsp/$(BOARD) \ diff --git a/hw/bsp/double_m33_express/board.mk b/hw/bsp/double_m33_express/board.mk index 6cc2495de..c3401e5b2 100644 --- a/hw/bsp/double_m33_express/board.mk +++ b/hw/bsp/double_m33_express/board.mk @@ -26,7 +26,7 @@ SRC_C += \ $(MCU_DIR)/drivers/fsl_reset.c \ $(MCU_DIR)/drivers/fsl_usart.c \ $(MCU_DIR)/drivers/fsl_flexcomm.c \ - $(TOP)/lib/sct_neopixel/sct_neopixel.c + lib/sct_neopixel/sct_neopixel.c INC += \ $(TOP)/hw/bsp/ \ diff --git a/hw/bsp/feather_nrf52840_express/board.mk b/hw/bsp/feather_nrf52840_express/board.mk index 6cc972835..2feb070a8 100644 --- a/hw/bsp/feather_nrf52840_express/board.mk +++ b/hw/bsp/feather_nrf52840_express/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld diff --git a/hw/bsp/feather_nrf52840_sense/board.mk b/hw/bsp/feather_nrf52840_sense/board.mk index d5f7c7cd4..ef6e093f5 100644 --- a/hw/bsp/feather_nrf52840_sense/board.mk +++ b/hw/bsp/feather_nrf52840_sense/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld diff --git a/hw/bsp/itsybitsy_nrf52840/board.mk b/hw/bsp/itsybitsy_nrf52840/board.mk index 6cc972835..2feb070a8 100644 --- a/hw/bsp/itsybitsy_nrf52840/board.mk +++ b/hw/bsp/itsybitsy_nrf52840/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/nrf52840_s140_v6.ld diff --git a/hw/bsp/nrf52840_mdk_dongle/board.mk b/hw/bsp/nrf52840_mdk_dongle/board.mk index 8ce8929b8..baa4cc22e 100644 --- a/hw/bsp/nrf52840_mdk_dongle/board.mk +++ b/hw/bsp/nrf52840_mdk_dongle/board.mk @@ -13,9 +13,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/$(BOARD).ld diff --git a/hw/bsp/pca10056/board.mk b/hw/bsp/pca10056/board.mk index 8f4887dcb..3ea85983d 100644 --- a/hw/bsp/pca10056/board.mk +++ b/hw/bsp/pca10056/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld diff --git a/hw/bsp/pca10059/board.mk b/hw/bsp/pca10059/board.mk index bd7a80c0e..e9bc890cf 100644 --- a/hw/bsp/pca10059/board.mk +++ b/hw/bsp/pca10059/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/$(BOARD).ld diff --git a/hw/bsp/pca10100/board.mk b/hw/bsp/pca10100/board.mk index 4b5be082e..0b4d42f22 100644 --- a/hw/bsp/pca10100/board.mk +++ b/hw/bsp/pca10100/board.mk @@ -14,9 +14,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52833_xxaa.ld diff --git a/hw/bsp/raytac_mdbt50q_rx/board.mk b/hw/bsp/raytac_mdbt50q_rx/board.mk index e153aab0b..6ff079dd7 100644 --- a/hw/bsp/raytac_mdbt50q_rx/board.mk +++ b/hw/bsp/raytac_mdbt50q_rx/board.mk @@ -13,9 +13,15 @@ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align # due to tusb_hal_nrf_power_event GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(UNAME),Windows) +ifeq ($(shell if $(GCCVERSION) geq 8 echo 1), 1) +CFLAGS += -Wno-error=cast-function-type +endif +else ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type endif +endif # All source paths should be relative to the top level. LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld