mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/slwstk6000b: migrate to use a common/slwstk6000b
Migrate the board to be implemented with a common/slwstk6000b. It is a pre step for splitting the board for each "BOARD_MODULE".
This commit is contained in:
parent
d749e2de5d
commit
ddf3874995
5
boards/common/slwstk6000b/Makefile
Normal file
5
boards/common/slwstk6000b/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
MODULE = board_common_slwstk6000b
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/silabs
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
7
boards/common/slwstk6000b/Makefile.dep
Normal file
7
boards/common/slwstk6000b/Makefile.dep
Normal file
@ -0,0 +1,7 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
USEMODULE += si7021
|
||||
endif
|
||||
|
||||
# include board common dependencies
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.dep
|
14
boards/common/slwstk6000b/Makefile.features
Normal file
14
boards/common/slwstk6000b/Makefile.features
Normal file
@ -0,0 +1,14 @@
|
||||
CPU = efm32
|
||||
# TODO move CPU_MODEL here
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart periph_uart_modecfg
|
||||
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.features
|
26
boards/common/slwstk6000b/Makefile.include
Normal file
26
boards/common/slwstk6000b/Makefile.include
Normal file
@ -0,0 +1,26 @@
|
||||
include $(RIOTBOARD)/common/slwstk6000b/module-info.mk
|
||||
|
||||
INCLUDES += -I$(RIOTBOARD)/common/slwstk6000b/include
|
||||
# add module specific includes
|
||||
INCLUDES += -I$(RIOTBOARD)/common/slwstk6000b/modules/$(BOARD_MODULE)/include
|
||||
|
||||
export CPU_MODEL = $(MODULE_CPU)
|
||||
|
||||
# set default port depending on operating system
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup JLink for flashing
|
||||
export JLINK_DEVICE := $(MODULE_JLINK_DEVICE)
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
|
||||
# add board common drivers
|
||||
USEMODULE += boards_common_silabs
|
||||
USEMODULE += silabs_aem
|
||||
USEMODULE += silabs_bc
|
||||
|
||||
# include board common
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.include
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @ingroup boards_common_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup boards_slwstk6000b Silicon Labs SLWSTK6000B starter kit
|
||||
* @defgroup boards_common_slwstk6000b Silicon Labs SLWSTK6000B starter kit
|
||||
* @ingroup boards
|
||||
* @brief Support for the Silicon Labs SLWSTK6000B starter kit
|
||||
* @{
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @ingroup boards_common_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @ingroup boards_common_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
@ -1,15 +1,16 @@
|
||||
# Define the default board module.
|
||||
BOARD_MODULE ?= slwrb4162a
|
||||
ifeq (,$(BOARD_MODULE))
|
||||
$(error Board module must be defined in $(BOARD_MODULE))
|
||||
endif
|
||||
|
||||
# Find the header file that should exist if the module is supported.
|
||||
MODULE_HEADER = $(wildcard $(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include/board_module.h)
|
||||
MODULE_HEADER = $(wildcard $(RIOTBOARD)/common/slwstk6000b/modules/$(BOARD_MODULE)/include/board_module.h)
|
||||
|
||||
ifeq (,$(MODULE_HEADER))
|
||||
$(error Header file for $(BOARD_MODULE) is missing)
|
||||
endif
|
||||
|
||||
# Lookup up CPU information using grep.
|
||||
MODULE_INFO = $(shell grep $(BOARD_MODULE) $(RIOTBOARD)/slwstk6000b/modules.txt)
|
||||
MODULE_INFO = $(shell grep $(BOARD_MODULE) $(RIOTBOARD)/common/slwstk6000b/modules.txt)
|
||||
|
||||
ifeq (,$(MODULE_INFO))
|
||||
$(error Unable to read module information for $(BOARD_MODULE))
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @ingroup boards_common_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup boards_slwstk6000b
|
||||
* @ingroup boards_common_slwstk6000b
|
||||
* @{
|
||||
*
|
||||
* @file
|
@ -1,5 +1,3 @@
|
||||
MODULE = board
|
||||
|
||||
DIRS = $(RIOTBOARD)/common/silabs
|
||||
|
||||
DIRS += $(RIOTBOARD)/common/slwstk6000b
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -1,7 +1,2 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
USEMODULE += si7021
|
||||
endif
|
||||
|
||||
# include board common dependencies
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.dep
|
||||
USEMODULE += board_common_slwstk6000b
|
||||
include $(RIOTBOARD)/common/slwstk6000b/Makefile.dep
|
||||
|
@ -1,14 +1 @@
|
||||
CPU = efm32
|
||||
# TODO move CPU_MODEL here
|
||||
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_adc
|
||||
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
||||
FEATURES_PROVIDED += periph_i2c
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart periph_uart_modecfg
|
||||
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.features
|
||||
include $(RIOTBOARD)/common/slwstk6000b/Makefile.features
|
||||
|
@ -1,25 +1,4 @@
|
||||
include $(RIOTBOARD)/slwstk6000b/module-info.mk
|
||||
# Define the default board module.
|
||||
BOARD_MODULE ?= slwrb4162a
|
||||
|
||||
# add module specific includes
|
||||
INCLUDES += -I$(RIOTBOARD)/slwstk6000b/modules/$(BOARD_MODULE)/include
|
||||
|
||||
export CPU_MODEL = $(MODULE_CPU)
|
||||
|
||||
# set default port depending on operating system
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup JLink for flashing
|
||||
export JLINK_DEVICE := $(MODULE_JLINK_DEVICE)
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
|
||||
# add board common drivers
|
||||
USEMODULE += boards_common_silabs
|
||||
USEMODULE += silabs_aem
|
||||
USEMODULE += silabs_bc
|
||||
|
||||
# include board common
|
||||
include $(RIOTBOARD)/common/silabs/Makefile.include
|
||||
include $(RIOTBOARD)/common/slwstk6000b/Makefile.include
|
||||
|
2
dist/tools/buildsystem_sanity_check/check.sh
vendored
2
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -156,7 +156,7 @@ check_cpu_cpu_model_defined_in_makefile_features() {
|
||||
pathspec+=(':!cpu/**/Makefile.features')
|
||||
|
||||
# Currently blacklist this non migrated file for CPU_MODEL
|
||||
pathspec+=(':!boards/slwstk6000b/Makefile.include')
|
||||
pathspec+=(':!boards/common/slwstk6000b/Makefile.include')
|
||||
|
||||
git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \
|
||||
| error_with_message 'CPU and CPU_MODEL definition must be done by board/BOARD/Makefile.features, board/common/**/Makefile.features or cpu/CPU/Makefile.features'
|
||||
|
Loading…
Reference in New Issue
Block a user