Skip to content

Commit

Permalink
boards/common: 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 3e75383 commit 8305390
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 52 deletions.
5 changes: 3 additions & 2 deletions boards/common/arduino-due/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = sam3
CPU_MODEL = sam3x8e

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_dac
Expand All @@ -9,5 +12,3 @@ FEATURES_PROVIDED += periph_uart

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

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

# export this module and its includes
USEMODULE += boards_common_arduino_due
INCLUDES += -I$(RIOTBOARD)/common/arduino-due/include
Expand Down
4 changes: 4 additions & 0 deletions boards/common/arduino-mkr/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
CPU = samd21
CPU_MODEL = samd21g18a


# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
Expand Down
4 changes: 0 additions & 4 deletions boards/common/arduino-mkr/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by Arduino/Genuino MKR1000 board
export CPU = samd21
export CPU_MODEL = samd21g18a

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

Expand Down
3 changes: 3 additions & 0 deletions boards/common/iotlab/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CPU = stm32f1
CPU_MODEL = stm32f103re

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
Expand Down
4 changes: 0 additions & 4 deletions boards/common/iotlab/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

# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyUSB1
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B)))
Expand Down
2 changes: 0 additions & 2 deletions boards/common/kw41z/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_adc
USEMODULE += saul_gpio
endif

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

# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_rtc
Expand All @@ -7,5 +10,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/common/kw41z/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by the board
export CPU = kinetis
export CPU_MODEL = mkw41z512vht4

# include this module into the build
INCLUDES += -I$(RIOTBOARD)/common/kw41z/include

Expand Down
3 changes: 2 additions & 1 deletion boards/common/msb-430/Makefile.features
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include $(RIOTCPU)/msp430fxyz/Makefile.features
CPU = msp430fxyz
CPU_MODEL = msp430f1612
4 changes: 0 additions & 4 deletions boards/common/msb-430/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## the cpu to build for
export CPU = msp430fxyz
export CPU_MODEL = msp430f1612

# set default port depending on operating system
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
Expand Down
2 changes: 1 addition & 1 deletion boards/common/msba2/Makefile.features
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include $(RIOTCPU)/lpc2387/Makefile.features
CPU = lpc2387
3 changes: 0 additions & 3 deletions boards/common/msba2/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
BOARDS_COMMON_MSBA2_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))

## the cpu to build for
export CPU = lpc2387

# Compile `lpc2k_pgm` when required
# It is still compiling in `boards` as it was the case before introducing the
# rule to autobuild
Expand Down
4 changes: 2 additions & 2 deletions boards/common/nrf51/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CPU = nrf51

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

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

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

# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk

Expand Down
3 changes: 2 additions & 1 deletion boards/common/remote/Makefile.features
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include $(RIOTCPU)/cc2538/Makefile.features
CPU = cc2538
CPU_MODEL = cc2538sf53
4 changes: 0 additions & 4 deletions boards/common/remote/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# define the cpu used by the RE-mote board
export CPU = cc2538
export CPU_MODEL = cc2538sf53

# define the default flash-tool
export PROGRAMMER ?= cc2538-bsl

Expand Down
4 changes: 2 additions & 2 deletions boards/common/saml1x/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CPU = saml1x

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

# Put other features on these boards (in alphabetical order)
FEATURES_PROVIDED += riotboot

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

# set edbg device type
EDBG_DEVICE_TYPE = mchp_cm23

Expand Down
5 changes: 3 additions & 2 deletions boards/common/wsn430/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
CPU = msp430fxyz
CPU_MODEL = msp430f1611

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

include $(RIOTCPU)/msp430fxyz/Makefile.features
4 changes: 0 additions & 4 deletions boards/common/wsn430/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# select the used CPU
export CPU = msp430fxyz
export CPU_MODEL = msp430f1611

# include this module in the build
USEMODULE += boards_common_wsn430
# use common wsn430 includes
Expand Down

0 comments on commit 8305390

Please sign in to comment.