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

Merge pull request #17355 from leandrolanzieri/pr/boards/samd21/model_kconfig

boards/samd21-based: model Kconfig
This commit is contained in:
Kevin "Tristate Tom" Weiss 2021-12-15 12:35:32 +01:00 committed by GitHub
commit e3f6212708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 161 additions and 4 deletions

View File

@ -17,6 +17,7 @@
adafruit-itsybitsy-m4
arduino-due
arduino-leonardo
arduino-mkrzero
arduino-mega2560
arduino-nano
atxmega-a1-xplained
@ -32,6 +33,7 @@ derfmega128
dwm1001
esp32-heltec-lora32-v2
esp8266-esp-12x
hamilton
hifive1
mbed_lpc1768
mega-xplained

View File

@ -17,5 +17,5 @@ FEATURES_PROVIDED += periph_usbdev
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1, $(TEST_KCONFIG))
KCONFIG_BOARD_CONFIG += $(BOARDDIR)/adafruit-itsybitsy-m4.config
KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config
endif

View File

@ -11,5 +11,6 @@ config BOARD_ARDUINO_MKR1000
bool
default y
select BOARD_COMMON_ARDUINO_MKR
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"

View File

@ -11,5 +11,6 @@ config BOARD_ARDUINO_MKRFOX1200
bool
default y
select BOARD_COMMON_ARDUINO_MKR
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"

View File

@ -11,5 +11,6 @@ config BOARD_ARDUINO_MKRWAN1300
bool
default y
select BOARD_COMMON_ARDUINO_MKR
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"

View File

@ -11,5 +11,6 @@ config BOARD_ARDUINO_MKRZERO
bool
default y
select BOARD_COMMON_ARDUINO_MKR
select MODULE_BOARDS_COMMON_ARDUINO-MKR if TEST_KCONFIG
source "$(RIOTBOARD)/common/arduino-mkr/Kconfig"

View File

@ -21,3 +21,7 @@ config BOARD_ARDUINO_NANO_33_IOT
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -14,3 +14,9 @@ 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

@ -19,3 +19,13 @@ config BOARD_COMMON_ARDUINO_MKR
select HAS_ARDUINO
select HAS_ARDUINO_PWM
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
config MODULE_BOARDS_COMMON_ARDUINO-MKR
bool
depends on TEST_KCONFIG
help
Common code for arduino-mkr type of boards.
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -17,3 +17,9 @@ 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

@ -18,3 +18,12 @@ config BOARD_COMMON_ARDUINO_ZERO
select HAS_PERIPH_USBDEV
select HAS_ARDUINO
select HAS_ARDUINO_PWM
select HAVE_SAUL_GPIO
config MODULE_BOARDS_COMMON_ARDUINO_ZERO
bool
depends on TEST_KCONFIG
default y
help
Common code for arduino-zero type of boards.

View File

@ -7,6 +7,7 @@
config MODULE_BOARDS_COMMON_SAMDX1-ARDUINO-BOOTLOADER
bool
default y if MODULE_STDIO_CDC_ACM
imply MODULE_USB_BOARD_RESET
depends on TEST_KCONFIG
help
Common code of samdx1 boards with an arduino bootloader

View File

@ -1,4 +1,3 @@
CONFIG_MODULE_USBUS=y
CONFIG_MODULE_USBUS_CDC_ACM=y
CONFIG_MODULE_STDIO_CDC_ACM=y
CONFIG_MODULE_USB_BOARD_RESET=y

View File

@ -16,3 +16,13 @@ config BOARD_COMMON_SODAQ
select HAS_PERIPH_USBDEV
select HAS_ARDUINO
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
config MODULE_BOARDS_COMMON_SODAQ
bool
depends on TEST_KCONFIG
help
Common code for Sodaq boards.
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -13,3 +13,9 @@ 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

@ -21,3 +21,7 @@ config BOARD_FEATHER_M0_LORA
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -21,3 +21,7 @@ config BOARD_FEATHER_M0_WIFI
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -21,3 +21,7 @@ config BOARD_FEATHER_M0
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -14,3 +14,9 @@ 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

@ -20,3 +20,10 @@ config BOARD_HAMILTON
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAVE_FXOS8700
select HAVE_HDC1000
select HAVE_PIR
select HAVE_PULSE_COUNTER
select HAVE_SAUL_GPIO
select HAVE_TMP006

View File

