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

cpu/efm32: model Kconfig

This commit is contained in:
Leandro Lanzieri 2021-09-28 19:39:48 +02:00
parent 44e7e82fad
commit 805a77b13a
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
15 changed files with 176 additions and 6 deletions

View File

@ -18,6 +18,9 @@ config CPU_COMMON_EFM32
select HAS_PERIPH_WDT
select HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
select PACKAGE_GECKO_SDK if TEST_KCONFIG
select PACKAGE_CMSIS-DSP if CPU_CORE_CORTEX_M0PLUS && TEST_KCONFIG
config CPU_EFM32_SERIES0
bool
@ -36,15 +39,19 @@ config HAS_CPU_EFM32
help
Indicates that the CPU being used is an EFM32.
## Definition of EFM32-specific drivers ##
config HAS_EFM32_CORETEMP
bool
help
Indicates that the EFM32 coretemp driver is being used.
## Common CPU symbols
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
menu "EFM32 drivers"
rsource "drivers/coretemp/Kconfig"
endmenu
rsource "periph/Kconfig"
orsource "families/*/Kconfig"
source "$(RIOTCPU)/cortexm_common/Kconfig"

View File

@ -33,3 +33,10 @@ ifeq (1,$(EFM32_LEUART_ENABLED))
endif
include $(RIOTCPU)/cortexm_common/Makefile.features
# Add efm32 configurations after including cortexm_common so efm32 takes precendence
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1,$(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(RIOTCPU)/efm32/efm32.config
endif

View File

@ -0,0 +1,19 @@
# 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_EFM32_CORETEMP
bool "EFM32 internal temperature sensor driver"
depends on TEST_KCONFIG
depends on HAS_EFM32_CORETEMP
depends on HAS_PERIPH_ADC
select MODULE_PERIPH_ADC
config HAS_EFM32_CORETEMP
bool
select MODULE_EFM32_CORETEMP if MODULE_SAUL_DEFAULT && HAS_PERIPH_ADC
help
Indicates that the EFM32 coretemp driver is being used.

1
cpu/efm32/efm32.config Normal file
View File

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

View File

@ -11,6 +11,14 @@ config CPU_FAM_EFM32GG
select CPU_EFM32_SERIES0
select HAS_CORTEXM_MPU
config MODULE_CPU_EFM32GG
bool
depends on CPU_FAM_EFM32GG
depends on TEST_KCONFIG
default y
help
EFM32GG family-specific code.
## CPU Models
config CPU_MODEL_EFM32GG330F512
bool

View File

@ -10,6 +10,14 @@ config CPU_FAM_EFM32HG
select CPU_COMMON_EFM32
select CPU_EFM32_SERIES0
config MODULE_CPU_EFM32HG
bool
depends on CPU_FAM_EFM32HG
depends on TEST_KCONFIG
default y
help
EFM32HG family-specific code.
## CPU Models
config CPU_MODEL_EFM32HG210F32
bool

View File

@ -11,6 +11,14 @@ config CPU_FAM_EFM32LG
select CPU_EFM32_SERIES0
select HAS_CORTEXM_MPU
config MODULE_CPU_EFM32LG
bool
depends on CPU_FAM_EFM32LG
depends on TEST_KCONFIG
default y
help
EFM32LG family-specific code.
## CPU Models
config CPU_MODEL_EFM32LG990F256
bool

View File

@ -12,6 +12,14 @@ config CPU_FAM_EFM32PG12B
select HAS_PERIPH_HWRNG
select HAS_CORTEXM_MPU
config MODULE_CPU_EFM32PG12B
bool
depends on CPU_FAM_EFM32PG12B
depends on TEST_KCONFIG
default y
help
EFM32PG12B family-specific code.
## CPU Models
config CPU_MODEL_EFM32PG12B500F1024IM48
bool

View File

@ -11,6 +11,14 @@ config CPU_FAM_EFM32PG1B
select CPU_EFM32_SERIES1
select HAS_CORTEXM_MPU
config MODULE_CPU_EFM32PG1B
bool
depends on CPU_FAM_EFM32PG1B
depends on TEST_KCONFIG
default y
help
EFM32PG1B family-specific code.
## CPU Models
config CPU_MODEL_EFM32PG1B200F256GM48
bool

View File

@ -10,6 +10,14 @@ config CPU_FAM_EFM32ZG
select CPU_COMMON_EFM32
select CPU_EFM32_SERIES0
config MODULE_CPU_EFM32ZG
bool
depends on CPU_FAM_EFM32ZG
depends on TEST_KCONFIG
default y
help
EFM32ZG family-specific code.
## CPU Models
config CPU_MODEL_EFM32ZG222F16
bool

View File

@ -12,6 +12,14 @@ config CPU_FAM_EFR32MG12P
select HAS_PERIPH_HWRNG
select HAS_CORTEXM_MPU
config MODULE_CPU_EFR32MG12P
bool
depends on CPU_FAM_EFR32MG12P
depends on TEST_KCONFIG
default y
help
EFR32MG12P family-specific code.
## CPU Models
config CPU_MODEL_EFR32MG12P432F1024GM68
bool

View File

@ -11,6 +11,14 @@ config CPU_FAM_EFR32MG1B
select CPU_EFM32_SERIES1
select HAS_CORTEXM_MPU
config MODULE_CPU_EFR32MG1B
bool
depends on CPU_FAM_EFR32MG1B
depends on TEST_KCONFIG
default y
help
EFR32MG1B family-specific code.
## CPU Models
config CPU_MODEL_EFR32MG1B232F256GM48
bool

View File

@ -11,6 +11,14 @@ config CPU_FAM_EFR32MG1P
select CPU_EFM32_SERIES1
select HAS_CORTEXM_MPU
config MODULE_CPU_EFR32MG1P
bool
depends on CPU_FAM_EFR32MG1P
depends on TEST_KCONFIG
default y
help
EFR32MG1P family-specific code.
## CPU Models
config CPU_MODEL_EFR32MG1P632F256GM32
bool

View File

@ -11,6 +11,14 @@ config CPU_FAM_EZR32WG
select CPU_EFM32_SERIES0
select HAS_CORTEXM_MPU
config MODULE_CPU_EZR32WG
bool
depends on CPU_FAM_EZR32WG
depends on TEST_KCONFIG
default y
help
EZR32WG family-specific code.
## CPU Models
config CPU_MODEL_EZR32WG230F128R68
bool

56
cpu/efm32/periph/Kconfig Normal file
View File

@ -0,0 +1,56 @@
# 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_PERIPH
bool
default y
if MODULE_PERIPH
config MODULE_PERIPH_WDT_SERIES0
bool
depends on CPU_EFM32_SERIES0
default MODULE_PERIPH_WDT
help
WDT driver implementation for EFM32 series 0.
config MODULE_PERIPH_WDT_SERIES1
bool
depends on CPU_EFM32_SERIES1
default MODULE_PERIPH_WDT
help
WDT driver implementation for EFM32 series 1.
config MODULE_PERIPH_RTC_SERIES0
bool
depends on CPU_EFM32_SERIES0
default MODULE_PERIPH_RTC
help
RTC driver implementation for EFM32 series 0.
config MODULE_PERIPH_RTC_SERIES1
bool
depends on CPU_EFM32_SERIES1
default MODULE_PERIPH_RTC
help
RTC driver implementation for EFM32 series 1.
config MODULE_PERIPH_RTT_SERIES0
bool
depends on CPU_EFM32_SERIES0
default MODULE_PERIPH_RTT
help
RTT driver implementation for EFM32 series 0.
config MODULE_PERIPH_RTT_SERIES1
bool
depends on CPU_EFM32_SERIES1
default MODULE_PERIPH_RTT
help
RTT driver implementation for EFM32 series 1.
endif # MODULE_PERIPH