mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #16845 from MrKevinWeiss/pr/kconfig/supportstms
.murdock: Add nucleo boards to kconfig test
This commit is contained in:
commit
f64b166319
12
.murdock
12
.murdock
@ -12,7 +12,19 @@ dwm1001
|
||||
hifive1
|
||||
native
|
||||
nrf52840dk
|
||||
nucleo-f072rb
|
||||
nucleo-f103rb
|
||||
nucleo-f207zg
|
||||
nucleo-f334r8
|
||||
nucleo-f429zi
|
||||
nucleo-f767zi
|
||||
nucleo-g071rb
|
||||
nucleo-g474re
|
||||
nucleo-l073rz
|
||||
nucleo-l152re
|
||||
nucleo-l433rc
|
||||
nucleo-l552ze-q
|
||||
p-nucleo-wb55
|
||||
remote-revb
|
||||
samr21-xpro
|
||||
seeedstudio-gd32
|
||||
|
@ -10,8 +10,10 @@ if TEST_KCONFIG
|
||||
config MODULE_BOARDS_COMMON_NUCLEO
|
||||
bool
|
||||
default y
|
||||
select MODULE_SAUL_GPIO if MODULE_SAUL_DEFAULT && HAS_PERIPH_GPIO
|
||||
select HAVE_SAUL_GPIO
|
||||
help
|
||||
stm32 common nucleo code.
|
||||
|
||||
endif # TEST_KCONFIG
|
||||
|
||||
rsource "../stm32/Kconfig"
|
||||
|
@ -23,6 +23,8 @@ config BOARD_I_NUCLEO_LRWAN1
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Clock configuration
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
|
@ -24,6 +24,8 @@ config BOARD_NUCLEO_G431RB
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
|
@ -23,6 +23,8 @@ config BOARD_NUCLEO_G474RE
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
|
@ -24,6 +24,8 @@ config BOARD_NUCLEO_L433RC
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
# Note that a recent version of OpenOCD is required for flashing an image on
|
||||
# the second slot of the flash memory. This version has to be built from source
|
||||
|
@ -24,6 +24,8 @@ config BOARD_NUCLEO_L496ZG
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
|
@ -23,6 +23,8 @@ config BOARD_NUCLEO_L4R5ZI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
|
@ -21,6 +21,8 @@ config BOARD_NUCLEO_L552ZE_Q
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
|
@ -21,6 +21,7 @@ config BOARD_P_NUCLEO_WB55
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select MODULE_PERIPH_LPUART if MODULE_STDIO_UART && HAS_PERIPH_LPUART
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
select HAS_ARDUINO
|
||||
@ -30,4 +31,4 @@ config BOARD_P_NUCLEO_WB55
|
||||
select BOARD_HAS_HSE
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
source "$(RIOTBOARD)/common/nucleo/Kconfig"
|
||||
|
@ -16,6 +16,7 @@ config CPU_COMMON_EFM32
|
||||
select HAS_PERIPH_RTT_SET_COUNTER
|
||||
select HAS_PERIPH_RTT_OVERFLOW
|
||||
select HAS_PERIPH_WDT
|
||||
select HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
|
||||
config CPU_EFM32_SERIES0
|
||||
bool
|
||||
@ -45,9 +46,5 @@ config HAS_EFM32_CORETEMP
|
||||
config CPU
|
||||
default "efm32" if CPU_COMMON_EFM32
|
||||
|
||||
config ERROR_MODULES_CONFLICT
|
||||
default "On the EFM32, the RTC and RTT map to the same hardware peripheral." if MODULE_PERIPH_RTC && MODULE_PERIPH_RTT
|
||||
depends on CPU_COMMON_EFM32
|
||||
|
||||
orsource "families/*/Kconfig"
|
||||
source "$(RIOTCPU)/cortexm_common/Kconfig"
|
||||
|
@ -25,14 +25,12 @@ config CPU_COMMON_SAM0
|
||||
select HAS_PERIPH_WDT
|
||||
select HAS_PERIPH_WDT_CB
|
||||
select HAS_PERIPH_WDT_WARNING_PERIOD
|
||||
select HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
|
||||
if CPU_COMMON_SAM0
|
||||
|
||||
rsource "periph/Kconfig"
|
||||
|
||||
config ERROR_MODULES_CONFLICT
|
||||
default "On SAM0, the RTC and RTT map to the same hardware peripheral." if MODULE_PERIPH_RTC && MODULE_PERIPH_RTT
|
||||
|
||||
endif # CPU_COMMON_SAM0
|
||||
|
||||
source "$(RIOTCPU)/cortexm_common/Kconfig"
|
||||
|
@ -16,6 +16,9 @@ config CPU_STM32
|
||||
select HAS_PERIPH_UART_MODECFG
|
||||
select HAS_PERIPH_UART_NONBLOCKING
|
||||
|
||||
# This CPU requires periph_rtc when periph_rtc_mem
|
||||
select MODULE_PERIPH_RTC if MODULE_PERIPH_RTC_MEM && HAS_PERIPH_RTC
|
||||
|
||||
# Common CPU symbol
|
||||
config CPU
|
||||
default "stm32" if CPU_STM32
|
||||
|
@ -17,15 +17,13 @@ config CPU_FAM_F1
|
||||
select HAS_PERIPH_FLASHPAGE_RAW
|
||||
select HAS_PERIPH_RTT_SET_COUNTER
|
||||
select HAS_PERIPH_WDT
|
||||
select HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
|
||||
if CPU_FAM_F1
|
||||
|
||||
config CPU_FAM
|
||||
default "f1"
|
||||
|
||||
config ERROR_MODULES_CONFLICT
|
||||
default "On STM32F1, the RTC and RTT map to the same hardware peripheral." if MODULE_PERIPH_RTC && MODULE_PERIPH_RTT
|
||||
|
||||
endif # CPU_FAM_F1
|
||||
|
||||
config HAS_CPU_STM32F1
|
||||
|
@ -475,6 +475,7 @@ reserved for the cases described below:
|
||||
| `HAS_` | Models a [feature](build-system-basics.html#features) |
|
||||
| `KCONFIG_USEMODULE_` | Used during transition to enable configuration of a module via Kconfig |
|
||||
| `KCONFIG_USEPKG_` | Used during transition to enable configuration of a package via Kconfig |
|
||||
| `HAVE_` | Models a feature not present in makefiles, will be unified in the future |
|
||||
| `USEMODULE_` | Models a [RIOT module](creating-modules.html#creating-modules). Generated from `USEMODULE` variable |
|
||||
| `USEPKG_` | Models an [external package](group__pkg.html). Generated from `USEPKG` variable |
|
||||
|
||||
|
@ -126,6 +126,11 @@ config MODULE_PERIPH_RTT_SET_COUNTER
|
||||
bool "rtc_set_counter() implementation in the RTT peripheral driver"
|
||||
depends on HAS_PERIPH_RTT_SET_COUNTER && MODULE_PERIPH_RTT
|
||||
|
||||
config MODULE_PERIPH_INIT_RTT_SET_COUNTER
|
||||
bool "Auto initialize rtc_set_counter() with RTT"
|
||||
default y if MODULE_PERIPH_INIT
|
||||
depends on MODULE_PERIPH_RTT_SET_COUNTER
|
||||
|
||||
config MODULE_PERIPH_INIT_RTT
|
||||
bool "Auto initialize RTT peripheral"
|
||||
default y if MODULE_PERIPH_INIT
|
||||
@ -157,5 +162,11 @@ config MODULE_PERIPH_INIT_USBDEV
|
||||
|
||||
endif # TEST_KCONFIG
|
||||
|
||||
config HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
bool
|
||||
help
|
||||
The periph_rtc module or the periph_rtt module share hardware, thus,
|
||||
only one can be selected.
|
||||
|
||||
rsource "Kconfig.timer"
|
||||
rsource "Kconfig.wdt"
|
||||
|
@ -15,5 +15,21 @@ config MODULE_PERIPH_INIT_RTC
|
||||
default y if MODULE_PERIPH_INIT
|
||||
depends on MODULE_PERIPH_RTC
|
||||
|
||||
config MODULE_PERIPH_RTC_MEM
|
||||
bool "Low-Power RTC Memory"
|
||||
depends on HAS_PERIPH_RTC_MEM
|
||||
help
|
||||
Provides an interface to access low-power memory present on some RTCs.
|
||||
This memory is retained even when the rest of the system is powered off.
|
||||
|
||||
# TODO: this module is actually just an artifact from the way periph_init_%
|
||||
# modules are handled in Makefile. We need to define it to keep the list the
|
||||
# same for now. We should be able to remove it later on.
|
||||
|
||||
config MODULE_PERIPH_INIT_RTC_MEM
|
||||
bool
|
||||
default y if MODULE_PERIPH_INIT
|
||||
depends on MODULE_PERIPH_RTC_MEM
|
||||
|
||||
# Include CPU specific configurations
|
||||
osource "$(RIOTCPU)/$(CPU)/periph/Kconfig.rtc"
|
||||
|
@ -20,13 +20,25 @@ config MODULE_PERIPH_SPI_RECONFIGURE
|
||||
bool "Pin reconfiguration support"
|
||||
depends on HAS_PERIPH_SPI_RECONFIGURE
|
||||
|
||||
# TODO: this module is actually just an artifact from the way periph_init_%
|
||||
# modules are handled in Makefile. We need to define it to keep the list the
|
||||
# same for now. We should be able to remove it later on.
|
||||
config MODULE_PERIPH_SPI_GPIO_MODE
|
||||
bool "Support initializing SPI pins with adapted GPIO modes"
|
||||
depends on HAS_PERIPH_SPI_GPIO_MODE
|
||||
help
|
||||
Say y to call `spi_init_with_gpio_mode`, which allows to initialize the SPI pins in
|
||||
with an specific GPIO mode.
|
||||
|
||||
# TODO: these modules are actually just artifacts from the way periph_init_%
|
||||
# modules are handled in Makefile. We need to define them to keep the list the
|
||||
# same for now. We should be able to remove them later on.
|
||||
|
||||
config MODULE_PERIPH_INIT_SPI_RECONFIGURE
|
||||
bool "Auto initialize SPI pin reconfiguration support"
|
||||
default y if MODULE_PERIPH_INIT
|
||||
depends on MODULE_PERIPH_SPI_RECONFIGURE
|
||||
|
||||
config MODULE_PERIPH_INIT_SPI_GPIO_MODE
|
||||
bool
|
||||
default y if MODULE_PERIPH_INIT
|
||||
depends on MODULE_PERIPH_SPI_GPIO_MODE
|
||||
|
||||
endif # MODULE_PERIPH_SPI
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
config ERROR_MODULES_CONFLICT
|
||||
string
|
||||
default "The RTC and RTT map to the same hardware peripheral." if MODULE_PERIPH_RTC && MODULE_PERIPH_RTT && HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
help
|
||||
Used to indicate that conflicting modules (i.e. modules that can't be
|
||||
active at the same time) are being used together.
|
||||
|
@ -29,6 +29,7 @@ menuconfig MODULE_ARDUINO
|
||||
config MODULE_ARDUINO_PWM
|
||||
bool "PWM support for Arduino"
|
||||
depends on HAS_PERIPH_PWM
|
||||
depends on HAS_ARDUINO_PWM
|
||||
depends on MODULE_ARDUINO
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_PWM
|
||||
|
@ -75,9 +75,7 @@ choice
|
||||
bool "Backend"
|
||||
depends on MODULE_ZTIMER_SEC
|
||||
default ZTIMER_SEC_BACKEND_RTC if !BOARD_NATIVE && \
|
||||
!CPU_COMMON_SAM0 && \
|
||||
!CPU_COMMON_EFM32 && \
|
||||
!CPU_FAM_F1
|
||||
!HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
|
||||
default ZTIMER_SEC_BACKEND_RTT
|
||||
|
||||
config ZTIMER_SEC_BACKEND_TIMER
|
||||
|
11
tests/periph_rtc/Kconfig
Normal file
11
tests/periph_rtc/Kconfig
Normal file
@ -0,0 +1,11 @@
|
||||
# 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 APPLICATION
|
||||
bool
|
||||
default y
|
||||
imply MODULE_PERIPH_RTC_MEM
|
@ -8,4 +8,7 @@ DISABLE_MODULE += periph_init_rtc
|
||||
|
||||
USEMODULE += xtimer
|
||||
|
||||
# avoid running Kconfig by default
|
||||
SHOULD_RUN_KCONFIG ?=
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -9,4 +9,5 @@ config APPLICATION
|
||||
bool
|
||||
default y
|
||||
imply MODULE_PERIPH_RTT_SET_COUNTER
|
||||
imply MODULE_PERIPH_RTC_MEM
|
||||
depends on TEST_KCONFIG
|
||||
|
@ -7,6 +7,9 @@ FEATURES_OPTIONAL += periph_rtc_mem
|
||||
|
||||
DISABLE_MODULE += periph_init_rtt
|
||||
|
||||
# avoid running Kconfig by default
|
||||
SHOULD_RUN_KCONFIG ?=
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# Put board specific dependencies here
|
||||
|
Loading…
Reference in New Issue
Block a user