@ -10,3 +10,9 @@ FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1, $(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(BOARDDIR)/hamilton.config
endif

View File

@ -0,0 +1 @@
CONFIG_MODULE_STDIO_RTT=y

View File

@ -20,3 +20,5 @@ config BOARD_SAMD20_XPRO
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAVE_SAUL_GPIO

View File

@ -21,3 +21,5 @@ config BOARD_SAMD21_XPRO
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAVE_SAUL_GPIO

View File

@ -20,3 +20,7 @@ config BOARD_SEEEDUINO_XIAO
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -11,3 +11,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 += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config
endif

View File

@ -20,3 +20,7 @@ config BOARD_SENSEBOX_SAMD21
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO
select HAVE_SAUL_GPIO
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -13,3 +13,9 @@ 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

@ -21,3 +21,8 @@ config BOARD_SERPENTE
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAVE_MTD_SPI_NOR
select HAVE_SAUL_PWM
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -12,3 +12,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 += $(RIOTBOARD)/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config
endif

View File

@ -14,5 +14,6 @@ config BOARD_SODAQ_AUTONOMO
select CPU_MODEL_SAMD21J18A
select HAS_PERIPH_PWM
select HAS_ARDUINO_PWM
select MODULE_BOARDS_COMMON_SODAQ if TEST_KCONFIG
source "$(RIOTBOARD)/common/sodaq/Kconfig"

View File

@ -12,5 +12,6 @@ config BOARD_SODAQ_EXPLORER
default y
select BOARD_COMMON_SODAQ
select CPU_MODEL_SAMD21J18A
select MODULE_BOARDS_COMMON_SODAQ if TEST_KCONFIG
source "$(RIOTBOARD)/common/sodaq/Kconfig"

View File

@ -15,3 +15,4 @@ config BOARD_WEMOS_ZERO
select HAS_HIGHLEVEL_STDIO
source "$(RIOTBOARD)/common/arduino-zero/Kconfig"
source "$(RIOTBOARD)/common/samdx1-arduino-bootloader/Kconfig"

View File

@ -1,3 +1,9 @@
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

@ -17,7 +17,7 @@ config HAVE_FXOS8700
bool
select MODULE_FXOS8700 if MODULE_SAUL_DEFAULT
help
Indicates that an fxos8700 accelerometer/magnetometer is present.
Indicates that a FXOS8700 accelerometer/magnetometer is present.
menuconfig KCONFIG_USEMODULE_FXOS8700
bool "Configure FXOS8700 driver"

View File

@ -16,7 +16,7 @@ config HAVE_HDC1000
bool
select MODULE_HDC1000 if MODULE_SAUL_DEFAULT
help
Indicates that an hdc1000 humidity and temperature sensor is present.
Indicates that a HDC1000 humidity and temperature sensor is present.
menuconfig KCONFIG_USEMODULE_HDC1000
bool "Configure HDC1000 driver"

View File

@ -13,3 +13,9 @@ config MODULE_PIR
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
select MODULE_XTIMER
config HAVE_PIR
bool
select MODULE_PIR if MODULE_SAUL_DEFAULT
help
Indicates that a pir motion sensor is present.

View File

@ -12,3 +12,9 @@ config MODULE_PULSE_COUNTER
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_GPIO_IRQ
config HAVE_PULSE_COUNTER
bool
select MODULE_PULSE_COUNTER if MODULE_SAUL_DEFAULT
help
Indicates that a pulse counter is present.

View File

@ -15,9 +15,11 @@ menuconfig MODULE_ARDUINO
imply MODULE_PERIPH_SPI
depends on HAS_ARDUINO
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_UART
depends on HAS_CPP
depends on TEST_KCONFIG
select MODULE_PERIPH_GPIO
select MODULE_PERIPH_UART
select MODULE_CPP
select MODULE_ARDUINO_SKETCHES
select MODULE_FMT

View File

@ -11,4 +11,5 @@ config APPLICATION
imply MODULE_PERIPH_RTC
imply MODULE_PERIPH_GPIO
imply MODULE_PERIPH_GPIO_IRQ
imply MODULE_ZTIMER_NO_PERIPH_RTT if CPU_COMMON_SAM0
depends on TEST_KCONFIG

View File

@ -0,0 +1,8 @@
# For sam0 rtt conflicts with rtc, make will select only rtc because of
# order of inclusion, but to resolve in the same way as Kconfig this also
# selects ztimer_no_periph_rtt to select the same modules in Kconfig and make
ifneq (,$(filter-out sam3,$(filter sam%,$(CPU))))
ifneq (,$(filter ztimer%,$(USEMODULE)))
USEMODULE += ztimer_no_periph_rtt
endif
endif

View File

@ -10,3 +10,4 @@ config APPLICATION
default y
imply MODULE_PERIPH_RTC_MEM
imply MODULE_PERIPH_RTC_MS
imply MODULE_ZTIMER_NO_PERIPH_RTT