diff --git a/boards/adafruit-clue/Kconfig b/boards/adafruit-clue/Kconfig index 5ea737ffc8f3..2cb2a8c111b0 100644 --- a/boards/adafruit-clue/Kconfig +++ b/boards/adafruit-clue/Kconfig @@ -25,4 +25,9 @@ config BOARD_ADAFRUIT_CLUE select HAVE_SAUL_GPIO select HAVE_SHT3X + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/adafruit-clue/Makefile.features b/boards/adafruit-clue/Makefile.features index eb54e9cce9d9..1f4969f6d974 100644 --- a/boards/adafruit-clue/Makefile.features +++ b/boards/adafruit-clue/Makefile.features @@ -9,10 +9,4 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/adafruit-itsybitsy-m4/Makefile.features b/boards/adafruit-itsybitsy-m4/Makefile.features index ee75dabcbb6e..9f48a1e4c3a9 100644 --- a/boards/adafruit-itsybitsy-m4/Makefile.features +++ b/boards/adafruit-itsybitsy-m4/Makefile.features @@ -13,9 +13,3 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/adafruit-itsybitsy-nrf52/Kconfig b/boards/adafruit-itsybitsy-nrf52/Kconfig index 15fbaf6a0eec..09c1ca52e1fa 100644 --- a/boards/adafruit-itsybitsy-nrf52/Kconfig +++ b/boards/adafruit-itsybitsy-nrf52/Kconfig @@ -20,4 +20,9 @@ config BOARD_ADAFRUIT_ITSYBITSY_NRF52 select HAVE_SAUL_GPIO + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/adafruit-itsybitsy-nrf52/Makefile.features b/boards/adafruit-itsybitsy-nrf52/Makefile.features index eb54e9cce9d9..1f4969f6d974 100644 --- a/boards/adafruit-itsybitsy-nrf52/Makefile.features +++ b/boards/adafruit-itsybitsy-nrf52/Makefile.features @@ -9,10 +9,4 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/adafruit-pybadge/Makefile.features b/boards/adafruit-pybadge/Makefile.features index 158745995b65..f48a0a24da7d 100644 --- a/boards/adafruit-pybadge/Makefile.features +++ b/boards/adafruit-pybadge/Makefile.features @@ -13,9 +13,3 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/arduino-nano-33-ble/Kconfig b/boards/arduino-nano-33-ble/Kconfig index 745540b6c342..18aeab747898 100644 --- a/boards/arduino-nano-33-ble/Kconfig +++ b/boards/arduino-nano-33-ble/Kconfig @@ -20,4 +20,9 @@ config BOARD_ARDUINO_NANO_33_BLE select HAVE_SAUL_GPIO + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/arduino-nano-33-ble/Makefile.features b/boards/arduino-nano-33-ble/Makefile.features index eb54e9cce9d9..1f4969f6d974 100644 --- a/boards/arduino-nano-33-ble/Makefile.features +++ b/boards/arduino-nano-33-ble/Makefile.features @@ -9,10 +9,4 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/arduino-nano-33-iot/Makefile.features b/boards/arduino-nano-33-iot/Makefile.features index 514af71c57f6..c43f111ff187 100644 --- a/boards/arduino-nano-33-iot/Makefile.features +++ b/boards/arduino-nano-33-iot/Makefile.features @@ -14,9 +14,3 @@ FEATURES_PROVIDED += periph_usbdev # Put other features for this board (in alphabetical order) FEATURES_PROVIDED += highlevel_stdio - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/bastwan/Kconfig b/boards/bastwan/Kconfig index 487049367d12..2d19213890c4 100644 --- a/boards/bastwan/Kconfig +++ b/boards/bastwan/Kconfig @@ -24,3 +24,6 @@ config BOARD_BASTWAN select HAVE_SAUL_GPIO select HAVE_SX1276 + +config FORCE_USB_STDIO + default y diff --git a/boards/bastwan/bastwan.config b/boards/bastwan/bastwan.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/bastwan/bastwan.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/boards/blackpill-stm32f103cb/Kconfig b/boards/blackpill-stm32f103cb/Kconfig index 28198b7ee452..bafca351a20f 100644 --- a/boards/blackpill-stm32f103cb/Kconfig +++ b/boards/blackpill-stm32f103cb/Kconfig @@ -17,6 +17,9 @@ config BOARD_BLACKPILL_STM32F103CB select HAS_HIGHLEVEL_STDIO +config FORCE_USB_STDIO + default y + # HACK: This is added due to the make resolution # make will select timer backend, probably due to the USBUS # and kconfig cannot select if something is already selected like make diff --git a/boards/blackpill-stm32f103cb/blackpill-stm32f103cb.config b/boards/blackpill-stm32f103cb/blackpill-stm32f103cb.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/blackpill-stm32f103cb/blackpill-stm32f103cb.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/boards/bluepill-stm32f103cb/Kconfig b/boards/bluepill-stm32f103cb/Kconfig index 6e331ef2007f..482c27e2bab3 100644 --- a/boards/bluepill-stm32f103cb/Kconfig +++ b/boards/bluepill-stm32f103cb/Kconfig @@ -17,6 +17,9 @@ config BOARD_BLUEPILL_STM32F103CB select HAS_HIGHLEVEL_STDIO +config FORCE_USB_STDIO + default y + # HACK: This is added due to the make resolution # make will select timer backend, probably due to the USBUS # and kconfig cannot select if something is already selected like make diff --git a/boards/bluepill-stm32f103cb/bluepill-stm32f103cb.config b/boards/bluepill-stm32f103cb/bluepill-stm32f103cb.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/bluepill-stm32f103cb/bluepill-stm32f103cb.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/boards/common/arduino-mkr/Makefile.features b/boards/common/arduino-mkr/Makefile.features index d5fcd388217a..9888bd0a69f0 100644 --- a/boards/common/arduino-mkr/Makefile.features +++ b/boards/common/arduino-mkr/Makefile.features @@ -17,9 +17,3 @@ FEATURES_PROVIDED += periph_usbdev FEATURES_PROVIDED += arduino FEATURES_PROVIDED += arduino_pwm FEATURES_PROVIDED += highlevel_stdio - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/common/nrf52/nrf52_bootloader.config b/boards/common/nrf52/nrf52_bootloader.config deleted file mode 100644 index a3ee03b3ef12..000000000000 --- a/boards/common/nrf52/nrf52_bootloader.config +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y -CONFIG_MODULE_USB_BOARD_RESET=y diff --git a/boards/common/particle-mesh/Kconfig b/boards/common/particle-mesh/Kconfig index 55cda8499a5a..551f9f93126e 100644 --- a/boards/common/particle-mesh/Kconfig +++ b/boards/common/particle-mesh/Kconfig @@ -21,6 +21,7 @@ config BOARD_COMMON_PARTICLE_MESH select HAVE_SAUL_PWM select MODULE_BOARDS_COMMON_PARTICLE_MESH if TEST_KCONFIG + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG config MODULE_BOARDS_COMMON_PARTICLE_MESH bool @@ -28,4 +29,7 @@ config MODULE_BOARDS_COMMON_PARTICLE_MESH help Common code for particle-mesh boards +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/common/particle-mesh/Makefile.features b/boards/common/particle-mesh/Makefile.features index 98a4aaa362a9..f8ac8aa3c339 100644 --- a/boards/common/particle-mesh/Makefile.features +++ b/boards/common/particle-mesh/Makefile.features @@ -12,10 +12,4 @@ FEATURES_PROVIDED += vdd_lc_filter_reg1 # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/common/samdx1-arduino-bootloader/Kconfig b/boards/common/samdx1-arduino-bootloader/Kconfig index 9d366892756d..da62743e3674 100644 --- a/boards/common/samdx1-arduino-bootloader/Kconfig +++ b/boards/common/samdx1-arduino-bootloader/Kconfig @@ -11,3 +11,6 @@ config MODULE_BOARDS_COMMON_SAMDX1-ARDUINO-BOOTLOADER depends on TEST_KCONFIG help Common code of samdx1 boards with an arduino bootloader + +config FORCE_USB_STDIO + default y diff --git a/boards/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config b/boards/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/boards/common/sodaq/Makefile.features b/boards/common/sodaq/Makefile.features index b4d487327df2..4f6613e8d75c 100644 --- a/boards/common/sodaq/Makefile.features +++ b/boards/common/sodaq/Makefile.features @@ -13,9 +13,3 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += arduino FEATURES_PROVIDED += highlevel_stdio - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/common/weact-f4x1cx/Kconfig b/boards/common/weact-f4x1cx/Kconfig index 3b5e04e42eac..46fc01fcd719 100644 --- a/boards/common/weact-f4x1cx/Kconfig +++ b/boards/common/weact-f4x1cx/Kconfig @@ -34,4 +34,7 @@ config MODULE_BOARDS_COMMON_WEACT-F4X1CX help Common code of weact based boards +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/stm32/Kconfig" diff --git a/boards/common/weact-f4x1cx/weact-f4x1cx.config b/boards/common/weact-f4x1cx/weact-f4x1cx.config index 2d76798de1db..d7a295b937da 100644 --- a/boards/common/weact-f4x1cx/weact-f4x1cx.config +++ b/boards/common/weact-f4x1cx/weact-f4x1cx.config @@ -1,5 +1,2 @@ CONFIG_MODULE_BOOTLOADER_STM32=y -CONFIG_MODULE_STDIO_CDC_ACM=y -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y CONFIG_MODULE_USB_BOARD_RESET=y diff --git a/boards/esp32s2-lilygo-ttgo-t8/Kconfig b/boards/esp32s2-lilygo-ttgo-t8/Kconfig index 10b9ba3be94c..e4c820fa4998 100644 --- a/boards/esp32s2-lilygo-ttgo-t8/Kconfig +++ b/boards/esp32s2-lilygo-ttgo-t8/Kconfig @@ -28,7 +28,9 @@ config BOARD_ESP32S2_LILYGO_TTGO_T8 select HAVE_MTD_SDCARD_DEFAULT select HAVE_ST7735 select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT - select MODULE_USBUS_CDC_ACM if MODULE_USBUS && ESP32S2_LILYGO_TTGO_T8_USB + +config FORCE_USB_STDIO + default y if ESP32S2_LILYGO_TTGO_T8_USB menu "LILYGO TTGO T8 ESP32-S2 Board configurations" depends on BOARD_ESP32S2_LILYGO_TTGO_T8 @@ -53,9 +55,4 @@ menu "LILYGO TTGO T8 ESP32-S2 Board configurations" endmenu -choice STDIO_IMPLEMENTATION - default MODULE_STDIO_CDC_ACM if MODULE_USBUS && ESP32S2_LILYGO_TTGO_T8_USB - default MODULE_STDIO_TINYUSB_CDC_ACM if MODULE_TINYUSB_DEVICE && ESP32S2_LILYGO_TTGO_T8_USB -endchoice - source "$(RIOTBOARD)/common/esp32s2/Kconfig" diff --git a/boards/esp32s2-wemos-mini/Kconfig b/boards/esp32s2-wemos-mini/Kconfig index d15b72edd72d..e26e13471f81 100644 --- a/boards/esp32s2-wemos-mini/Kconfig +++ b/boards/esp32s2-wemos-mini/Kconfig @@ -20,12 +20,12 @@ config BOARD_ESP32S2_WEMOS_MINI select HAS_PERIPH_USBDEV select HAS_TINYUSB_DEVICE select HAS_HIGHLEVEL_STDIO - select MODULE_USBUS_CDC_ACM if TEST_KCONFIG && MODULE_USBUS - select PACKAGE_TINYUSB if TEST_KCONFIG && !MODULE_USBUS -choice STDIO_IMPLEMENTATION - default MODULE_STDIO_CDC_ACM if MODULE_USBUS - default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB +config FORCE_USB_STDIO + default y + +choice USB_IMPLEMENTATION + default PACKAGE_TINYUSB endchoice source "$(RIOTBOARD)/common/esp32s2/Kconfig" diff --git a/boards/esp32s3-pros3/Kconfig b/boards/esp32s3-pros3/Kconfig index 72f596ee8350..71bddcca56e2 100644 --- a/boards/esp32s3-pros3/Kconfig +++ b/boards/esp32s3-pros3/Kconfig @@ -23,13 +23,13 @@ config BOARD_ESP32S3_PROS3 select HAS_PERIPH_SPI select HAS_PERIPH_USBDEV select HAS_TINYUSB_DEVICE - select MODULE_USB_BOARD_RESET if TEST_KCONFIG && MODULE_STDIO_USB_SERIAL_JTAG - select MODULE_USBUS_CDC_ACM if MODULE_USBUS + # Only this board has a requirement to use USB_BOARD_RESET with STDIO_USB_SERIAL_JTAG + select MODULE_USB_BOARD_RESET if MODULE_STDIO_USB_SERIAL_JTAG choice STDIO_IMPLEMENTATION default MODULE_STDIO_CDC_ACM if MODULE_USBUS default MODULE_STDIO_TINYUSB_CDC_ACM if MODULE_TINYUSB_DEVICE - default MODULE_STDIO_USB_SERIAL_JTAG if !MODULE_USBUS && !MODULE_TINYUSB_DEVICE + default MODULE_STDIO_USB_SERIAL_JTAG endchoice source "$(RIOTBOARD)/common/esp32s3/Kconfig" diff --git a/boards/feather-m0/Makefile.features b/boards/feather-m0/Makefile.features index ec234d82968c..dcfbbf7224ed 100644 --- a/boards/feather-m0/Makefile.features +++ b/boards/feather-m0/Makefile.features @@ -15,9 +15,3 @@ FEATURES_PROVIDED += periph_usbdev # Put other features for this board (in alphabetical order) FEATURES_PROVIDED += arduino FEATURES_PROVIDED += highlevel_stdio - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/feather-nrf52840/Kconfig b/boards/feather-nrf52840/Kconfig index e2f22a10a0c4..ed1fe0567836 100644 --- a/boards/feather-nrf52840/Kconfig +++ b/boards/feather-nrf52840/Kconfig @@ -19,5 +19,9 @@ config BOARD_FEATHER_NRF52840 select HAS_HIGHLEVEL_STDIO select HAVE_SAUL_GPIO + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/feather-nrf52840/Makefile.features b/boards/feather-nrf52840/Makefile.features index eb54e9cce9d9..1f4969f6d974 100644 --- a/boards/feather-nrf52840/Makefile.features +++ b/boards/feather-nrf52840/Makefile.features @@ -9,10 +9,4 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/nrf52840-mdk-dongle/Kconfig b/boards/nrf52840-mdk-dongle/Kconfig index e8eef0a2a546..711095b76231 100644 --- a/boards/nrf52840-mdk-dongle/Kconfig +++ b/boards/nrf52840-mdk-dongle/Kconfig @@ -19,5 +19,9 @@ config BOARD_NRF52840_MDK_DONGLE select HAVE_SAUL_GPIO select HAVE_SAUL_PWM + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/nrf52840-mdk-dongle/Makefile.features b/boards/nrf52840-mdk-dongle/Makefile.features index d84ce78dc5fd..bd678939fe05 100644 --- a/boards/nrf52840-mdk-dongle/Makefile.features +++ b/boards/nrf52840-mdk-dongle/Makefile.features @@ -8,10 +8,4 @@ FEATURES_PROVIDED += periph_usbdev # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/nrf52840dongle/Kconfig b/boards/nrf52840dongle/Kconfig index 69263b58f41c..5539172c9db7 100644 --- a/boards/nrf52840dongle/Kconfig +++ b/boards/nrf52840dongle/Kconfig @@ -25,4 +25,9 @@ config BOARD_NRF52840DONGLE select HAVE_SAUL_PWM select HAVE_SAUL_NRF_VDDH + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/nrf52/Kconfig" diff --git a/boards/nrf52840dongle/Makefile.features b/boards/nrf52840dongle/Makefile.features index 4e5af160fbbd..c50288397a6d 100644 --- a/boards/nrf52840dongle/Makefile.features +++ b/boards/nrf52840dongle/Makefile.features @@ -12,10 +12,4 @@ FEATURES_PROVIDED += vdd_lc_filter_reg1 # Various other features (if any) FEATURES_PROVIDED += highlevel_stdio -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1,$(TEST_KCONFIG)) - KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config -endif - include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/seeedstudio-gd32/Kconfig b/boards/seeedstudio-gd32/Kconfig index 735921f1fd66..dd1da6338df7 100644 --- a/boards/seeedstudio-gd32/Kconfig +++ b/boards/seeedstudio-gd32/Kconfig @@ -28,13 +28,11 @@ config BOARD_SEEEDSTUDIO_GD32 select HAVE_MTD_SDCARD_DEFAULT select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT - select MODULE_USBUS if TEST_KCONFIG && !PACKAGE_TINYUSB - select MODULE_USBUS_CDC_ACM if MODULE_USBUS - select MODULE_USB_BOARD_RESET if MODULE_USBUS_CDC_ACM || MODULE_TINYUSB_CLASS_CDC -choice STDIO_IMPLEMENTATION - default MODULE_STDIO_CDC_ACM if MODULE_USBUS - default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB -endchoice + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + + +config FORCE_USB_STDIO + default y source "$(RIOTBOARD)/common/gd32v/Kconfig" diff --git a/boards/seeeduino_xiao/Makefile.features b/boards/seeeduino_xiao/Makefile.features index bc86e9670f5d..0cc841b65bb1 100644 --- a/boards/seeeduino_xiao/Makefile.features +++ b/boards/seeeduino_xiao/Makefile.features @@ -11,9 +11,3 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/sensebox_samd21/Makefile.features b/boards/sensebox_samd21/Makefile.features index 1d7ed3da30ad..7135d3186d53 100644 --- a/boards/sensebox_samd21/Makefile.features +++ b/boards/sensebox_samd21/Makefile.features @@ -14,9 +14,3 @@ FEATURES_PROVIDED += periph_usbdev # Put other features for this board (in alphabetical order) FEATURES_PROVIDED += highlevel_stdio FEATURES_PROVIDED += sdcard_spi - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/serpente/Makefile.features b/boards/serpente/Makefile.features index 11c23db01a4d..ec13b2408e85 100644 --- a/boards/serpente/Makefile.features +++ b/boards/serpente/Makefile.features @@ -12,9 +12,3 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/sipeed-longan-nano/Kconfig b/boards/sipeed-longan-nano/Kconfig index 37dafc3d479a..5a648cc41760 100644 --- a/boards/sipeed-longan-nano/Kconfig +++ b/boards/sipeed-longan-nano/Kconfig @@ -29,9 +29,10 @@ config BOARD_SIPEED_LONGAN_NANO select HAVE_MTD_SDCARD_DEFAULT select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT - select MODULE_USBUS if TEST_KCONFIG && !PACKAGE_TINYUSB - select MODULE_USBUS_CDC_ACM if MODULE_USBUS - select MODULE_USB_BOARD_RESET if MODULE_USBUS_CDC_ACM || MODULE_TINYUSB_CLASS_CDC + select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG + +config FORCE_USB_STDIO + default y menu "Sipeed Longan Nano Board Configuration" @@ -42,9 +43,4 @@ menu "Sipeed Longan Nano Board Configuration" endmenu -choice STDIO_IMPLEMENTATION - default MODULE_STDIO_CDC_ACM if MODULE_USBUS - default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB -endchoice - source "$(RIOTBOARD)/common/gd32v/Kconfig" diff --git a/boards/stm32f429i-disco/Kconfig b/boards/stm32f429i-disco/Kconfig index 48766e524234..a782370a8a8f 100644 --- a/boards/stm32f429i-disco/Kconfig +++ b/boards/stm32f429i-disco/Kconfig @@ -16,5 +16,8 @@ config BOARD_STM32F429I_DISCO # Put other features for this board (in alphabetical order) select HAS_HIGHLEVEL_STDIO +config FORCE_USB_STDIO + default y + source "$(RIOTBOARD)/common/stm32/Kconfig" source "$(RIOTBOARD)/stm32f429i-disc1/Kconfig" diff --git a/boards/stm32f429i-disco/stm32f429i-disco.config b/boards/stm32f429i-disco/stm32f429i-disco.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/stm32f429i-disco/stm32f429i-disco.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/boards/stm32f4discovery/Kconfig b/boards/stm32f4discovery/Kconfig index e405c8b46fdb..ad6d78d76d7b 100644 --- a/boards/stm32f4discovery/Kconfig +++ b/boards/stm32f4discovery/Kconfig @@ -35,13 +35,8 @@ config BOARD_STM32F4DISCOVERY select HAVE_SAUL_GPIO - select MODULE_USBUS if TEST_KCONFIG && !PACKAGE_TINYUSB - select MODULE_USBUS_CDC_ACM if TEST_KCONFIG && !PACKAGE_TINYUSB - -choice STDIO_IMPLEMENTATION - default MODULE_STDIO_CDC_ACM if MODULE_USBUS - default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB -endchoice +config FORCE_USB_STDIO + default y source "$(RIOTBOARD)/common/stm32/Kconfig" diff --git a/boards/wemos-zero/Makefile.features b/boards/wemos-zero/Makefile.features index d3731ea2e96b..2dbb57c78752 100644 --- a/boards/wemos-zero/Makefile.features +++ b/boards/wemos-zero/Makefile.features @@ -1,9 +1,3 @@ include $(RIOTBOARD)/common/arduino-zero/Makefile.features FEATURES_PROVIDED += highlevel_stdio - -# This configuration enables modules that are only available when using Kconfig -# module modelling -ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config -endif diff --git a/boards/yarm/Kconfig b/boards/yarm/Kconfig index 511347586de4..050a6f57ec8a 100644 --- a/boards/yarm/Kconfig +++ b/boards/yarm/Kconfig @@ -21,3 +21,6 @@ config BOARD_YARM select HAS_PERIPH_UART select HAS_PERIPH_USBDEV select HAS_RIOTBOOT + +config FORCE_USB_STDIO + default y diff --git a/boards/yarm/yarm.config b/boards/yarm/yarm.config deleted file mode 100644 index 7699f35a5c02..000000000000 --- a/boards/yarm/yarm.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_MODULE_USBUS=y -CONFIG_MODULE_USBUS_CDC_ACM=y -CONFIG_MODULE_STDIO_CDC_ACM=y diff --git a/cpu/esp32/Kconfig b/cpu/esp32/Kconfig index 06598dc83503..97cbf9da06ff 100644 --- a/cpu/esp32/Kconfig +++ b/cpu/esp32/Kconfig @@ -94,5 +94,6 @@ rsource "Kconfig.esp32" rsource "Kconfig.esp32c3" rsource "Kconfig.esp32s3" rsource "Kconfig.esp32s2" +rsource "stdio_usb_serial_jtag/Kconfig" source "$(RIOTCPU)/esp_common/Kconfig" diff --git a/cpu/esp32/Makefile.dep b/cpu/esp32/Makefile.dep index 18bc4421ad97..09521bd84569 100644 --- a/cpu/esp32/Makefile.dep +++ b/cpu/esp32/Makefile.dep @@ -188,6 +188,4 @@ endif # enable bootloader reset over USB, requires CDC ACM to be used ifneq (,$(filter usbus_cdc_acm tinyusb_class_cdc,$(USEMODULE))) USEMODULE += usb_board_reset - - include $(RIOTMAKE)/tools/usb_board_reset.mk endif diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index be081ccd77cd..91d57a0d4ff7 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -3,6 +3,10 @@ FLASH_CHIP = $(CPU_FAM) export ESP32_SDK_DIR ?= $(PKGDIRBASE)/esp32_sdk +ifneq (,$(filter usb_board_reset,$(USEMODULE))) + include $(RIOTMAKE)/tools/usb_board_reset.mk +endif + # Serial flasher config as used by the ESP-IDF, be careful when overriding them. # They have to be exported to use same values in subsequent makefiles. ifeq (esp32,$(CPU_FAM)) diff --git a/cpu/esp32/stdio_usb_serial_jtag/Kconfig b/cpu/esp32/stdio_usb_serial_jtag/Kconfig new file mode 100644 index 000000000000..8965c6aa5be4 --- /dev/null +++ b/cpu/esp32/stdio_usb_serial_jtag/Kconfig @@ -0,0 +1,9 @@ +choice STDIO_IMPLEMENTATION + +config MODULE_STDIO_USB_SERIAL_JTAG + bool "STDIO via ESP32 Debug USB Serial/JTAG interface" + depends on TEST_KCONFIG + depends on CPU_FAM_ESP32C3 || CPU_FAM_ESP32S3 + select MODULE_TSRB + +endchoice diff --git a/dist/tools/kconfiglib/Makefile b/dist/tools/kconfiglib/Makefile index 300bd8fe5107..b69c60e67fd8 100644 --- a/dist/tools/kconfiglib/Makefile +++ b/dist/tools/kconfiglib/Makefile @@ -1,6 +1,6 @@ PKG_NAME=kconfiglib -PKG_URL=https://github.com/ulfalizer/Kconfiglib -PKG_VERSION=061e71f7d78cb057762d88de088055361863deff +PKG_URL=https://github.com/RIOT-OS/Kconfiglib +PKG_VERSION=110688d78edba9fa7eb09cbe001c62fbbee86abf PKG_LICENSE=ISC include $(RIOTBASE)/pkg/pkg.mk diff --git a/pkg/tinyusb/Kconfig b/pkg/tinyusb/Kconfig index daa10a765e84..22bf0bf29ac4 100644 --- a/pkg/tinyusb/Kconfig +++ b/pkg/tinyusb/Kconfig @@ -15,6 +15,20 @@ config HAS_TINYUSB_HOST help Indicates that the hardware supports tinyUSB host stack +config REQUIRES_TINYUSB_DEVICE + bool + help + Indicates that the application requires tinyUSB stack + +config ERROR_TINYUSB_DEVICE + bool + default y if REQUIRES_TINYUSB_DEVICE && !MODULE_TINYUSB_DEVICE + help + The USB implmentation is required to be tinyUSB but cannot be set + +choice USB_IMPLEMENTATION + default PACKAGE_TINYUSB if REQUIRES_TINYUSB_DEVICE + menuconfig PACKAGE_TINYUSB bool "TinyUSB stack package" depends on TEST_KCONFIG @@ -117,6 +131,7 @@ config MODULE_TINYUSB_HW config MODULE_TINYUSB_DEVICE bool "Device Stack" depends on HAS_TINYUSB_DEVICE + select MODULE_TINYUSB_CLASS_CDC if REQUIRES_USB_STDIO default y help Select to enable tinyUSB device stack @@ -242,4 +257,6 @@ config MODULE_RIOTBOOT_TINYUSB_DFU endif # MODULE_TINYUSB_DEVICE endif # PACKAGE_TINYUSB +endchoice + rsource "cdc_acm_stdio/Kconfig" diff --git a/pkg/tinyusb/cdc_acm_stdio/Kconfig b/pkg/tinyusb/cdc_acm_stdio/Kconfig index 3b61bd990b47..b25cf791e54b 100644 --- a/pkg/tinyusb/cdc_acm_stdio/Kconfig +++ b/pkg/tinyusb/cdc_acm_stdio/Kconfig @@ -12,7 +12,7 @@ choice STDIO_IMPLEMENTATION config MODULE_STDIO_TINYUSB_CDC_ACM bool "CDC ACM (tinyUSB)" depends on MODULE_TINYUSB_DEVICE + depends on MODULE_TINYUSB_CLASS_CDC select MODULE_STDIO_AVAILABLE - select MODULE_TINYUSB_CLASS_CDC endchoice diff --git a/pkg/tinyusb/netdev/Kconfig b/pkg/tinyusb/netdev/Kconfig index b163156dc23f..77a73c1694f4 100644 --- a/pkg/tinyusb/netdev/Kconfig +++ b/pkg/tinyusb/netdev/Kconfig @@ -12,5 +12,5 @@ config MODULE_TINYUSB_NETDEV select MODULE_LUID select MODULE_NETDEV_ETH select MODULE_TINYUSB_CLASS_NET - select MODULE_TINYUSB_DEVICE - select PACKAGE_TINYUSB + select KCONFIG_USB + select REQUIRES_TINYUSB_DEVICE diff --git a/sys/Kconfig.stdio b/sys/Kconfig.stdio index 7ee523cb71de..d460041cb6ba 100644 --- a/sys/Kconfig.stdio +++ b/sys/Kconfig.stdio @@ -8,9 +8,20 @@ menu "Standard Input/Output (STDIO)" depends on TEST_KCONFIG +config FORCE_USB_STDIO + bool "Force a USB based STDIO" + depends on HAS_PERIPH_USBDEV || HAS_TINYUSB_DEVICE + select KCONFIG_USB + select REQUIRES_USB_STDIO + help + To prevent a circular dependency, can force the USB modules to that + STDIO will select some sort of USB based STDIO backend. + choice STDIO_IMPLEMENTATION bool "STDIO implementation" default MODULE_STDIO_NATIVE if CPU_ARCH_NATIVE + default MODULE_STDIO_CDC_ACM if MODULE_USBUS && REQUIRES_USB_STDIO + default MODULE_STDIO_TINYUSB_CDC_ACM if MODULE_TINYUSB_DEVICE && REQUIRES_USB_STDIO default MODULE_STDIO_UART config MODULE_STDIO_RTT @@ -49,12 +60,6 @@ config MODULE_STDIO_ETHOS select MODULE_ETHOS_STDIO select USE_STDOUT_BUFFERED -config MODULE_STDIO_USB_SERIAL_JTAG - bool "STDIO via ESP32 Debug USB Serial/JTAG interface" - depends on TEST_KCONFIG - depends on CPU_FAM_ESP32C3 || CPU_FAM_ESP32S3 - select MODULE_TSRB - endchoice config MODULE_STDIN @@ -91,4 +96,9 @@ config USE_STDOUT_BUFFERED help Select this to prefer buffered standard output if provided by the implementation. +config REQUIRES_USB_STDIO + bool + help + Indicates that the STDIO requires some USB implementation to be enabled. + endmenu # Standard Input/Output (STDIO) diff --git a/sys/include/usb.h b/sys/include/usb.h index da96abac4c35..2706d2ec359e 100644 --- a/sys/include/usb.h +++ b/sys/include/usb.h @@ -53,7 +53,15 @@ extern "C" { #error Please configure your vendor and product IDs. For development, you may \ set USB_VID=${USB_VID_TESTING} USB_PID=${USB_PID_TESTING}. #endif +#else +#if CONFIG_USB_VID == INTERNAL_PERIPHERAL_VID && \ + CONFIG_USB_PID == INTERNAL_PERIPHERAL_PID +#error Please configure your vendor and product IDs differently than the \ + INTERNAL_PERIPHERAL_* settings. For development, you may set \ + USB_VID=${USB_VID_TESTING} \ + USB_PID=${USB_PID_TESTING}. #endif +#endif /* !(defined(CONFIG_USB_VID) && defined(CONFIG_USB_PID)) */ /** * @brief USB peripheral device vendor ID diff --git a/sys/include/usb/usbus.h b/sys/include/usb/usbus.h index 7a142b9fdc4c..d772314df4ca 100644 --- a/sys/include/usb/usbus.h +++ b/sys/include/usb/usbus.h @@ -68,7 +68,8 @@ extern "C" { * that the USB peripheral is ready for use. */ #ifndef CONFIG_USBUS_AUTO_ATTACH -#if !IS_ACTIVE(KCONFIG_MODULE_USBUS) +/* Check for Kconfig usage */ +#if !IS_ACTIVE(CONFIG_MODULE_USBUS) #define CONFIG_USBUS_AUTO_ATTACH 1 #endif #endif diff --git a/sys/usb/Kconfig b/sys/usb/Kconfig index 20c665e605b7..4899043ca35f 100644 --- a/sys/usb/Kconfig +++ b/sys/usb/Kconfig @@ -5,13 +5,24 @@ # directory for more details. # menuconfig KCONFIG_USB - bool "Configure USB" - depends on MODULE_USBUS || PACKAGE_TINYUSB + bool "USB device" + depends on HAS_PERIPH_USBDEV || HAS_TINYUSB_DEVICE || MODULE_USBDEV_MOCK + depends on TEST_KCONFIG help - Configure the USB peripheral via Kconfig. + Enable the USB device peripheral. + if KCONFIG_USB +choice USB_IMPLEMENTATION + bool "USB implementation" + help + Select the USB implementation. + +endchoice + +rsource "usbus/Kconfig" + menu "Power management" config USB_MAX_POWER @@ -42,16 +53,26 @@ config USB_SPEC_BCDVERSION_1_1 endchoice +config CUSTOM_USB_VID_PID + bool "Use custom VID and PID" + help + If using in USB in application then one must set a VID and PID. + If RIOT is internally using the USB, say for STDIO, then the VID and + PID depending in the internal peripheral configuration used. + config USB_PID hex "Product ID" + depends on CUSTOM_USB_VID_PID range 0x0000 0xFFFF - default 0x7D01 + # default 0x7002 if MODULE_RIOTBOOT_DFU + default 0x7001 help You must provide your own PID. config USB_VID hex "Vendor ID" range 0x0000 0xFFFF + depends on CUSTOM_USB_VID_PID default 0x1209 help You must provide your own VID. @@ -109,5 +130,3 @@ comment "WARNING: The serial string is empty!" depends on USB_SERIAL_STR = "" && USB_CUSTOM_SERIAL_STR endif # KCONFIG_USB - -rsource "usbus/Kconfig" diff --git a/sys/usb/usbus/Kconfig b/sys/usb/usbus/Kconfig index 89330ad772d1..7fcf93cea0a4 100644 --- a/sys/usb/usbus/Kconfig +++ b/sys/usb/usbus/Kconfig @@ -4,6 +4,7 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # +choice USB_IMPLEMENTATION menuconfig MODULE_USBUS bool "USB Unified Stack (USBUS)" @@ -13,8 +14,11 @@ menuconfig MODULE_USBUS select MODULE_EVENT select MODULE_LUID select MODULE_FMT + select MODULE_USBUS_CDC_ACM if REQUIRES_USB_STDIO select MODULE_PERIPH_USBDEV if HAS_PERIPH_USBDEV && !MODULE_USBDEV_MOCK +endchoice + if MODULE_USBUS config MODULE_AUTO_INIT_USBUS @@ -31,7 +35,7 @@ menuconfig KCONFIG_USEMODULE_USBUS help Configure the USBUS module via Kconfig. -if KCONFIG_USEMODULE_USBUS +if KCONFIG_USEMODULE_USBUS || MODULE_USBUS config USBUS_AUTO_ATTACH bool "Auto attach" @@ -63,7 +67,7 @@ config USBUS_EP0_SIZE_64 endchoice -endif # KCONFIG_USEMODULE_USBUS +endif # KCONFIG_USEMODULE_USBUS || MODULE_USBUS rsource "cdc/Kconfig" rsource "dfu/Kconfig" diff --git a/sys/usb/usbus/cdc/acm/Kconfig b/sys/usb/usbus/cdc/acm/Kconfig index f99a68adc3a4..524e4b9cb141 100644 --- a/sys/usb/usbus/cdc/acm/Kconfig +++ b/sys/usb/usbus/cdc/acm/Kconfig @@ -11,13 +11,19 @@ menuconfig KCONFIG_USEMODULE_USBUS_CDC_ACM help Configure the USBUS CDC ACM module via Kconfig. -if KCONFIG_USEMODULE_USBUS_CDC_ACM +menuconfig MODULE_USBUS_CDC_ACM + bool "Configure USBUS CDC ACM" + depends on MODULE_USBUS + help + Configure the USBUS CDC ACM module via Kconfig. + +if MODULE_USBUS_CDC_ACM || KCONFIG_USEMODULE_USBUS_CDC_ACM config USBUS_CDC_ACM_STDIO_BUF_SIZE_EXP int "Buffer size for STDIN and STDOUT data (as exponent of 2^n)" + depends on USEMODULE_STDIO_CDC_ACM || MODULE_STDIO_CDC_ACM default 7 range 0 31 - depends on USEMODULE_STDIO_CDC_ACM help As buffer size ALWAYS needs to be power of two, this changes this option represents the exponent of 2^n, which will be used as the size of the @@ -44,18 +50,14 @@ config USBUS_CDC_ACM_BULK_EP_SIZE_64 endchoice -endif # KCONFIG_USEMODULE_USBUS_CDC_ACM - -config MODULE_USBUS_CDC_ACM - bool "USB CDC ACM support" - depends on MODULE_USBUS - select MODULE_TSRB +endif # MODULE_USBUS_CDC_ACM # extend STDIO options choice STDIO_IMPLEMENTATION config MODULE_STDIO_CDC_ACM bool "CDC ACM" + depends on MODULE_USBUS || KCONFIG_USEMODULE_USBUS depends on MODULE_USBUS_CDC_ACM && !MODULE_TINYUSB_DEVICE select MODULE_ISRPIPE select MODULE_STDIO_AVAILABLE diff --git a/sys/usb/usbus/cdc/ecm/Kconfig b/sys/usb/usbus/cdc/ecm/Kconfig index 90b34830f851..de2fc59b23c3 100644 --- a/sys/usb/usbus/cdc/ecm/Kconfig +++ b/sys/usb/usbus/cdc/ecm/Kconfig @@ -11,7 +11,13 @@ menuconfig KCONFIG_USEMODULE_USBUS_CDC_ECM help Configure the USBUS CDC ECM module via Kconfig. -if KCONFIG_USEMODULE_USBUS_CDC_ECM +menuconfig MODULE_USBUS_CDC_ECM + bool "Configure USBUS CDC ECM" + depends on MODULE_USBUS + help + Configure the USBUS CDC ECM module via Kconfig. + +if KCONFIG_USEMODULE_USBUS_CDC_ECM || MODULE_USBUS_CDC_ECM config USBUS_CDC_ECM_CONFIG_SPEED_IND bool "Configure upload and download speeds independently" @@ -41,4 +47,4 @@ config USBUS_CDC_ECM_CONFIG_SPEED_UPSTREAM This is the link upload speed, defined in bits/second, that the USB peripheral will report to the host. -endif # KCONFIG_USEMODULE_USBUS_CDC_ECM +endif # KCONFIG_USEMODULE_USBUS_CDC_ECM || MODULE_USBUS_CDC_ECM diff --git a/sys/usb/usbus/dfu/Kconfig b/sys/usb/usbus/dfu/Kconfig index ee67fa04e6b5..34c8e0e45713 100644 --- a/sys/usb/usbus/dfu/Kconfig +++ b/sys/usb/usbus/dfu/Kconfig @@ -9,10 +9,14 @@ menuconfig KCONFIG_USEMODULE_USBUS_DFU bool "Configure USBUS DFU" depends on USEMODULE_USBUS_DFU depends on KCONFIG_USEMODULE_USBUS + +menuconfig MODULE_USBUS_DFU + bool "Configure USBUS DFU" + depends on MODULE_USBUS help Configure the USBUS DFU module via Kconfig. -if KCONFIG_USEMODULE_USBUS_DFU +if KCONFIG_USEMODULE_USBUS_DFU || MODULE_USBUS_DFU config USB_DFU_DETACH_TIMEOUT_MS int @@ -33,4 +37,4 @@ config RIOTBOOT_MAGIC_ADDR int "DFU magic address" depends on CUSTOM_RIOTBOOT_MAGIC_ADDR -endif # KCONFIG_USEMODULE_USBUS_DFU +endif # KCONFIG_USEMODULE_USBUS_DFU || MODULE_USBUS_DFU diff --git a/sys/usb/usbus/hid/Kconfig b/sys/usb/usbus/hid/Kconfig index 2639a1bfdf72..6a004280b450 100644 --- a/sys/usb/usbus/hid/Kconfig +++ b/sys/usb/usbus/hid/Kconfig @@ -7,7 +7,6 @@ menuconfig MODULE_USBUS_HID bool "USB HID support" - depends on TEST_KCONFIG depends on MODULE_USBUS select MODULE_ISRPIPE_READ_TIMEOUT diff --git a/tests/pkg/tinyusb_cdc_acm_stdio/app.config.test b/tests/pkg/tinyusb_cdc_acm_stdio/app.config.test index a606785cb959..5808de9f5efc 100644 --- a/tests/pkg/tinyusb_cdc_acm_stdio/app.config.test +++ b/tests/pkg/tinyusb_cdc_acm_stdio/app.config.test @@ -1,5 +1,9 @@ CONFIG_PACKAGE_TINYUSB=y +CONFIG_KCONFIG_USB=y +CONFIG_MODULE_TINYUSB_CLASS_CDC=y CONFIG_MODULE_STDIO_TINYUSB_CDC_ACM=y CONFIG_MODULE_SHELL=y CONFIG_MODULE_SHELL_CMDS_DEFAULT=y CONFIG_MODULE_PS=y + +CONFIG_CUSTOM_USB_VID_PID=y diff --git a/tests/pkg/tinyusb_cdc_msc/app.config.test b/tests/pkg/tinyusb_cdc_msc/app.config.test index e005a5990df7..061852be1389 100644 --- a/tests/pkg/tinyusb_cdc_msc/app.config.test +++ b/tests/pkg/tinyusb_cdc_msc/app.config.test @@ -1,3 +1,6 @@ +CONFIG_KCONFIG_USB=y CONFIG_PACKAGE_TINYUSB=y CONFIG_MODULE_TINYUSB_CLASS_CDC=y CONFIG_MODULE_TINYUSB_CLASS_MSC=y + +CONFIG_CUSTOM_USB_VID_PID=y diff --git a/tests/sys/fido2_ctap/app.config.test b/tests/sys/fido2_ctap/app.config.test index df5e7e4f8d85..8667a0d2829a 100644 --- a/tests/sys/fido2_ctap/app.config.test +++ b/tests/sys/fido2_ctap/app.config.test @@ -1,4 +1,5 @@ CONFIG_MODULE_AUTO_INIT_USBUS=n +CONFIG_KCONFIG_USB=y CONFIG_MODULE_USBUS=y CONFIG_MODULE_FIDO2=y CONFIG_MODULE_FIDO2_CTAP=y @@ -6,3 +7,5 @@ CONFIG_MODULE_FIDO2_CTAP_TRANSPORT=y CONFIG_MODULE_FIDO2_CTAP_TRANSPORT_HID=y CONFIG_PACKAGE_FIDO2_TESTS=y + +CONFIG_CUSTOM_USB_VID_PID=y diff --git a/tests/sys/usbus_board_reset/app.config.test b/tests/sys/usbus_board_reset/app.config.test index 6c05ac62020c..ffe94ad435dd 100644 --- a/tests/sys/usbus_board_reset/app.config.test +++ b/tests/sys/usbus_board_reset/app.config.test @@ -3,7 +3,10 @@ CONFIG_MODULE_PS=y CONFIG_MODULE_SHELL=y CONFIG_MODULE_SHELL_CMDS_DEFAULT=y CONFIG_MODULE_USB_BOARD_RESET=y +CONFIG_KCONFIG_USB=y CONFIG_MODULE_USBUS=y CONFIG_MODULE_USBUS_CDC_ACM=y CONFIG_MODULE_AUTO_INIT_USBUS=n + +CONFIG_CUSTOM_USB_VID_PID=y diff --git a/tests/sys/usbus_msc/app.config.test b/tests/sys/usbus_msc/app.config.test index 10fd414cc870..42d1dfb4c580 100644 --- a/tests/sys/usbus_msc/app.config.test +++ b/tests/sys/usbus_msc/app.config.test @@ -1,5 +1,9 @@ CONFIG_MODULE_PS=y CONFIG_MODULE_SHELL=y +CONFIG_KCONFIG_USB=y CONFIG_MODULE_USBUS=y CONFIG_MODULE_USBUS_MSC=y +CONFIG_MODULE_ZTIMER=y CONFIG_MODULE_ZTIMER_MSEC=y + +CONFIG_CUSTOM_USB_VID_PID=y