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

boards/adafruit-itsybitsy-m4: Model kconfig #17331

Merged
merged 4 commits into from
Dec 6, 2021
Merged
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
1 change: 1 addition & 0 deletions .murdock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
: ${TEST_BOARDS_LLVM_COMPILE:=""}

: ${TEST_KCONFIG_BOARDS_AVAILABLE:="
adafruit-itsybitsy-m4
arduino-due
arduino-leonardo
arduino-mega2560
Expand Down
4 changes: 4 additions & 0 deletions boards/adafruit-itsybitsy-m4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ config BOARD_ADAFRUIT_ITSYBITSY_M4
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAVE_SAUL_GPIO
select MODULE_USB_BOARD_RESET if MODULE_STDIO_CDC_ACM

select HAVE_MTD_SPI_NOR
# This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR
select MODULE_PERIPH_SPI_ON_QSPI if MODULE_MTD_SPI_NOR

source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"
6 changes: 6 additions & 0 deletions boards/adafruit-itsybitsy-m4/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ 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 += $(BOARDDIR)/adafruit-itsybitsy-m4.config
endif
3 changes: 3 additions & 0 deletions boards/adafruit-itsybitsy-m4/adafruit-itsybitsy-m4.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y
12 changes: 12 additions & 0 deletions boards/common/samdx1-arduino-bootloader/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2021 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.

config MODULE_BOARDS_COMMON_SAMDX1-ARDUINO-BOOTLOADER
bool
default y if MODULE_STDIO_CDC_ACM
depends on TEST_KCONFIG
help
Common code of samdx1 boards with an arduino bootloader
1 change: 1 addition & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ rsource "timex/Kconfig"
rsource "tsrb/Kconfig"
rsource "uri_parser/Kconfig"
rsource "usb/Kconfig"
rsource "usb_board_reset/Kconfig"
rsource "vfs/Kconfig"
rsource "xtimer/Kconfig"
rsource "ztimer/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion sys/Kconfig.stdio
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ choice STDIO_IMPLEMENTATION
default MODULE_STDIO_NATIVE if CPU_ARCH_NATIVE
default MODULE_STDIO_UART

# TODO: Add MODULE_STDIO_CDC_ACM, MODULE_STDIO_RTT, and MODULE_STDIO_ETHOS
# TODO: Add MODULE_STDIO_RTT, and MODULE_STDIO_ETHOS

config MODULE_SLIPDEV_STDIO
bool "SLIP network device"
Expand Down
11 changes: 11 additions & 0 deletions sys/usb_board_reset/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2021 HAW Hamburg
leandrolanzieri marked this conversation as resolved.
Show resolved Hide resolved
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#

config MODULE_USB_BOARD_RESET
bool "Trigger a board reset via USB CDC ACM"
depends on TEST_KCONFIG
depends on MODULE_USBUS_CDC_ACM