From 7a2e4c819d7eec12ffc5720d9c05dcc05a226e26 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Mon, 8 Jun 2020 12:00:44 +0200 Subject: [PATCH] cpu/esp8266: Add Kconfig symbols --- boards/common/esp8266/Makefile.features | 1 - cpu/esp8266/Kconfig | 54 +++++++++++++++++++++++++ cpu/esp8266/Makefile.features | 2 + 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 cpu/esp8266/Kconfig diff --git a/boards/common/esp8266/Makefile.features b/boards/common/esp8266/Makefile.features index 6d3d608e46..00c9d1a179 100644 --- a/boards/common/esp8266/Makefile.features +++ b/boards/common/esp8266/Makefile.features @@ -1,5 +1,4 @@ CPU = esp8266 -CPU_MODEL = esp8266 # MCU defined peripheral features provided by all boards in alphabetical order diff --git a/cpu/esp8266/Kconfig b/cpu/esp8266/Kconfig new file mode 100644 index 0000000000..363945efe9 --- /dev/null +++ b/cpu/esp8266/Kconfig @@ -0,0 +1,54 @@ +# 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_CORE_XTENSA_L106 + bool + select CPU_ARCH_XTENSA + +config CPU_FAM_ESP8266 + bool + select CPU_CORE_XTENSA_L106 + select CPU_COMMON_ESP + select HAS_ARCH_ESP8266 + select HAS_CPU_ESP8266 + select HAS_PERIPH_RTT + select HAS_PERIPH_RTC + +## CPU Models +config CPU_MODEL_ESP8266EX + bool + select CPU_FAM_ESP8266 + +config CPU_MODEL_ESP8266_ESP_12X + bool + select CPU_FAM_ESP8266 + +## Definition of specific features +config HAS_ARCH_ESP8266 + bool + help + Indicates that the current architecture is ESP8266. + +config HAS_CPU_ESP8266 + bool + help + Indicates that the current CPU is 'esp8266'. + +## Common CPU symbols +config CPU_CORE + default "xtensa-l106" if CPU_CORE_XTENSA_L106 + +config CPU_FAM + default "esp8266" if CPU_FAM_ESP8266 + +config CPU_MODEL + default "esp8266ex" if CPU_MODEL_ESP8266EX + default "esp8266-esp-12x" if CPU_MODEL_ESP8266_ESP_12X + +config CPU + default "esp8266" if CPU_FAM_ESP8266 + +source "$(RIOTCPU)/esp_common/Kconfig" diff --git a/cpu/esp8266/Makefile.features b/cpu/esp8266/Makefile.features index 2dde3c40cf..899fbfa891 100644 --- a/cpu/esp8266/Makefile.features +++ b/cpu/esp8266/Makefile.features @@ -1,3 +1,5 @@ +CPU_FAM = esp8266 + # MCU defined features that are provided independent on board definitions include $(RIOTCPU)/esp_common/Makefile.features