Skip to content

Commit

Permalink
boards: move CPU/CPU_MODEL definition to Makefile.features
Browse files Browse the repository at this point in the history
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
  • Loading branch information
cladmi committed Aug 20, 2019
1 parent 8305390 commit 636285e
Show file tree
Hide file tree
Showing 245 changed files with 321 additions and 647 deletions.
2 changes: 2 additions & 0 deletions boards/acd52832/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CPU_MODEL = nrf52832xxaa

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_spi
Expand Down
3 changes: 0 additions & 3 deletions boards/acd52832/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the acd52832
export CPU_MODEL = nrf52832xxaa

# set default port depending on operating system
PORT_LINUX ?= /dev/ttyUSB0

Expand Down
2 changes: 2 additions & 0 deletions boards/airfy-beacon/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CPU_MODEL = nrf51x22xxaa

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
Expand Down
3 changes: 0 additions & 3 deletions boards/airfy-beacon/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the used CPU model
export CPU_MODEL = nrf51x22xxaa

# include common nrf51 boards module into the build
USEMODULE += boards_common_nrf51

Expand Down
4 changes: 2 additions & 2 deletions boards/arduino-duemilanove/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
CPU = atmega328p

include $(RIOTCPU)/atmega328p/Makefile.features
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
3 changes: 0 additions & 3 deletions boards/arduino-duemilanove/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the ardudino duemilanove board
export CPU = atmega328p

# configure the terminal program
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
Expand Down
4 changes: 2 additions & 2 deletions boards/arduino-leonardo/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
CPU = atmega32u4

include $(RIOTCPU)/atmega32u4/Makefile.features
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
3 changes: 0 additions & 3 deletions boards/arduino-leonardo/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the arduino uno board
export CPU = atmega32u4

PORT_LINUX ?= /dev/ttyUSB0
AVRDUDE_PORT ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
Expand Down
4 changes: 2 additions & 2 deletions boards/arduino-mega2560/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CPU = atmega2560

FEATURES_PROVIDED += puf_sram
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features

include $(RIOTCPU)/atmega2560/Makefile.features
3 changes: 0 additions & 3 deletions boards/arduino-mega2560/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the arduino mega2560 board
export CPU = atmega2560

USEMODULE += boards_common_arduino-atmega

# configure the terminal program
Expand Down
2 changes: 0 additions & 2 deletions boards/arduino-mkr1000/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include $(RIOTBOARD)/common/arduino-mkr/Makefile.features

include $(RIOTCPU)/samd21/Makefile.features
2 changes: 0 additions & 2 deletions boards/arduino-mkrfox1200/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include $(RIOTBOARD)/common/arduino-mkr/Makefile.features

include $(RIOTCPU)/samd21/Makefile.features
2 changes: 0 additions & 2 deletions boards/arduino-mkrzero/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include $(RIOTBOARD)/common/arduino-mkr/Makefile.features

include $(RIOTCPU)/samd21/Makefile.features
4 changes: 2 additions & 2 deletions boards/arduino-nano/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
CPU = atmega328p

include $(RIOTCPU)/atmega328p/Makefile.features
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
3 changes: 0 additions & 3 deletions boards/arduino-nano/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the Arduino Nano board
export CPU = atmega328p

# configure the terminal program
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
Expand Down
4 changes: 2 additions & 2 deletions boards/arduino-uno/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
CPU = atmega328p

include $(RIOTCPU)/atmega328p/Makefile.features
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features
3 changes: 0 additions & 3 deletions boards/arduino-uno/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the cpu used by the arduino uno board
export CPU = atmega328p

# configure the terminal program
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
Expand Down
5 changes: 3 additions & 2 deletions boards/arduino-zero/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = samd21
CPU_MODEL = samd21g18a

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
Expand All @@ -10,5 +13,3 @@ FEATURES_PROVIDED += periph_usbdev

# Various other features (if any)
FEATURES_PROVIDED += arduino

