Skip to content

Commit

Permalink
Merge #19086 #19672
Browse files Browse the repository at this point in the history
19086: Remodel the USB in Kconfig r=aabadie a=MrKevinWeiss

### Contribution description

#### The issues with current architecture
Generally there has been some confusion on how to manage KConfig with respect to the board selection of default STDIO backends, specifically for boards that require a USB based backend as there are possible stacks to use.

The `<BOARD>.config` way of selecting cannot handle conditional selects.

The issues is more with boards such as `esp32s2-wemos-mini`, currently some USB stack will be selected regardless of overridding the preferred STDIO.

Selecting a USB stack directly with `STDIO_USB*` creates some circular dependency issues with kconfig and is hard to manage.

We also have a mutually exclusive USB stacks, TINYUSB or USBUS which should probably be a choice.


#### Desired behaviour

1. Ideally we want a board to default to the most obvious STDIO implementation, for example, if I have nucleo, it uses a UART, for some ESPs, USB is the default way to communicate.

2. These backends could always be overridden though, for example, I may just connect directly to a UART and want my STDIO there, or maybe use a ble based STDIO.

3. The next condition would be specifically for boards with a USB based STDIO.  Since we have a TINYUSB stack and a USBUS stack we would want to use the associated STDIO depending on the stack the application selects.

4. However, if nothing is selected by the application, than bring in a USB stack (board based preference) unless there is a specific non-USB based STDIO is selected. For these boards that have this requirement, we DO NOT want to bring in the USB stack if the STDIO is specifically overridden (important for kconfig).

#### Update kconfiglib package to RIOT-OS org managed one

There is a problem with the upstreamed Kconfiglib implementation and the maintainer is not responsive to the fix.  The issue is to do with `menuconfig`s in choices and has been fixed with the RIOT-OS based fork.  This PR requires this fix.


#### Changes to the USB stack

A new entry point is introduced `USB_DEVICE` which indicates wanting a USB device but not caring which stack is used.  This allows making a `choice` between the `TINYUSB` and `USBUS` stack allowing mutual exclusivity.

Making the USB stack a `choice` means that a specific stack cannot be selected from non-board/non-cpu/non-application based symbols.  Thus the `REQUIRES_` design pattern is used for a module to indicate a specific stack should be selected.  This is needed for the `MODULE_TINYUSB_NETDEV` in this case.

#### Changes to USB STDIO implementations

The `MODULE_STDIO_CDC_ACM` and `MODULE_STDIO_TINYUSB_CDC_ACM` are both depends on now, using a `REQUIRES_USB_STDIO` to select the dependencies.
This means we do not have to use `select PACKAGE_TINYUSB if TEST_KCONFIG && !MODULE_USBUS` in the board select.

##### Why not just select the USB from STDIO_USB
Issue with using select for STDIO choices is that we cannot check which stack we are using to default the STDIO to that, breaking desired behaviour 3.

#### The `FORCE_USB_STDIO`

Desired behaviour 4 means that we do not want to bring in the USB stack if we override, say, to the UART STDIO backend. Due to the limitations of Kconfig, this is my solution to prevent the USB from being brought in if there is an STDIO that doesn't need it. It is only for the `esp32s2-wemos-mini` board and would not be used in other places and would only need to be explicitly disabled for applications requiring different STDIO backend and no USB.  It is not perfect but I think the best solution and fairly understandable...

<details><summary><h4>Issues with Kconfig</h4></summary>

When using a `choice` and having conditional defaults, for example:

```kconfig
choice IMPL
    default FOO if CHOOSE_FOO
    default BAR
```

 there is a limitation of the level of the level of knowledge that can be expected from Kconfig, a limitation on circular dependencies, and a limitation that the dependencies only get resolved once.

For example, if ` BAR` selects something that would eventually select `CHOOSE_FOO`, then the default should be `FOO` and which would no longer select `BAR` preventing the select `CHOOSE_FOO`... Messy stuff and we would want an error saying no no no.

What Kconfig cannot handle is something like:

```kconfig
choice IMPL
    bool "Implementation"
    default FOO if CHOOSE_FOO
    default BAR

config FOO
    bool "Foo"

config BAR
    bool "Bar"

endchoice

config CHOOSE_FOO
    bool

config SYMBOL
    bool
    select CHOOSE_FOO if !BAR
```

