Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/usbus: changed approach of default activation of stdio_cdc_acm in Kconfig #19038

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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.

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

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
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
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
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
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
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 @@ -13,9 +13,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
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
3 changes: 0 additions & 3 deletions boards/stm32f429i-disco/stm32f429i-disco.config

This file was deleted.

6 changes: 0 additions & 6 deletions boards/wemos-zero/Makefile.features
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions sys/Kconfig.stdio
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ menu "Standard Input/Output (STDIO)"
choice STDIO_IMPLEMENTATION
bool "STDIO implementation"
default MODULE_STDIO_NATIVE if CPU_ARCH_NATIVE
default MODULE_STDIO_CDC_ACM if TEST_KCONFIG && HAS_HIGHLEVEL_STDIO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the TEST_KCONFIG as it is defined above in the menu.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this reads as "If I want to use STDIO and I have HIGHLEVEL_STDIO then I would like to use the STDIO_CDC_ACM" that choice STDIO_IMPLEMENTATION` can be overridden in the future or for specific boards to say:

choice STDIO_IMPLEMENTATION
   default MODULE_STDIO_MY_BOARD_SPECIFIC_CHOICE

so I guess that works

default MODULE_STDIO_UART

config MODULE_STDIO_RTT
Expand Down
1 change: 1 addition & 0 deletions sys/usb/usbus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ menuconfig MODULE_USBUS
bool "USB Unified Stack (USBUS)"
depends on TEST_KCONFIG
depends on HAS_PERIPH_USBDEV || MODULE_USBDEV_MOCK
default y if TEST_KCONFIG && HAS_HIGHLEVEL_STDIO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, no need to add the TEST_KCONFIG

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, logically this doesn't make sense. Wouldn't I only bring in the MODULE_USBUS if something needed it, for example MODULE_STDIO_CDC_ACM probably needs it... Just having a provided feature of HAS_HIGHLEVEL_STDIO probably shouldn't select it.

Though I understand that we assume everything we build has some STDIO or console or something.

select MODULE_CORE_THREAD_FLAGS
select MODULE_EVENT
select MODULE_LUID
Expand Down
1 change: 1 addition & 0 deletions sys/usb/usbus/cdc/acm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ endif # KCONFIG_USEMODULE_USBUS_CDC_ACM
config MODULE_USBUS_CDC_ACM
bool "USB CDC ACM support"
depends on MODULE_USBUS
default y if TEST_KCONFIG && HAS_HIGHLEVEL_STDIO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't need TEST_KCONFIG here as it is already in MODULE_USBUS. Maybe here would be better to select though @leandrolanzieri will probably disagree (or maybe imply or something).

select MODULE_TSRB

# extend STDIO options
Expand Down