diff --git a/boards/cc2538dk/Makefile.features b/boards/cc2538dk/Makefile.features index 2d293db776..d0a0fd0e5d 100644 --- a/boards/cc2538dk/Makefile.features +++ b/boards/cc2538dk/Makefile.features @@ -1,3 +1,6 @@ +CPU = cc2538 +CPU_MODEL ?= cc2538nf53 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_i2c @@ -8,5 +11,3 @@ FEATURES_PROVIDED += periph_adc # Various other features (if any) FEATURES_PROVIDED += emulator_renode - -include $(RIOTCPU)/cc2538/Makefile.features diff --git a/boards/cc2538dk/Makefile.include b/boards/cc2538dk/Makefile.include index bdb3e9e2b5..bacc8ea869 100644 --- a/boards/cc2538dk/Makefile.include +++ b/boards/cc2538dk/Makefile.include @@ -1,7 +1,3 @@ -# Define the cpu used by the CC2538DK board: -export CPU = cc2538 -export CPU_MODEL ?= cc2538nf53 - # the SmartRF06 Evaluation Board serial numbers all begin with "06EB": PROGRAMMER_SERIAL ?= 06EB diff --git a/boards/common/esp32/Makefile.dep b/boards/common/esp32/Makefile.dep index 2f0586ac52..5472bf8b8d 100644 --- a/boards/common/esp32/Makefile.dep +++ b/boards/common/esp32/Makefile.dep @@ -1,5 +1,3 @@ -include $(RIOTCPU)/esp32/Makefile.dep - ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif diff --git a/boards/common/esp32/Makefile.features b/boards/common/esp32/Makefile.features index 963790ff90..4766f0b22f 100644 --- a/boards/common/esp32/Makefile.features +++ b/boards/common/esp32/Makefile.features @@ -1,5 +1,5 @@ -# most board features results directly from ESP32 CPU features -include $(RIOTCPU)/esp32/Makefile.features +CPU = esp32 +CPU_MODEL = esp32 # additional features provided by all boards are GPIOs and at least one UART FEATURES_PROVIDED += periph_gpio diff --git a/boards/common/esp32/Makefile.include b/boards/common/esp32/Makefile.include index 4a005b0d3a..e2f7e5725f 100644 --- a/boards/common/esp32/Makefile.include +++ b/boards/common/esp32/Makefile.include @@ -1,7 +1,3 @@ -# the cpu to build for -export CPU ?= esp32 -export CPU_MODEL ?= esp32 - # configure the serial interface PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) diff --git a/boards/common/esp8266/Makefile.dep b/boards/common/esp8266/Makefile.dep index 63fcc8a2a6..5472bf8b8d 100644 --- a/boards/common/esp8266/Makefile.dep +++ b/boards/common/esp8266/Makefile.dep @@ -1,5 +1,3 @@ -include $(RIOTCPU)/esp8266/Makefile.dep - ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif diff --git a/boards/common/esp8266/Makefile.features b/boards/common/esp8266/Makefile.features index 3bad7fb344..127c7b88b8 100644 --- a/boards/common/esp8266/Makefile.features +++ b/boards/common/esp8266/Makefile.features @@ -1,6 +1,5 @@ -# MCU defined features that are provided independent on board definitions - -include $(RIOTCPU)/esp8266/Makefile.features +CPU = esp8266 +CPU_MODEL = esp8266 # MCU defined peripheral features provided by all boards in alphabetical order diff --git a/boards/common/esp8266/Makefile.include b/boards/common/esp8266/Makefile.include index bde04dbd41..e2f7e5725f 100644 --- a/boards/common/esp8266/Makefile.include +++ b/boards/common/esp8266/Makefile.include @@ -1,7 +1,3 @@ -# the cpu to build for -export CPU ?= esp8266 -export CPU_MODEL ?= esp8266 - # configure the serial interface PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) diff --git a/boards/common/nrf52/Makefile.dep b/boards/common/nrf52/Makefile.dep index 4c430335cc..75c078ec72 100644 --- a/boards/common/nrf52/Makefile.dep +++ b/boards/common/nrf52/Makefile.dep @@ -1,5 +1,3 @@ -include $(RIOTCPU)/nrf52/Makefile.dep - ifneq (,$(filter skald,$(USEMODULE))) USEMODULE += nrfble endif diff --git a/boards/common/nrf52/Makefile.features b/boards/common/nrf52/Makefile.features index 0841e5c639..a3e117668b 100644 --- a/boards/common/nrf52/Makefile.features +++ b/boards/common/nrf52/Makefile.features @@ -1,3 +1,5 @@ +CPU = nrf52 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_timer @@ -8,5 +10,3 @@ endif # Various other features (if any) FEATURES_PROVIDED += ble_nimble FEATURES_PROVIDED += radio_nrfble - -include $(RIOTCPU)/nrf52/Makefile.features diff --git a/boards/common/nrf52/Makefile.include b/boards/common/nrf52/Makefile.include index 0e909fbe41..112823e644 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -1,6 +1,3 @@ -# this module contains shared code for all boards using the nrf52 CPU -export CPU = nrf52 - # include this module into the build INCLUDES += -I$(RIOTBOARD)/common/nrf52/include diff --git a/boards/ek-lm4f120xl/Makefile.features b/boards/ek-lm4f120xl/Makefile.features index 7b3050728c..46e86ac374 100644 --- a/boards/ek-lm4f120xl/Makefile.features +++ b/boards/ek-lm4f120xl/Makefile.features @@ -1,8 +1,9 @@ +CPU = lm4f120 +CPU_MODEL = LM4F120H5QR + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/lm4f120/Makefile.features diff --git a/boards/ek-lm4f120xl/Makefile.include b/boards/ek-lm4f120xl/Makefile.include index d29ea94951..f2ca52974b 100644 --- a/boards/ek-lm4f120xl/Makefile.include +++ b/boards/ek-lm4f120xl/Makefile.include @@ -1,7 +1,3 @@ -# define the cpu used by the ek-lm4f120xl board -export CPU = lm4f120 -export CPU_MODEL = LM4F120H5QR - #define the default port depending on the host OS PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) diff --git a/boards/hifive1/Makefile.dep b/boards/hifive1/Makefile.dep index 2b839df74c..e69de29bb2 100644 --- a/boards/hifive1/Makefile.dep +++ b/boards/hifive1/Makefile.dep @@ -1 +0,0 @@ -include $(RIOTCPU)/fe310/Makefile.dep diff --git a/boards/hifive1/Makefile.features b/boards/hifive1/Makefile.features index 5c5f80f8c8..78ce180352 100644 --- a/boards/hifive1/Makefile.features +++ b/boards/hifive1/Makefile.features @@ -1,3 +1,6 @@ +CPU = fe310 +CPU_MODEL = fe310_g000 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio periph_gpio_irq #FEATURES_PROVIDED += periph_pwm @@ -6,5 +9,3 @@ FEATURES_PROVIDED += periph_rtt #FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/fe310/Makefile.features diff --git a/boards/hifive1/Makefile.include b/boards/hifive1/Makefile.include index 14a5395762..c6856fcdd6 100644 --- a/boards/hifive1/Makefile.include +++ b/boards/hifive1/Makefile.include @@ -1,7 +1,3 @@ -# define the cpu used by the HiFive1 board -export CPU = fe310 -export CPU_MODEL = fe310_g000 - # Uses UART0 for stdio input/output (comment out to disable) USEMODULE += stdio_uart diff --git a/boards/hifive1b/Makefile.dep b/boards/hifive1b/Makefile.dep index 2b839df74c..e69de29bb2 100644 --- a/boards/hifive1b/Makefile.dep +++ b/boards/hifive1b/Makefile.dep @@ -1 +0,0 @@ -include $(RIOTCPU)/fe310/Makefile.dep diff --git a/boards/hifive1b/Makefile.features b/boards/hifive1b/Makefile.features index e2d05e1f19..f473dcc2c0 100644 --- a/boards/hifive1b/Makefile.features +++ b/boards/hifive1b/Makefile.features @@ -1,3 +1,6 @@ +CPU = fe310 +CPU_MODEL = fe310_g002 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio periph_gpio_irq #FEATURES_PROVIDED += periph_i2c @@ -7,5 +10,3 @@ FEATURES_PROVIDED += periph_rtt #FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/fe310/Makefile.features diff --git a/boards/hifive1b/Makefile.include b/boards/hifive1b/Makefile.include index 6f4bdf248b..4dc8c6fd44 100644 --- a/boards/hifive1b/Makefile.include +++ b/boards/hifive1b/Makefile.include @@ -1,7 +1,3 @@ -# define the cpu used by the HiFive1 board -export CPU = fe310 -export CPU_MODEL = fe310_g002 - # Uses UART0 for stdio input/output (comment out to disable) USEMODULE += stdio_uart diff --git a/boards/mulle/Makefile.dep b/boards/mulle/Makefile.dep index f6ca7bf86e..da2b0fe785 100644 --- a/boards/mulle/Makefile.dep +++ b/boards/mulle/Makefile.dep @@ -19,5 +19,3 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio USEMODULE += saul_adc endif - -include $(RIOTCPU)/kinetis/Makefile.dep diff --git a/boards/mulle/Makefile.features b/boards/mulle/Makefile.features index 7f72c799ee..2898318971 100644 --- a/boards/mulle/Makefile.features +++ b/boards/mulle/Makefile.features @@ -1,3 +1,13 @@ +CPU = kinetis + +### CPU part number (must have a specific linker script for each part) +# Note that MK60DN256ZVLL10 (version 1.x) and MK60DN256VLL10 (version 2.x, no Z) +# only differ in some register locations etc, not in the actual memory layout, +# so it is safe to use the same linker script for both version 1.x and version +# 2.x silicon. +# The linker script needs to know the flash and RAM sizes of the device. +CPU_MODEL ?= mk60dn512vll10 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_dac @@ -8,5 +18,3 @@ FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/kinetis/Makefile.features diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index 6f0a3c2ee9..1fc475f3df 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -1,24 +1,8 @@ -# define the cpu used by the Mulle board -export CPU = kinetis - # MULLE_SERIAL is used to select which specific Mulle board we are compiling for. ifdef MULLE_SERIAL CFLAGS += -DMULLE_SERIAL=$(MULLE_SERIAL) endif -### CPU part number (must have a specific linker script for each part) -# Note that MK60DN256ZVLL10 (version 1.x) and MK60DN256VLL10 (version 2.x, no Z) -# only differ in some register locations etc, not in the actual memory layout, -# so it is safe to use the same linker script for both version 1.x and version -# 2.x silicon. -# The linker script needs to know the flash and RAM sizes of the device. - -ifeq ($(CPU_MODEL),) - CPU_MODEL = mk60dn512vll10 -endif - -export CPU_MODEL - # Default debug adapter choice is to use the Mulle programmer board DEBUG_ADAPTER ?= mulle # Host OS name diff --git a/boards/nrf6310/Makefile.features b/boards/nrf6310/Makefile.features index d2712cafab..46b201fafb 100644 --- a/boards/nrf6310/Makefile.features +++ b/boards/nrf6310/Makefile.features @@ -1,8 +1,8 @@ +CPU_MODEL = nrf51x22xxaa + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_uart # include common nrf51 based boards features include $(RIOTBOARD)/common/nrf51/Makefile.features - -include $(RIOTCPU)/nrf51/Makefile.features diff --git a/boards/nrf6310/Makefile.include b/boards/nrf6310/Makefile.include index a70b6acf73..26fa8f3365 100644 --- a/boards/nrf6310/Makefile.include +++ b/boards/nrf6310/Makefile.include @@ -1,6 +1,3 @@ -# define the used CPU -export CPU_MODEL = nrf51x22xxaa - # set default port depending on operating system PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) diff --git a/boards/pic32-clicker/Makefile.features b/boards/pic32-clicker/Makefile.features index 328dd02c76..c10c2eb5ba 100644 --- a/boards/pic32-clicker/Makefile.features +++ b/boards/pic32-clicker/Makefile.features @@ -1,6 +1,7 @@ +CPU = mips_pic32mx +CPU_MODEL = p32mx470f512h + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/mips_pic32mx/Makefile.features diff --git a/boards/pic32-clicker/Makefile.include b/boards/pic32-clicker/Makefile.include index 6e3898c579..823d462545 100644 --- a/boards/pic32-clicker/Makefile.include +++ b/boards/pic32-clicker/Makefile.include @@ -1,5 +1,3 @@ -export CPU = mips_pic32mx -export CPU_MODEL=p32mx470f512h export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S export USE_UHI_SYSCALLS = 1 diff --git a/boards/pic32-wifire/Makefile.features b/boards/pic32-wifire/Makefile.features index 9e83dbd44d..051b80b1dc 100644 --- a/boards/pic32-wifire/Makefile.features +++ b/boards/pic32-wifire/Makefile.features @@ -1,6 +1,7 @@ +CPU = mips_pic32mz +CPU_MODEL = p32mz2048efg100 + # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart - -include $(RIOTCPU)/mips_pic32mz/Makefile.features diff --git a/boards/pic32-wifire/Makefile.include b/boards/pic32-wifire/Makefile.include index c07595ef98..823d462545 100644 --- a/boards/pic32-wifire/Makefile.include +++ b/boards/pic32-wifire/Makefile.include @@ -1,5 +1,3 @@ -export CPU = mips_pic32mz -export CPU_MODEL=p32mz2048efg100 export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S export USE_UHI_SYSCALLS = 1 diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index 00db66f4a0..43b3b679be 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -63,7 +63,6 @@ PSEUDOMODULES += esp_spi_ram PSEUDOMODULES += esp_spiffs PSEUDOMODULES += esp_wifi_any -export CPU ?= esp32 export TARGET_ARCH ?= xtensa-esp32-elf export ESPTOOL ?= $(ESP32_SDK_DIR)/components/esptool_py/esptool/esptool.py