diff --git a/boards/adafruit-clue/Kconfig b/boards/adafruit-clue/Kconfig index 5ea737ffc8f37..2cb2a8c111b09 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 eb54e9cce9d94..1f4969f6d974b 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 ee75dabcbb6e3..9f48a1e4c3a94 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 15fbaf6a0eecc..09c1ca52e1fa5 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 eb54e9cce9d94..1f4969f6d974b 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 158745995b65b..f48a0a24da7d9 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 745540b6c3424..18aeab747898c 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 eb54e9cce9d94..1f4969f6d974b 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 514af71c57f65..c43f111ff1873 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 487049367d122..2d19213890c4e 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 7699f35a5c02d..0000000000000 --- 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 28198b7ee4526..bafca351a20f2 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 7699f35a5c02d..0000000000000 --- 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 6e331ef2007f0..482c27e2bab37 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 7699f35a5c02d..0000000000000 --- 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 d5fcd388217a2..9888bd0a69f08 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 a3ee03b3ef12c..0000000000000 --- 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 55cda8499a5a0..551f9f93126eb 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 98a4aaa362a97..f8ac8aa3c3393 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 9d366892756d5..da62743e3674d 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 7699f35a5c02d..0000000000000 --- 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 b4d487327df20..4f6613e8d75c6 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 3b5e04e42eac4..46fc01fcd7197 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 2d76798de1dbe..d7a295b937dae 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 10b9ba3be94ca..e4c820fa4998f 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 d15b72edd72d9..e26e13471f811 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 72f596ee83507..71bddcca56e20 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 ec234d82968cb..dcfbbf7224ed2 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 e2f22a10a0c44..ed1fe05678363 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 eb54e9cce9d94..1f4969f6d974b 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 e8eef0a2a5467..711095b76231d 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 d84ce78dc5fd5..bd678939fe05c 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 69263b58f41c9..5539172c9db73 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 4e5af160fbbdd..c50288397a6db 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 735921f1fd66b..dd1da6338df7d 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 bc86e9670f5d9..0cc841b65bb1f 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 1d7ed3da30ad7..7135d3186d53b 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 11c23db01a4d0..ec13b2408e850 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 37dafc3d479aa..10a501b8e3916 100644 --- a/boards/sipeed-longan-nano/Kconfig +++ b/boards/sipeed-longan-nano/Kconfig @@ -29,9 +29,13 @@ 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 + +config FORCE_USB_STDIO + default y + +choice USB_IMPLEMENTATION + default PACKAGE_TINYUSB +endchoice menu "Sipeed Longan Nano Board Configuration" @@ -42,9 +46,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 48766e5242344..a782370a8a8fb 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 7699f35a5c02d..0000000000000 --- 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 e405c8b46fdb1..ad6d78d76d7bd 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 d3731ea2e96b6..2dbb57c787524 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 511347586de4c..050a6f57ec8ac 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 7699f35a5c02d..0000000000000 --- 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/Makefile.dep b/cpu/esp32/Makefile.dep index 18bc4421ad97c..09521bd845690 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 be081ccd77cd0..91d57a0d4ff7a 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))