include $(RIOTCPU)/samd21/Makefile.features
4 changes: 0 additions & 4 deletions boards/arduino-zero/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by Arduino/Genuino Zero board
export CPU = samd21
export CPU_MODEL = samd21g18a

# set edbg device type
EDBG_DEVICE_TYPE = atmel_cm0p

Expand Down
5 changes: 3 additions & 2 deletions boards/b-l072z-lrwan1/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = stm32l0
CPU_MODEL = stm32l072cz

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_dma
FEATURES_PROVIDED += periph_i2c
Expand All @@ -12,5 +15,3 @@ FEATURES_PROVIDED += periph_uart
# The 0.10.0 openocd version in Ubuntu Bionic doesn't work. The change was
# introduced after Jun 8, 2017 - v0.10.0-1-20170607-2132-dev.
FEATURES_PROVIDED += riotboot

include $(RIOTCPU)/stm32l0/Makefile.features
4 changes: 0 additions & 4 deletions boards/b-l072z-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## the cpu to build for
export CPU = stm32l0
export CPU_MODEL = stm32l072cz

# we use shared STM32 configuration snippets
INCLUDES += -I$(RIOTBOARD)/common/stm32/include

Expand Down
5 changes: 3 additions & 2 deletions boards/b-l475e-iot01a/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = stm32l4
CPU_MODEL = stm32l475vg

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_dma
FEATURES_PROVIDED += periph_i2c
Expand All @@ -10,5 +13,3 @@ FEATURES_PROVIDED += periph_uart

# Put other features for this board (in alphabetical order)
FEATURES_PROVIDED += riotboot

include $(RIOTCPU)/stm32l4/Makefile.features
4 changes: 0 additions & 4 deletions boards/b-l475e-iot01a/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# the cpu to build for
export CPU = stm32l4
export CPU_MODEL = stm32l475vg

# we use shared STM32 configuration snippets
INCLUDES += -I$(RIOTBOARD)/common/stm32/include

Expand Down
2 changes: 2 additions & 0 deletions boards/calliope-mini/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CPU_MODEL = nrf51x22xxab

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_uart
Expand Down
3 changes: 0 additions & 3 deletions boards/calliope-mini/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# define the used CPU
export CPU_MODEL = nrf51x22xxab

# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
Expand Down
5 changes: 3 additions & 2 deletions boards/cc2650-launchpad/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CPU = cc26x0
CPU_MODEL = cc26x0f128

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_i2c

include $(RIOTCPU)/cc26x0/Makefile.features
2 changes: 0 additions & 2 deletions boards/cc2650-launchpad/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export CPU = cc26x0
export CPU_MODEL = cc26x0f128
export XDEBUGGER = XDS110

# set default port depending on operating system
Expand Down
5 changes: 3 additions & 2 deletions boards/cc2650stk/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CPU = cc26x0
CPU_MODEL = cc26x0f128

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTCPU)/cc26x0/Makefile.features
2 changes: 0 additions & 2 deletions boards/cc2650stk/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export CPU = cc26x0
export CPU_MODEL = cc26x0f128
export XDEBUGGER = XDS110

# set default port depending on operating system
Expand Down
5 changes: 3 additions & 2 deletions boards/chronos/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CPU = cc430
CPU_MODEL = cc430f6137

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_rtc

# Various other features (if any)

include $(RIOTCPU)/cc430/Makefile.features
4 changes: 0 additions & 4 deletions boards/chronos/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## the cpu to build for
export CPU = cc430
export CPU_MODEL = cc430f6137

# flasher configuration
FLASHFILE ?= $(HEXFILE)
FLASHER = mspdebug
Expand Down
2 changes: 2 additions & 0 deletions boards/common/particle-mesh/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CPU_MODEL = nrf52840xxaa

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_spi
Expand Down
2 changes: 0 additions & 2 deletions boards/common/particle-mesh/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export CPU_MODEL = nrf52840xxaa

# set default port depending on operating system
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
Expand Down
6 changes: 4 additions & 2 deletions boards/f4vi1/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
CPU = stm32f4
CPU_MODEL = stm32f415rg


# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTCPU)/stm32f4/Makefile.features
4 changes: 0 additions & 4 deletions boards/f4vi1/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by the stm32f4-discovery board
export CPU = stm32f4
export CPU_MODEL = stm32f415rg

# we use shared STM32 configuration snippets
INCLUDES += -I$(RIOTBOARD)/common/stm32/include

Expand Down
5 changes: 3 additions & 2 deletions boards/feather-m0/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = samd21
CPU_MODEL = samd21g18a

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
Expand All @@ -8,5 +11,3 @@ FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_usbdev

include $(RIOTCPU)/samd21/Makefile.features
4 changes: 0 additions & 4 deletions boards/feather-m0/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by Adafruit Feather M0 boards
export CPU = samd21
export CPU_MODEL = samd21g18a

PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))

Expand Down
5 changes: 3 additions & 2 deletions boards/fox/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
CPU = stm32f1
CPU_MODEL = stm32f103re

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTCPU)/stm32f1/Makefile.features
4 changes: 0 additions & 4 deletions boards/fox/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## the cpu to build for
export CPU = stm32f1
export CPU_MODEL = stm32f103re

# set default port depending on operating system
PORT_LINUX ?= /dev/ttyUSB1
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
Expand Down
2 changes: 0 additions & 2 deletions boards/frdm-k22f/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_adc
endif

include $(RIOTCPU)/kinetis/Makefile.dep
5 changes: 3 additions & 2 deletions boards/frdm-k22f/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = kinetis
CPU_MODEL = mk22fn512vlh12

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
Expand All @@ -7,5 +10,3 @@ FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTCPU)/kinetis/Makefile.features
4 changes: 0 additions & 4 deletions boards/frdm-k22f/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# define the cpu used by the board
export CPU = kinetis
export CPU_MODEL = mk22fn512vlh12

# Include default FRDM board config
include $(RIOTBOARD)/common/frdm/Makefile.include
2 changes: 0 additions & 2 deletions boards/frdm-k64f/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_adc
endif

include $(RIOTCPU)/kinetis/Makefile.dep
5 changes: 3 additions & 2 deletions boards/frdm-k64f/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = kinetis
CPU_MODEL = mk64fn1m0vll12

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
Expand All @@ -10,5 +13,3 @@ FEATURES_PROVIDED += periph_uart

# Put other features for this board (in alphabetical order)
FEATURES_PROVIDED += riotboot

include $(RIOTCPU)/kinetis/Makefile.features
4 changes: 0 additions & 4 deletions boards/frdm-k64f/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# define the cpu used by the FRDM-K64F board
export CPU = kinetis
export CPU_MODEL = mk64fn1m0vll12

# Include default FRDM board config
include $(RIOTBOARD)/common/frdm/Makefile.include
5 changes: 3 additions & 2 deletions boards/hamilton/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = samd21
CPU_MODEL = samr21e18a

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
Expand All @@ -7,5 +10,3 @@ FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer

-include $(RIOTCPU)/samd21/Makefile.features
4 changes: 0 additions & 4 deletions boards/hamilton/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by Hamilton
export CPU = samd21
export CPU_MODEL = samr21e18a

# debugger config
export JLINK_DEVICE := atsamr21e18a
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
Expand Down
5 changes: 3 additions & 2 deletions boards/i-nucleo-lrwan1/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = stm32l0
CPU_MODEL = stm32l052t8

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_lpuart
Expand All @@ -6,5 +9,3 @@ FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi periph_spi_gpio_mode
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

include $(RIOTCPU)/stm32l0/Makefile.features
4 changes: 0 additions & 4 deletions boards/i-nucleo-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## the cpu to build for
export CPU = stm32l0
export CPU_MODEL = stm32l052t8

# we use shared STM32 configuration snippets
INCLUDES += -I$(RIOTBOARD)/common/stm32/include

Expand Down
Loading

0 comments on commit 636285e

Please sign in to comment.