summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/board.c4
-rw-r--r--hw/bsp/d5035_01/board.mk3
-rw-r--r--hw/bsp/ea4088qs/board.mk2
-rw-r--r--hw/bsp/ea4357/board.mk2
-rw-r--r--hw/bsp/fomu/fomu.c9
-rw-r--r--hw/bsp/frdm_k32l2b/frdm_k32l2b.c2
-rw-r--r--hw/bsp/frdm_kl25z/frdm_kl25z.c2
-rw-r--r--hw/bsp/gd32vf103/family.c2
-rw-r--r--hw/bsp/imxrt/family.c2
-rw-r--r--hw/bsp/lpc15/family.mk2
-rw-r--r--hw/bsp/lpc18/family.mk2
-rw-r--r--hw/bsp/lpc54/family.c2
-rw-r--r--hw/bsp/lpc55/family.c2
-rw-r--r--hw/bsp/lpcxpresso1769/board.mk2
-rw-r--r--hw/bsp/mbed1768/board.mk2
-rw-r--r--hw/bsp/mm32/family.mk2
-rw-r--r--hw/bsp/ngx4330/board.mk2
-rw-r--r--hw/bsp/nrf/family.mk14
-rw-r--r--hw/bsp/nutiny_nuc121s/board.mk14
-rw-r--r--hw/bsp/nutiny_nuc126v/board.mk17
-rw-r--r--hw/bsp/nutiny_sdk_nuc120/board.mk17
-rw-r--r--hw/bsp/rx/boards/gr_citrus/gr_citrus.c2
-rw-r--r--hw/bsp/rx/boards/rx65n_target/rx65n_target.c2
-rw-r--r--hw/bsp/samd11/family.mk3
-rw-r--r--hw/bsp/samd21/family.mk3
-rw-r--r--hw/bsp/samd51/family.mk3
-rw-r--r--hw/bsp/same54xplainedpro/board.mk2
-rw-r--r--hw/bsp/same70_qmtech/board.mk2
-rw-r--r--hw/bsp/same70_xplained/board.mk2
-rw-r--r--hw/bsp/samg55xplained/board.mk2
-rw-r--r--hw/bsp/saml2x/family.mk3
-rw-r--r--hw/bsp/stm32f0/family.c2
-rw-r--r--hw/bsp/stm32f0/family.mk2
-rw-r--r--hw/bsp/stm32f4/family.c2
-rw-r--r--hw/bsp/stm32f7/family.c2
-rw-r--r--hw/bsp/stm32h7/family.c2
-rw-r--r--hw/bsp/stm32l4r5nucleo/stm32l4r5nucleo.c2
37 files changed, 54 insertions, 88 deletions
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 6a26f55b7..2c18b61b4 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -135,13 +135,13 @@ TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
TU_ATTR_USED int sys_write (int fhdl, const void *buf, size_t count)
{
(void) fhdl;
- return board_uart_write(buf, count);
+ return board_uart_write(buf, (int) count);
}
TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
{
(void) fhdl;
- return board_uart_read((uint8_t*) buf, count);
+ return board_uart_read((uint8_t*) buf, (int) count);
}
#endif
diff --git a/hw/bsp/d5035_01/board.mk b/hw/bsp/d5035_01/board.mk
index 1d09bd3d4..b7796b9d8 100644
--- a/hw/bsp/d5035_01/board.mk
+++ b/hw/bsp/d5035_01/board.mk
@@ -18,6 +18,9 @@ CFLAGS += \
-DSVC_Handler=SVCall_Handler \
-DHWREV=$(HWREV)
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
+
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/same51j19a_flash.ld
diff --git a/hw/bsp/ea4088qs/board.mk b/hw/bsp/ea4088qs/board.mk
index c624a5cf2..b325dfeb4 100644
--- a/hw/bsp/ea4088qs/board.mk
+++ b/hw/bsp/ea4088qs/board.mk
@@ -14,7 +14,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC40XX
# mcu driver cause following warnings
-CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx
diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk
index 86391ab5d..4390d1eda 100644
--- a/hw/bsp/ea4357/board.mk
+++ b/hw/bsp/ea4357/board.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
-CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes
+CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx
diff --git a/hw/bsp/fomu/fomu.c b/hw/bsp/fomu/fomu.c
index 25e5e9613..12b7bfd18 100644
--- a/hw/bsp/fomu/fomu.c
+++ b/hw/bsp/fomu/fomu.c
@@ -101,9 +101,14 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
int32_t offset = 0;
+ uint8_t const* buf8 = (uint8_t const*) buf;
for (offset = 0; offset < len; offset++)
- if (! (messible_status_read() & CSR_MESSIBLE_STATUS_FULL_OFFSET))
- messible_in_write(((uint8_t *)buf)[offset]);
+ {
+ if (!(messible_status_read() & CSR_MESSIBLE_STATUS_FULL_OFFSET))
+ {
+ messible_in_write(buf8[offset]);
+ }
+ }
return len;
}
diff --git a/hw/bsp/frdm_k32l2b/frdm_k32l2b.c b/hw/bsp/frdm_k32l2b/frdm_k32l2b.c
index c45095caa..924bb18e9 100644
--- a/hw/bsp/frdm_k32l2b/frdm_k32l2b.c
+++ b/hw/bsp/frdm_k32l2b/frdm_k32l2b.c
@@ -122,7 +122,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- LPUART_WriteBlocking(UART_PORT, (uint8_t*)buf, len);
+ LPUART_WriteBlocking(UART_PORT, (uint8_t const*) buf, len);
return len;
}
diff --git a/hw/bsp/frdm_kl25z/frdm_kl25z.c b/hw/bsp/frdm_kl25z/frdm_kl25z.c
index cdc996bc2..72982ed8a 100644
--- a/hw/bsp/frdm_kl25z/frdm_kl25z.c
+++ b/hw/bsp/frdm_kl25z/frdm_kl25z.c
@@ -153,7 +153,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- LPSCI_WriteBlocking(UART_PORT, (uint8_t*)buf, len);
+ LPSCI_WriteBlocking(UART_PORT, (uint8_t const*) buf, len);
return len;
}
diff --git a/hw/bsp/gd32vf103/family.c b/hw/bsp/gd32vf103/family.c
index d76fb9a2a..c20732302 100644
--- a/hw/bsp/gd32vf103/family.c
+++ b/hw/bsp/gd32vf103/family.c
@@ -158,7 +158,7 @@ int board_uart_write(void const* buf, int len) {
#if defined(UART_DEV)
int txsize = len;
while (txsize--) {
- usart_write(UART_DEV, *(uint8_t*)buf);
+ usart_write(UART_DEV, *(uint8_t const*)buf);
buf++;
}
return len;
diff --git a/hw/bsp/imxrt/family.c b/hw/bsp/imxrt/family.c
index 77a224a5e..716681ca9 100644
--- a/hw/bsp/imxrt/family.c
+++ b/hw/bsp/imxrt/family.c
@@ -172,7 +172,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- LPUART_WriteBlocking(UART_PORT, (uint8_t*)buf, len);
+ LPUART_WriteBlocking(UART_PORT, (uint8_t const*)buf, len);
return len;
}
diff --git a/hw/bsp/lpc15/family.mk b/hw/bsp/lpc15/family.mk
index e80a3bc51..c7dd3f8be 100644
--- a/hw/bsp/lpc15/family.mk
+++ b/hw/bsp/lpc15/family.mk
@@ -15,7 +15,7 @@ CFLAGS += \
-DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))'
# mcu driver cause following warnings
-CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc15xx/lpc_chip_15xx
diff --git a/hw/bsp/lpc18/family.mk b/hw/bsp/lpc18/family.mk
index 3fed0b45a..79a00cb2d 100644
--- a/hw/bsp/lpc18/family.mk
+++ b/hw/bsp/lpc18/family.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC18XX
# mcu driver cause following warnings
-CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes
+CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx
diff --git a/hw/bsp/lpc54/family.c b/hw/bsp/lpc54/family.c
index 4789425a3..4f1199c3a 100644
--- a/hw/bsp/lpc54/family.c
+++ b/hw/bsp/lpc54/family.c
@@ -210,7 +210,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- USART_WriteBlocking(UART_DEV, (uint8_t *)buf, len);
+ USART_WriteBlocking(UART_DEV, (uint8_t const *) buf, len);
return 0;
}
diff --git a/hw/bsp/lpc55/family.c b/hw/bsp/lpc55/family.c
index 4fc1f6222..f037a9f5b 100644
--- a/hw/bsp/lpc55/family.c
+++ b/hw/bsp/lpc55/family.c
@@ -265,7 +265,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- USART_WriteBlocking(UART_DEV, (uint8_t *)buf, len);
+ USART_WriteBlocking(UART_DEV, (uint8_t const *) buf, len);
return len;
}
diff --git a/hw/bsp/lpcxpresso1769/board.mk b/hw/bsp/lpcxpresso1769/board.mk
index b69be39bd..34b4d6dc0 100644
--- a/hw/bsp/lpcxpresso1769/board.mk
+++ b/hw/bsp/lpcxpresso1769/board.mk
@@ -12,7 +12,7 @@ CFLAGS += \
-DRTC_EV_SUPPORT=0
# lpc_types.h cause following errors
-CFLAGS += -Wno-error=strict-prototypes
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x
diff --git a/hw/bsp/mbed1768/board.mk b/hw/bsp/mbed1768/board.mk
index e99df9f08..b0d885866 100644
--- a/hw/bsp/mbed1768/board.mk
+++ b/hw/bsp/mbed1768/board.mk
@@ -12,7 +12,7 @@ CFLAGS += \
-DRTC_EV_SUPPORT=0
# startup.c and lpc_types.h cause following errors
-CFLAGS += -Wno-error=strict-prototypes
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x
diff --git a/hw/bsp/mm32/family.mk b/hw/bsp/mm32/family.mk
index 3273ff870..1a9f51191 100644
--- a/hw/bsp/mm32/family.mk
+++ b/hw/bsp/mm32/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_MM32F327X
# suppress warning caused by vendor mcu driver
-CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized
+CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized -Wno-error=cast-qual
SRC_C += \
src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c \
diff --git a/hw/bsp/ngx4330/board.mk b/hw/bsp/ngx4330/board.mk
index 04c37feeb..3b193c0a5 100644
--- a/hw/bsp/ngx4330/board.mk
+++ b/hw/bsp/ngx4330/board.mk
@@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
-CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter
+CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx
diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk
index d1afd2587..d8283a9e6 100644
--- a/hw/bsp/nrf/family.mk
+++ b/hw/bsp/nrf/family.mk
@@ -14,19 +14,7 @@ CFLAGS += \
-DCONFIG_GPIO_AS_PINRESET
# suppress warning caused by vendor mcu driver
-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 ($(CMDEXE),1)
- 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
+CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
# All source paths should be relative to the top level.
LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld
diff --git a/hw/bsp/nutiny_nuc121s/board.mk b/hw/bsp/nutiny_nuc121s/board.mk
index a0a208ca7..ff1d5aa3a 100644
--- a/hw/bsp/nutiny_nuc121s/board.mk
+++ b/hw/bsp/nutiny_nuc121s/board.mk
@@ -16,24 +16,12 @@ LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld
SRC_C += \
src/portable/nuvoton/nuc121/dcd_nuc121.c \
hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/adc.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/bpwm.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/i2c.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/pdma.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/pwm.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/spi_i2s.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/timer.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/usbd.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_i2c.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_spi.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_uart.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/wdt.c \
- hw/mcu/nuvoton/nuc121_125/StdDriver/src/wwdt.c
+ hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/GCC/startup_NUC121.S
diff --git a/hw/bsp/nutiny_nuc126v/board.mk b/hw/bsp/nutiny_nuc126v/board.mk
index e9df1ed13..4f0ebf201 100644
--- a/hw/bsp/nutiny_nuc126v/board.mk
+++ b/hw/bsp/nutiny_nuc126v/board.mk
@@ -17,28 +17,13 @@ LD_FILE = hw/bsp/$(BOARD)/nuc126_flash.ld
SRC_C += \
src/portable/nuvoton/nuc121/dcd_nuc121.c \
hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/system_NUC126.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/acmp.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/adc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/crc.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/ebi.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/gpio.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/pdma.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/pwm.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/rtc.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/sc.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/scuart.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/spi.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/timer.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/timer_pwm.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/uart.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/usbd.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/usci_spi.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/usci_uart.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/wdt.c \
- hw/mcu/nuvoton/nuc126/StdDriver/src/wwdt.c
+ hw/mcu/nuvoton/nuc126/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/GCC/startup_NUC126.S
diff --git a/hw/bsp/nutiny_sdk_nuc120/board.mk b/hw/bsp/nutiny_sdk_nuc120/board.mk
index 1fde47c5a..4d7aac7f5 100644
--- a/hw/bsp/nutiny_sdk_nuc120/board.mk
+++ b/hw/bsp/nutiny_sdk_nuc120/board.mk
@@ -15,26 +15,11 @@ LD_FILE = hw/bsp/nutiny_sdk_nuc120/nuc120_flash.ld
SRC_C += \
src/portable/nuvoton/nuc120/dcd_nuc120.c \
hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/system_NUC100Series.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/acmp.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/adc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/clk.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/crc.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/gpio.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2c.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2s.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/pdma.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/ps2.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/pwm.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/rtc.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/sc.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/spi.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/timer.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/usbd.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/wdt.c \
- hw/mcu/nuvoton/nuc100_120/StdDriver/src/wwdt.c
+ hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/GCC/startup_NUC100Series.S
diff --git a/hw/bsp/rx/boards/gr_citrus/gr_citrus.c b/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
index caf5fd6fa..633ddad16 100644
--- a/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
+++ b/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
@@ -228,7 +228,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const *buf, int len)
{
- sci0_buf[0].buf = (uint8_t*)buf;
+ sci0_buf[0].buf = (uint8_t*)(uintptr_t) buf;
sci0_buf[0].cnt = len;
SCI0.SCR.BYTE |= SCI_SCR_TE | SCI_SCR_TIE;
while (SCI0.SCR.BIT.TE) ;
diff --git a/hw/bsp/rx/boards/rx65n_target/rx65n_target.c b/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
index 20867455e..ab86bc419 100644
--- a/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
+++ b/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
@@ -273,7 +273,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const *buf, int len)
{
- sci_buf[0].buf = (uint8_t*)buf;
+ sci_buf[0].buf = (uint8_t*)(uintptr_t) buf;
sci_buf[0].cnt = len;
SCI5.SCR.BYTE |= SCI_SCR_TE | SCI_SCR_TIE;
while (SCI5.SCR.BIT.TE) ;
diff --git a/hw/bsp/samd11/family.mk b/hw/bsp/samd11/family.mk
index 032d11b98..ae55be75b 100644
--- a/hw/bsp/samd11/family.mk
+++ b/hw/bsp/samd11/family.mk
@@ -11,6 +11,9 @@ CFLAGS += \
-DOSC32K_OVERWRITE_CALIBRATION=0 \
-DCFG_TUSB_MCU=OPT_MCU_SAMD11
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
+
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \
hw/mcu/microchip/samd11/gcc/gcc/startup_samd11.c \
diff --git a/hw/bsp/samd21/family.mk b/hw/bsp/samd21/family.mk
index f1b063f2c..208f23789 100644
--- a/hw/bsp/samd21/family.mk
+++ b/hw/bsp/samd21/family.mk
@@ -12,6 +12,9 @@ CFLAGS += \
-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
-DCFG_TUSB_MCU=OPT_MCU_SAMD21
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
+
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \
hw/mcu/microchip/samd21/gcc/gcc/startup_samd21.c \
diff --git a/hw/bsp/samd51/family.mk b/hw/bsp/samd51/family.mk
index f4e260fb1..783bed82a 100644
--- a/hw/bsp/samd51/family.mk
+++ b/hw/bsp/samd51/family.mk
@@ -13,7 +13,8 @@ CFLAGS += \
-nostdlib -nostartfiles \
-DCFG_TUSB_MCU=OPT_MCU_SAMD51
-CFLAGS += -Wno-error=undef
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \
diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk
index 16ac786d5..2d0d928ff 100644
--- a/hw/bsp/same54xplainedpro/board.mk
+++ b/hw/bsp/same54xplainedpro/board.mk
@@ -15,6 +15,8 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAME5X \
-DBOARD_NAME="\"Microchip SAM E54 Xplained Pro\""
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/same54p20a_flash.ld
diff --git a/hw/bsp/same70_qmtech/board.mk b/hw/bsp/same70_qmtech/board.mk
index 6c84810f3..ba7088e44 100644
--- a/hw/bsp/same70_qmtech/board.mk
+++ b/hw/bsp/same70_qmtech/board.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
-CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
+CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
ASF_DIR = hw/mcu/microchip/same70
diff --git a/hw/bsp/same70_xplained/board.mk b/hw/bsp/same70_xplained/board.mk
index c9bc0cea3..cb2decf50 100644
--- a/hw/bsp/same70_xplained/board.mk
+++ b/hw/bsp/same70_xplained/board.mk
@@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
-CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
+CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
ASF_DIR = hw/mcu/microchip/same70
diff --git a/hw/bsp/samg55xplained/board.mk b/hw/bsp/samg55xplained/board.mk
index aed4de68e..deff6944c 100644
--- a/hw/bsp/samg55xplained/board.mk
+++ b/hw/bsp/samg55xplained/board.mk
@@ -12,7 +12,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMG
# suppress following warnings from mcu driver
-CFLAGS += -Wno-error=undef
+CFLAGS += -Wno-error=undef -Wno-error=cast-qual -Wno-error=null-dereference
ASF_DIR = hw/mcu/microchip/samg55
diff --git a/hw/bsp/saml2x/family.mk b/hw/bsp/saml2x/family.mk
index e0f6b2f77..bb1faeb7f 100644
--- a/hw/bsp/saml2x/family.mk
+++ b/hw/bsp/saml2x/family.mk
@@ -13,6 +13,9 @@ CFLAGS += \
-DCONF_OSC32K_CALIB_ENABLE=0 \
-DCFG_TUSB_MCU=OPT_MCU_SAML22
+# suppress warning caused by vendor mcu driver
+CFLAGS += -Wno-error=cast-qual
+
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \
$(MCU_DIR)/gcc/gcc/startup_$(SAML_VARIANT).c \
diff --git a/hw/bsp/stm32f0/family.c b/hw/bsp/stm32f0/family.c
index 68b924432..8de3147e2 100644
--- a/hw/bsp/stm32f0/family.c
+++ b/hw/bsp/stm32f0/family.c
@@ -134,7 +134,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
+ HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
}
diff --git a/hw/bsp/stm32f0/family.mk b/hw/bsp/stm32f0/family.mk
index 08cbf5626..39831e154 100644
--- a/hw/bsp/stm32f0/family.mk
+++ b/hw/bsp/stm32f0/family.mk
@@ -18,7 +18,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F0
# suppress warning caused by vendor mcu driver
-CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
+CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
SRC_C += \
src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \
diff --git a/hw/bsp/stm32f4/family.c b/hw/bsp/stm32f4/family.c
index cf0cb2b08..31f27fa3f 100644
--- a/hw/bsp/stm32f4/family.c
+++ b/hw/bsp/stm32f4/family.c
@@ -160,7 +160,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
#ifdef UART_DEV
- HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
+ HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
#else
(void) buf; (void) len; (void) UartHandle;
diff --git a/hw/bsp/stm32f7/family.c b/hw/bsp/stm32f7/family.c
index 2eb737ee3..14e3b2fd9 100644
--- a/hw/bsp/stm32f7/family.c
+++ b/hw/bsp/stm32f7/family.c
@@ -284,7 +284,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
+ HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
}
diff --git a/hw/bsp/stm32h7/family.c b/hw/bsp/stm32h7/family.c
index a2116d0bd..84976b4e4 100644
--- a/hw/bsp/stm32h7/family.c
+++ b/hw/bsp/stm32h7/family.c
@@ -237,7 +237,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
+ HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
}
diff --git a/hw/bsp/stm32l4r5nucleo/stm32l4r5nucleo.c b/hw/bsp/stm32l4r5nucleo/stm32l4r5nucleo.c
index bab66b550..8c661b602 100644
--- a/hw/bsp/stm32l4r5nucleo/stm32l4r5nucleo.c
+++ b/hw/bsp/stm32l4r5nucleo/stm32l4r5nucleo.c
@@ -257,7 +257,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
- HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
+ HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
}