2019-09-30 18:58:51 +02:00
|
|
|
ifeq (,$(BOARD_MODULE))
|
|
|
|
$(error Board module must be defined in $(BOARD_MODULE))
|
|
|
|
endif
|
2018-03-22 22:09:33 +01:00
|
|
|
|
|
|
|
# Find the header file that should exist if the module is supported.
|
2019-09-30 18:58:51 +02:00
|
|
|
MODULE_HEADER = $(wildcard $(RIOTBOARD)/common/slwstk6000b/modules/$(BOARD_MODULE)/include/board_module.h)
|
2018-03-22 22:09:33 +01:00
|
|
|
|
|
|
|
ifeq (,$(MODULE_HEADER))
|
|
|
|
$(error Header file for $(BOARD_MODULE) is missing)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Lookup up CPU information using grep.
|
2019-09-30 18:58:51 +02:00
|
|
|
MODULE_INFO = $(shell grep $(BOARD_MODULE) $(RIOTBOARD)/common/slwstk6000b/modules.txt)
|
2018-03-22 22:09:33 +01:00
|
|
|
|
|
|
|
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))
|