From 52b31b5fce3123692f86bf7bfdc111b4a58a645d Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 8 Jul 2020 19:21:16 +0200 Subject: [PATCH 1/2] cpu/lm4f120: Add Kconfig symbols Also specify CPU_FAM in Makefile.features --- cpu/lm4f120/Kconfig | 35 +++++++++++++++++++++++++++++++++++ cpu/lm4f120/Makefile.features | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 cpu/lm4f120/Kconfig diff --git a/cpu/lm4f120/Kconfig b/cpu/lm4f120/Kconfig new file mode 100644 index 0000000000..fac1506074 --- /dev/null +++ b/cpu/lm4f120/Kconfig @@ -0,0 +1,35 @@ +# Copyright (c) 2020 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 CPU_FAM_LM4F120 + bool + select CPU_CORE_CORTEX_M4F + select HAS_CORTEXM_MPU + select HAS_CPU_LM4F120 + +config CPU_MODEL_LM4F120H5QR + bool + select CPU_FAM_LM4F120 + +## Declaration of specific features +config HAS_CPU_LM4F120 + bool + help + Indicates that a 'lm4f120' cpu is being used. + +## Common CPU symbols +config CPU_FAM + default "lm4f120" if CPU_FAM_LM4F120 + +config CPU + default "lm4f120" if CPU_FAM_LM4F120 + +config CPU_MODEL + # uppercase to match the Makefile.features + default "LM4F120H5QR" if CPU_MODEL_LM4F120H5QR + +source "$(RIOTCPU)/cortexm_common/Kconfig" diff --git a/cpu/lm4f120/Makefile.features b/cpu/lm4f120/Makefile.features index 2dd54603d1..dcc8379d9b 100644 --- a/cpu/lm4f120/Makefile.features +++ b/cpu/lm4f120/Makefile.features @@ -1,5 +1,6 @@ CPU_CORE = cortex-m4f +CPU_FAM = lm4f120 FEATURES_PROVIDED += cortexm_mpu --include $(RIOTCPU)/cortexm_common/Makefile.features +include $(RIOTCPU)/cortexm_common/Makefile.features From cb01f526d1d73a55376ac8ed21f72f688970efe9 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 8 Jul 2020 19:21:58 +0200 Subject: [PATCH 2/2] boards/ek-lm4f120: Add Kconfig symbols Also add the board to the whitelist of tests/kconfig_features --- boards/ek-lm4f120xl/Kconfig | 19 +++++++++++++++++++ tests/kconfig_features/Makefile | 1 + 2 files changed, 20 insertions(+) create mode 100644 boards/ek-lm4f120xl/Kconfig diff --git a/boards/ek-lm4f120xl/Kconfig b/boards/ek-lm4f120xl/Kconfig new file mode 100644 index 0000000000..79b1952e7c --- /dev/null +++ b/boards/ek-lm4f120xl/Kconfig @@ -0,0 +1,19 @@ +# Copyright (c) 2020 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 BOARD + default "ek-lm4f120xl" if BOARD_EK_LM4F120XL + +config BOARD_EK_LM4F120XL + bool + default y + select CPU_MODEL_LM4F120H5QR + select HAS_PERIPH_ADC + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_SPI + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART diff --git a/tests/kconfig_features/Makefile b/tests/kconfig_features/Makefile index 2dcbb1170c..58743f6bfc 100644 --- a/tests/kconfig_features/Makefile +++ b/tests/kconfig_features/Makefile @@ -30,6 +30,7 @@ BOARD_WHITELIST += acd52832 \ derfmega128 \ derfmega256 \ dwm1001 \ + ek-lm4f120xl \ esp32-heltec-lora32-v2 \ esp32-mh-et-live-minikit \ esp32-olimex-evb \