1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/common/slwstk6000b/module-info.mk
Gaëtan Harter ddf3874995
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".
2019-10-08 15:36:09 +02:00

22 lines
719 B
Makefile

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)/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)/common/slwstk6000b/modules.txt)
ifeq (,$(MODULE_INFO))
$(error Unable to read module information for $(BOARD_MODULE))
endif
# Export variables to use in this build.
export MODULE_CPU = $(word 2, $(MODULE_INFO))
export MODULE_JLINK_DEVICE = $(word 3, $(MODULE_INFO))