1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/*: Model usb and stdio in Kconfig

This commit is contained in:
MrKevinWeiss 2023-04-06 09:24:07 +02:00
parent 7f8bce4a08
commit 92794c0eca
No known key found for this signature in database
GPG Key ID: 4B69974722CBEEAE
47 changed files with 79 additions and 165 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -24,3 +24,6 @@ config BOARD_BASTWAN
select HAVE_SAUL_GPIO
select HAVE_SX1276
config FORCE_USB_STDIO
default y

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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"

View File

@ -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

View File

@ -21,3 +21,6 @@ config BOARD_YARM
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_RIOTBOOT
config FORCE_USB_STDIO
default y

View File

@ -1,3 +0,0 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y

View File

@ -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

View File

@ -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))