summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-06-25 00:05:23 +0700
committerhathach <[email protected]>2023-06-25 00:05:23 +0700
commit15376397b10e6fb35ef7ec4b693271adbafecabf (patch)
tree1530a5a69045fbd75d9b1676ffd093a51869850d /hw
parent30ccfe083216f5219bfa8e85e0a0a26547a2655c (diff)
run ci with -DCMAKE_BUILD_TYPE=MinSizeRel
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/stm32f7/family.c10
-rw-r--r--hw/bsp/stm32f7/family.mk2
2 files changed, 11 insertions, 1 deletions
diff --git a/hw/bsp/stm32f7/family.c b/hw/bsp/stm32f7/family.c
index 88cba2c7d..ce7e9d1bc 100644
--- a/hw/bsp/stm32f7/family.c
+++ b/hw/bsp/stm32f7/family.c
@@ -143,9 +143,19 @@ void board_init(void)
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+// Suppress warning caused by mcu driver
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
+
/* Enable USB FS Clocks */
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
#if OTG_FS_VBUS_SENSE
/* Configure VBUS Pin */
GPIO_InitStruct.Pin = GPIO_PIN_9;
diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk
index 4a699ea31..7f37a7e40 100644
--- a/hw/bsp/stm32f7/family.mk
+++ b/hw/bsp/stm32f7/family.mk
@@ -33,7 +33,7 @@ CFLAGS_GCC += \
-nostdlib -nostartfiles
# mcu driver cause following warnings
-CFLAGS_GCC += -Wno-error=shadow -Wno-error=cast-align
+CFLAGS_GCC += -Wno-error=cast-align
# -----------------
# Sources & Include