mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17235 from leandrolanzieri/cpu/kinetis/model_kconfig
cpu/kinetis: model kconfig
This commit is contained in:
commit
7362074f49
1
.murdock
1
.murdock
@ -26,6 +26,7 @@ hifive1
|
||||
mbed_lpc1768
|
||||
mega-xplained
|
||||
microbit
|
||||
mulle
|
||||
native
|
||||
nrf52840dk
|
||||
nrf9160dk
|
||||
|
@ -14,3 +14,11 @@ config BOARD_COMMON_KW41Z
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
config MODULE_BOARDS_COMMON_KW41Z
|
||||
bool
|
||||
help
|
||||
Common code for kw41z-based boards.
|
||||
|
@ -19,3 +19,6 @@ config BOARD_FRDM_K22F
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -20,3 +20,5 @@ config BOARD_FRDM_K64F
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_ADC
|
||||
|
@ -17,3 +17,8 @@ config BOARD_FRDM_KL43Z
|
||||
select HAS_PERIPH_RTT
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_MAG3110
|
||||
select HAVE_MMA8X5X
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -14,4 +14,7 @@ config BOARD_FRDM_KW41Z
|
||||
select HAS_PERIPH_SPI
|
||||
select BOARD_COMMON_KW41Z
|
||||
|
||||
select MODULE_BOARDS_COMMON_KW41Z if TEST_KCONFIG
|
||||
select HAVE_FXOS8700
|
||||
|
||||
source "$(RIOTBOARD)/common/kw41z/Kconfig"
|
||||
|
@ -20,3 +20,7 @@ config BOARD_MULLE
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
|
||||
select HAVE_LIS3DH
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -18,3 +18,9 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_ADD_CONFIG += $(BOARDDIR)/mulle.config
|
||||
endif
|
||||
|
10
boards/mulle/mulle.config
Normal file
10
boards/mulle/mulle.config
Normal file
@ -0,0 +1,10 @@
|
||||
# The Mulle uses NVRAM to store persistent variables, such as boot count.
|
||||
CONFIG_MODULE_NVRAM=y
|
||||
CONFIG_MODULE_NVRAM_SPI=y
|
||||
CONFIG_MODULE_VFS=y
|
||||
CONFIG_MODULE_DEVFS=y
|
||||
CONFIG_MODULE_MTD=y
|
||||
CONFIG_MODULE_MTD_SPI_NOR=y
|
||||
|
||||
# Mulle always uses the RTT for the oscillator
|
||||
CONFIG_MODULE_PERIPH_RTT=y
|
@ -20,3 +20,6 @@ config BOARD_OPENLABS_KW41Z_MINI_256KIB
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -20,3 +20,6 @@ config BOARD_OPENLABS_KW41Z_MINI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_ADC
|
||||
select HAVE_SAUL_GPIO
|
||||
|
@ -19,3 +19,11 @@ config BOARD_PBA_D_01_KW2X
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_HDC1000
|
||||
select HAVE_MAG3110
|
||||
select HAVE_MMA8X5X
|
||||
select HAVE_MPL3115A2
|
||||
select HAVE_TCS37727
|
||||
select HAVE_TMP006
|
||||
|
@ -14,4 +14,8 @@ config BOARD_PHYNODE_KW41Z
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_SPI
|
||||
|
||||
select HAVE_CCS811
|
||||
select HAVE_MMA8X5X
|
||||
select HAVE_TCS37727
|
||||
|
||||
source "$(RIOTBOARD)/common/kw41z/Kconfig"
|
||||
|
@ -12,5 +12,6 @@ config BOARD_USB_KW41Z
|
||||
default y
|
||||
select BOARD_COMMON_KW41Z
|
||||
select HAS_PERIPH_SPI
|
||||
select MODULE_BOARDS_COMMON_KW41Z if TEST_KCONFIG
|
||||
|
||||
source "$(RIOTBOARD)/common/kw41z/Kconfig"
|
||||
|
@ -12,6 +12,15 @@ config CPU_COMMON_KINETIS
|
||||
select HAS_PERIPH_GPIO_IRQ
|
||||
select HAS_PERIPH_PM
|
||||
|
||||
# enable kinetis periph drivers if available
|
||||
imply MODULE_PERIPH_ICS
|
||||
imply MODULE_PERIPH_MCG
|
||||
imply MODULE_PERIPH_MCG_LITE
|
||||
imply MODULE_PERIPH_WDOG
|
||||
|
||||
select MODULE_CORE_THREAD_FLAGS if MODULE_PERIPH_I2C
|
||||
select MODULE_PERIPH_TIMER if MODULE_PERIPH_RTT && HAS_PERIPH_TIMER
|
||||
|
||||
config CPU_FAM_EA
|
||||
bool
|
||||
select CPU_COMMON_KINETIS
|
||||
@ -162,3 +171,5 @@ config CPU
|
||||
default "kinetis" if CPU_COMMON_KINETIS
|
||||
|
||||
source "$(RIOTCPU)/cortexm_common/Kconfig"
|
||||
|
||||
rsource "periph/Kconfig"
|
||||
|
@ -33,3 +33,9 @@ else
|
||||
endif
|
||||
|
||||
include $(RIOTCPU)/cortexm_common/Makefile.features
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_ADD_CONFIG += $(RIOTCPU)/kinetis/kinetis.config
|
||||
endif
|
||||
|
1
cpu/kinetis/kinetis.config
Normal file
1
cpu/kinetis/kinetis.config
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_MODULE_PM_LAYERED=y
|
33
cpu/kinetis/periph/Kconfig
Normal file
33
cpu/kinetis/periph/Kconfig
Normal file
@ -0,0 +1,33 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
if TEST_KCONFIG
|
||||
|
||||
config MODULE_PERIPH_WDOG
|
||||
bool
|
||||
help
|
||||
Low-level WDOG driver.
|
||||
|
||||
config MODULE_PERIPH_ICS
|
||||
bool
|
||||
depends on HAS_PERIPH_ICS
|
||||
help
|
||||
Kinetis internal clock source controller.
|
||||
|
||||
config MODULE_PERIPH_MCG
|
||||
bool
|
||||
depends on HAS_PERIPH_MCG
|
||||
help
|
||||
Kinetis Multipurpose Clock Generator.
|
||||
|
||||
config MODULE_PERIPH_MCG_LITE
|
||||
bool
|
||||
depends on HAS_PERIPH_MCG_LITE
|
||||
help
|
||||
Kinetis Multipurpose Clock Generator (Lite version).
|
||||
|
||||
endif # TEST_KCONFIG
|
@ -13,6 +13,12 @@ config MODULE_FXOS8700
|
||||
select MODULE_PERIPH_I2C
|
||||
select MODULE_XTIMER
|
||||
|
||||
config HAVE_FXOS8700
|
||||
bool
|
||||
select MODULE_FXOS8700 if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that an fxos8700 accelerometer/magnetometer is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_FXOS8700
|
||||
bool "Configure FXOS8700 driver"
|
||||
depends on USEMODULE_FXOS8700
|
||||
|
@ -12,6 +12,12 @@ config MODULE_HDC1000
|
||||
select MODULE_PERIPH_I2C
|
||||
select MODULE_XTIMER
|
||||
|
||||
config HAVE_HDC1000
|
||||
bool
|
||||
select MODULE_HDC1000 if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that an hdc1000 humidity and temperature sensor is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_HDC1000
|
||||
bool "Configure HDC1000 driver"
|
||||
depends on USEMODULE_HDC1000
|
||||
|
@ -12,3 +12,9 @@ config MODULE_LIS3DH
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_GPIO
|
||||
select MODULE_PERIPH_SPI
|
||||
|
||||
config HAVE_LIS3DH
|
||||
bool
|
||||
select MODULE_LIS3DH if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that a lis3dh accelerometer is present.
|
||||
|
@ -12,6 +12,12 @@ config MODULE_MAG3110
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_I2C
|
||||
|
||||
config HAVE_MAG3110
|
||||
bool
|
||||
select MODULE_MAG3110 if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that a mag3110 magnetometer is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_MAG3110
|
||||
bool "Configure MAG3110 driver"
|
||||
depends on USEMODULE_MAG3110
|
||||
|
@ -12,6 +12,12 @@ config MODULE_MMA8X5X
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_I2C
|
||||
|
||||
config HAVE_MMA8X5X
|
||||
bool
|
||||
select MODULE_MMA8X5X if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that an mma8x5x accelerometer is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_MMA8X5X
|
||||
bool "Configure MMA8X5X driver"
|
||||
depends on USEMODULE_MMA8X5X
|
||||
|
@ -10,3 +10,9 @@ config MODULE_MPL3115A2
|
||||
depends on HAS_PERIPH_I2C
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_I2C
|
||||
|
||||
config HAVE_MPL3115A2
|
||||
bool
|
||||
select MODULE_MPL3115A2 if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that an mpl3115a2 pressure sensor is present.
|
||||
|
@ -12,6 +12,12 @@ config MODULE_TCS37727
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_I2C
|
||||
|
||||
config HAVE_TCS37727
|
||||
bool
|
||||
select MODULE_TCS37727 if MODULE_SAUL_DEFAULT
|
||||
help
|
||||
Indicates that a tcs37727 rgb light sensor is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_TCS37727
|
||||
bool "Configure TCS37727 driver"
|
||||
depends on USEMODULE_TCS37727
|
||||
|
@ -6,30 +6,45 @@
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
if TEST_KCONFIG
|
||||
|
||||
choice
|
||||
bool "TMP006/TMP007 Infrared Thermopile sensors"
|
||||
optional
|
||||
depends on HAS_PERIPH_I2C
|
||||
|
||||
config MODULE_TMP006
|
||||
bool "TMP006"
|
||||
select MODULE_TMP00X
|
||||
|
||||
config MODULE_TMP007
|
||||
bool "TMP007"
|
||||
select MODULE_TMP00X
|
||||
|
||||
endchoice
|
||||
|
||||
config MODULE_TMP00X
|
||||
menuconfig MODULE_TMP00X
|
||||
bool
|
||||
prompt "TMP006/TMP007 Infrared Thermopile sensors" if !(HAVE_TMP00X && MODULE_SAUL_DEFAULT)
|
||||
default y if (HAVE_TMP00X && MODULE_SAUL_DEFAULT)
|
||||
depends on TEST_KCONFIG
|
||||
depends on HAS_PERIPH_I2C
|
||||
select MODULE_PERIPH_I2C
|
||||
select MODULE_XTIMER
|
||||
|
||||
endif # TEST_KCONFIG
|
||||
choice
|
||||
bool "Sensor variant"
|
||||
default MODULE_TMP006 if HAVE_TMP006
|
||||
default MODULE_TMP007 if HAVE_TMP007
|
||||
depends on MODULE_TMP00X
|
||||
|
||||
config MODULE_TMP006
|
||||
bool "TMP006"
|
||||
|
||||
config MODULE_TMP007
|
||||
bool "TMP007"
|
||||
|
||||
endchoice
|
||||
|
||||
config HAVE_TMP006
|
||||
bool
|
||||
select HAVE_TMP00X
|
||||
help
|
||||
Indicates that a tmp006 infrared sensor is present.
|
||||
|
||||
config HAVE_TMP007
|
||||
bool
|
||||
select HAVE_TMP00X
|
||||
help
|
||||
Indicates that a tmp007 infrared sensor is present.
|
||||
|
||||
config HAVE_TMP00X
|
||||
bool
|
||||
help
|
||||
Indicates that a tmp00x infrared sensor is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_TMP00X
|
||||
bool "Configure TMP00X driver"
|
||||
|
@ -17,6 +17,8 @@ ifneq (,$(filter periph_init, $(USEMODULE)))
|
||||
periph_flexcomm \
|
||||
periph_gpio_mux \
|
||||
periph_rtc_ms \
|
||||
periph_mcg \
|
||||
periph_wdog \
|
||||
periph_rtc_rtt \
|
||||
periph_clic \
|
||||
periph_coretimer \
|
||||
|
@ -28,6 +28,7 @@ rsource "event/Kconfig"
|
||||
rsource "fido2/Kconfig"
|
||||
rsource "fmt/Kconfig"
|
||||
rsource "frac/Kconfig"
|
||||
rsource "fs/Kconfig"
|
||||
rsource "hashes/Kconfig"
|
||||
rsource "iolist/Kconfig"
|
||||
rsource "isrpipe/Kconfig"
|
||||
|
9
sys/fs/Kconfig
Normal file
9
sys/fs/Kconfig
Normal file
@ -0,0 +1,9 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
rsource "constfs/Kconfig"
|
||||
rsource "devfs/Kconfig"
|
11
sys/fs/constfs/Kconfig
Normal file
11
sys/fs/constfs/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 MODULE_CONSTFS
|
||||
bool "ConstFS support"
|
||||
help
|
||||
ConstFS static file system.
|
32
sys/fs/devfs/Kconfig
Normal file
32
sys/fs/devfs/Kconfig
Normal file
@ -0,0 +1,32 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
menuconfig MODULE_DEVFS
|
||||
bool "DevFS support"
|
||||
depends on MODULE_VFS
|
||||
help
|
||||
This file system implementation allows devices to register file names
|
||||
for easier access to device drivers from shell commands etc. The idea is
|
||||
similar to the /dev directory on Unix.
|
||||
|
||||
if MODULE_DEVFS
|
||||
|
||||
config MODULE_DEVFS_HWRNG
|
||||
bool "Add HWRNG device"
|
||||
depends on HAS_PERIPH_HWRNG
|
||||
select MODULE_PERIPH_HWRNG
|
||||
help
|
||||
Adds the hardware random number generator (HWRNG) as a device
|
||||
(/dev/hwrng).
|
||||
|
||||
config MODULE_DEVFS_RANDOM
|
||||
bool "Add random device"
|
||||
select MODULE_RANDOM
|
||||
help
|
||||
Adds a device to generate random (/dev/urandom).
|
||||
|
||||
endif # MODULE_DEVFS
|
@ -1,4 +1,5 @@
|
||||
# this file enables modules defined in Kconfig. Do not use this file for
|
||||
# application configuration. This is only needed during migration.
|
||||
CONFIG_MODULE_TMP00X=y
|
||||
CONFIG_MODULE_TMP006=y
|
||||
CONFIG_MODULE_XTIMER=y
|
||||
|
Loading…
Reference in New Issue
Block a user