Skip to content

Commit

Permalink
boards/*: Model usb and stdio in Kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevinWeiss committed May 30, 2023
1 parent e78ad87 commit 6eee81c
Show file tree
Hide file tree
Showing 47 changed files with 82 additions and 165 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 6eee81c

Please sign in to comment.