summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMengsk <[email protected]>2022-11-07 12:58:23 +0100
committerMengsk <[email protected]>2022-11-07 13:38:35 +0100
commitf3f3739073b46bc7609e4c55f50accbfb08e1807 (patch)
tree3e2ba5ff910ef2d40649fa762bbf33c5b76008c9
parent9d3d8fd5b0788b811ad283d10d37dfd1b1005224 (diff)
Fix DCD build.
-rw-r--r--hw/bsp/stm32l4/family.mk1
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/hw/bsp/stm32l4/family.mk b/hw/bsp/stm32l4/family.mk
index d6f55e5f9..1361e184c 100644
--- a/hw/bsp/stm32l4/family.mk
+++ b/hw/bsp/stm32l4/family.mk
@@ -22,6 +22,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align
#src/portable/st/synopsys/dcd_synopsys.c
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
+ src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \
$(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index b90ab7d11..c88a8a3a2 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -109,10 +109,17 @@
#define STM32F1_FSDEV
#endif
+#if defined(STM32L412xx) || defined(STM32L422xx) || \
+ defined(STM32L432xx) || defined(STM32L433xx) || \
+ defined(STM32L442xx) || defined(STM32L443xx) || \
+ defined(STM32L452xx) || defined(STM32L462xx)
+#define STM32L4_FSDEV
+#endif
+
#if CFG_TUD_ENABLED && \
( TU_CHECK_MCU(OPT_MCU_STM32F0, OPT_MCU_STM32F3, OPT_MCU_STM32L0, OPT_MCU_STM32L1, OPT_MCU_STM32G4, OPT_MCU_STM32WB) || \
(TU_CHECK_MCU(OPT_MCU_STM32F1) && defined(STM32F1_FSDEV)) || \
- (TU_CHECK_MCU(OPT_MCU_STM32L4) && !defined(DCD_ATTR_DWC2_STM32)) \
+ (TU_CHECK_MCU(OPT_MCU_STM32L4) && defined(STM32L4_FSDEV)) \
)
// In order to reduce the dependance on HAL, we undefine this.