`SYMBOL` causes a circular dependency in Kconfig even though the only possible outcome for the `choice` selection would be static.  If we select `BAR` then `CHOOSE_FOO` would not be selected and we stay with `BAR`.  If we select `FOO` than `CHOOSE_FOO` will be selected which stays with `FOO`. Everything should be fine, but isn't because Kconfig does not resolve to that degree, it simply sees that there is a dependency of the `IMPL` choice outcome (ie. `if !BAR`) that is a condition for a dependency of the `IMPL` choice selection (ie. ` if CHOOSE_FOO`).

This is a limitation of the Kconfig what what makes this problem so challenging, with Make we say "select some sort of USB backend if no other stdio is specifically requested" and it will.
</details>


An attempt at remodelling the dependencies of the USB stack in Kconfig.

Currently there are some issues, especially with the integration of TinyUSB package as a backend.
This will require a kconfiglib package fix though...

### Testing procedure

`TEST_KCONFIG=1 BOARD=reel make menuconfig -C examples/hello-world`

### Issues/PRs references

Requires ulfalizer/Kconfiglib#123 to be merged upstream or fork for RIOT
Relates maybe to #18998 and #19038


19672: pkg/micropython: model in Kconfig r=aabadie a=aabadie



Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
  • Loading branch information
3 people authored May 31, 2023
3 parents d742513 + 23b6d0b + c7f1226 commit 784692e
Show file tree
Hide file tree
Showing 72 changed files with 242 additions and 198 deletions.
5 changes: 5 additions & 0 deletions boards/adafruit-clue/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/adafruit-clue/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions boards/adafruit-itsybitsy-m4/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/adafruit-itsybitsy-nrf52/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/adafruit-itsybitsy-nrf52/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions boards/adafruit-pybadge/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/arduino-nano-33-ble/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/arduino-nano-33-ble/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions boards/arduino-nano-33-iot/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions boards/bastwan/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ config BOARD_BASTWAN

select HAVE_SAUL_GPIO
select HAVE_SX1276

config FORCE_USB_STDIO
default y
3 changes: 0 additions & 3 deletions boards/bastwan/bastwan.config

This file was deleted.

3 changes: 3 additions & 0 deletions boards/blackpill-stm32f103cb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions boards/blackpill-stm32f103cb/blackpill-stm32f103cb.config

This file was deleted.

3 changes: 3 additions & 0 deletions boards/bluepill-stm32f103cb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions boards/bluepill-stm32f103cb/bluepill-stm32f103cb.config

This file was deleted.

6 changes: 0 additions & 6 deletions boards/common/arduino-mkr/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions boards/common/nrf52/nrf52_bootloader.config

This file was deleted.

4 changes: 4 additions & 0 deletions boards/common/particle-mesh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ 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
depends on TEST_KCONFIG
help
Common code for particle-mesh boards

config FORCE_USB_STDIO
default y

source "$(RIOTBOARD)/common/nrf52/Kconfig"
6 changes: 0 additions & 6 deletions boards/common/particle-mesh/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions boards/common/samdx1-arduino-bootloader/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

This file was deleted.

6 changes: 0 additions & 6 deletions boards/common/sodaq/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions boards/common/weact-f4x1cx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 0 additions & 3 deletions boards/common/weact-f4x1cx/weact-f4x1cx.config
Original file line number Diff line number Diff line change
@@ -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
9 changes: 3 additions & 6 deletions boards/esp32s2-lilygo-ttgo-t8/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
10 changes: 5 additions & 5 deletions boards/esp32s2-wemos-mini/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions boards/esp32s3-pros3/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/feather-m0/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions boards/feather-nrf52840/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/feather-nrf52840/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions boards/nrf52840-mdk-dongle/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/nrf52840-mdk-dongle/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/nrf52840dongle/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/nrf52840dongle/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 5 additions & 7 deletions boards/seeedstudio-gd32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 0 additions & 6 deletions boards/seeeduino_xiao/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions boards/sensebox_samd21/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions boards/serpente/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 784692e

Please sign in to comment.