diff --git a/boards/adafruit-clue/Kconfig b/boards/adafruit-clue/Kconfig index 5ea737ffc8..2cb2a8c111 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 eb54e9cce9..1f4969f6d9 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 ee75dabcbb..9f48a1e4c3 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 15fbaf6a0e..09c1ca52e1 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 eb54e9cce9..1f4969f6d9 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 158745995b..f48a0a24da 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 745540b6c3..18aeab7478 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 eb54e9cce9..1f4969f6d9 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 514af71c57..c43f111ff1 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 487049367d..2d19213890 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 7699f35a5c..0000000000 --- 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 28198b7ee4..bafca351a2 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 7699f35a5c..0000000000 --- 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 6e331ef200..482c27e2ba 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 7699f35a5c..0000000000 --- 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 d5fcd38821..9888bd0a69 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 a3ee03b3ef..0000000000 --- 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 55cda8499a..551f9f9312 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 98a4aaa362..f8ac8aa3c3 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 9d36689275..da62743e36 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 7699f35a5c..0000000000 --- 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 b4d487327d..4f6613e8d7 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 3b5e04e42e..46fc01fcd7 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 2d76798de1..d7a295b937 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 10b9ba3be9..e4c820fa49 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 d15b72edd7..e26e13471f 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 72f596ee83..71bddcca56 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 ec234d8296..dcfbbf7224 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 e2f22a10a0..ed1fe05678 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 eb54e9cce9..1f4969f6d9 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 e8eef0a2a5..711095b762 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 d84ce78dc5..bd678939fe 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 69263b58f4..5539172c9d 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 4e5af160fb..c50288397a 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 735921f1fd..dd1da6338d 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 bc86e9670f..0cc841b65b 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 1d7ed3da30..7135d3186d 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 11c23db01a..ec13b2408e 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 37dafc3d47..5a648cc417 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 48766e5242..a782370a8a 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 7699f35a5c..0000000000 --- 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 e405c8b46f..ad6d78d76d 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 d3731ea2e9..2dbb57c787 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 511347586d..050a6f57ec 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 7699f35a5c..0000000000 --- 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 18bc4421ad..09521bd845 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 be081ccd77..91d57a0d4f 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))