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:
commit
e3f6212708
2
.murdock
2
.murdock
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
1
boards/hamilton/hamilton.config
Normal file
1
boards/hamilton/hamilton.config
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_MODULE_STDIO_RTT=y
|
@ -20,3 +20,5 @@ config BOARD_SAMD20_XPRO
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -21,3 +21,5 @@ config BOARD_SAMD21_XPRO
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_USBDEV
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
8
tests/periph_pm/Makefile.board.dep
Normal file
8
tests/periph_pm/Makefile.board.dep
Normal 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
|
@ -10,3 +10,4 @@ config APPLICATION
|
||||
default y
|
||||
imply MODULE_PERIPH_RTC_MEM
|
||||
imply MODULE_PERIPH_RTC_MS
|
||||
imply MODULE_ZTIMER_NO_PERIPH_RTT
|
||||
|
Loading…
Reference in New Issue
Block a user