From 7d543fe091291293195ff42f7f23215f84ca8237 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 24 Jun 2020 15:15:43 +0200 Subject: [PATCH] cpu/cc2538: Add Kconfig symbols Also specify CPU_FAM in Makefile.features --- cpu/cc2538/Kconfig | 46 ++++++++++++++++++++++++++++++++++++ cpu/cc2538/Makefile.features | 3 ++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 cpu/cc2538/Kconfig diff --git a/cpu/cc2538/Kconfig b/cpu/cc2538/Kconfig new file mode 100644 index 0000000000..94f915537e --- /dev/null +++ b/cpu/cc2538/Kconfig @@ -0,0 +1,46 @@ +# 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_CC2538 + bool + select CPU_CORE_CORTEX_M3 + select HAS_CPU_CC2538 + select HAS_PERIPH_CPUID + select HAS_PERIPH_GPIO + select HAS_PERIPH_GPIO_IRQ + select HAS_PERIPH_HWRNG + select HAS_PERIPH_UART_MODECFG + select HAS_CORTEXM_MPU + select HAS_PUF_SRAM + +## CPU Models +config CPU_MODEL_CC2538NF53 + bool + select CPU_FAM_CC2538 + +config CPU_MODEL_CC2538SF53 + bool + select CPU_FAM_CC2538 + +## Definition of specific features +config HAS_CPU_CC2538 + bool + help + Indicates that a 'cc2538' cpu is being used. + +## Common CPU symbols +config CPU_FAM + default "cc2538" if CPU_FAM_CC2538 + +config CPU_MODEL + default "cc2538nf53" if CPU_MODEL_CC2538NF53 + default "cc2538sf53" if CPU_MODEL_CC2538SF53 + +config CPU + default "cc2538" if CPU_FAM_CC2538 + +source "$(RIOTCPU)/cortexm_common/Kconfig" diff --git a/cpu/cc2538/Makefile.features b/cpu/cc2538/Makefile.features index 46d084bb7c..144a1a4641 100644 --- a/cpu/cc2538/Makefile.features +++ b/cpu/cc2538/Makefile.features @@ -1,4 +1,5 @@ CPU_CORE = cortex-m3 +CPU_FAM = cc2538 FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio periph_gpio_irq @@ -8,4 +9,4 @@ FEATURES_PROVIDED += periph_uart_modecfg FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += puf_sram --include $(RIOTCPU)/cortexm_common/Makefile.features +include $(RIOTCPU)/cortexm_common/Makefile.features