Skip to content

Commit

Permalink
drivers: udc: stm32: add kconfig dependency on !USB_DC_STM32
Browse files Browse the repository at this point in the history
If both new and old stm32 usb drivers are enabled, the HAL callbacks
will raise multiple definition linker errors.  By adding this kconfig
dependency, this will be reported as a kconfig warning that should be
easier to understand.  This will happen when trying to run samples with
-DCONF_FILE=usbd_next_prj.conf for boards that automatically enable the
legacy usb stack (e.g. arduino_portenta/stm32h747xx/m7).

Signed-off-by: Tobias Pisani <[email protected]>
  • Loading branch information
topisani committed Dec 2, 2024
1 parent 793c885 commit 2a056c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/udc/Kconfig.stm32
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ config UDC_STM32
depends on DT_HAS_ST_STM32_OTGFS_ENABLED \
|| DT_HAS_ST_STM32_OTGHS_ENABLED \
|| DT_HAS_ST_STM32_USB_ENABLED
depends on !USB_DC_STM32
select USE_STM32_LL_USB
select USE_STM32_HAL_PCD
select USE_STM32_HAL_PCD_EX
Expand Down

0 comments on commit 2a056c0

Please sign in to comment.