@@ -9,8 +9,8 @@ BOARD ?= PCA10040
9
9
BOARD_DIR ?= boards/$(BOARD )
10
10
endif
11
11
12
- ifeq ($(wildcard boards/ $( BOARD ) /.) ,)
13
- $(error Invalid BOARD specified)
12
+ ifeq ($(wildcard $( BOARD_DIR ) /.) ,)
13
+ $(error Invalid BOARD specified : $( BOARD_DIR ) )
14
14
endif
15
15
16
16
# If SoftDevice is selected, try to use that one.
@@ -19,7 +19,7 @@ SD_LOWER = $(shell echo $(SD) | tr '[:upper:]' '[:lower:]')
19
19
20
20
# TODO: Verify that it is a valid target.
21
21
22
- include boards/ $( BOARD ) /mpconfigboard.mk
22
+ include $( BOARD_DIR ) /mpconfigboard.mk
23
23
24
24
ifeq ($(SD ) , )
25
25
# If the build directory is not given, make it reflect the board name.
@@ -48,7 +48,7 @@ ifneq ($(LD_FILE),)
48
48
LD_FILES = $(LD_FILE)
49
49
endif
50
50
51
- -include boards/ $( BOARD ) /modules/boardmodules.mk
51
+ -include $( BOARD_DIR ) /modules/boardmodules.mk
52
52
53
53
# qstr definitions (must come before including py.mk)
54
54
QSTR_DEFS = qstrdefsport.h
@@ -113,7 +113,7 @@ NRF_DEFINES += -D$(MCU_SUB_VARIANT_UPPER)
113
113
NRF_DEFINES += -DCONFIG_GPIO_AS_PINRESET
114
114
115
115
MAKE_PINS = boards/make-pins.py
116
- BOARD_PINS = boards/ $( BOARD ) /pins.csv
116
+ BOARD_PINS = $( BOARD_DIR ) /pins.csv
117
117
AF_FILE = $(MCU_VARIANT ) _af.csv
118
118
PREFIX_FILE = boards/$(MCU_VARIANT ) _prefix.c
119
119
GEN_PINS_SRC = $(BUILD ) /pins_gen.c
@@ -139,7 +139,7 @@ endif
139
139
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES ) )
140
140
CFLAGS += $(INC ) -Wall -Werror -ansi -std=c11 -nostdlib $(COPT ) $(NRF_DEFINES ) $(CFLAGS_EXTRA )
141
141
CFLAGS += -fno-strict-aliasing
142
- CFLAGS += -Iboards/ $( BOARD )
142
+ CFLAGS += -I $( BOARD_DIR )
143
143
CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT ) _hal.h>'
144
144
145
145
LDFLAGS += $(CFLAGS )
@@ -481,7 +481,7 @@ $(OBJ): | $(HEADER_BUILD)/pins.h
481
481
482
482
# Use a pattern rule here so that make will only call make-pins.py once to make
483
483
# both pins_gen.c and pins.h
484
- $(BUILD ) /% _gen.c $(HEADER_BUILD ) /% .h $(HEADER_BUILD ) /% _af_const.h : boards/ $( BOARD ) /% .csv $(MAKE_PINS ) $(AF_FILE ) $(PREFIX_FILE ) | $(HEADER_BUILD )
484
+ $(BUILD ) /% _gen.c $(HEADER_BUILD ) /% .h $(HEADER_BUILD ) /% _af_const.h : $( BOARD_DIR ) /% .csv $(MAKE_PINS ) $(AF_FILE ) $(PREFIX_FILE ) | $(HEADER_BUILD )
485
485
$(ECHO ) " Create $@ "
486
486
$(Q )$(PYTHON ) $(MAKE_PINS ) --board-csv $(BOARD_PINS ) --af-csv $(AF_FILE ) --prefix $(PREFIX_FILE ) \
487
487
--output-source $(GEN_PINS_SRC ) --output-header $(GEN_PINS_HDR ) --output-af-const $(GEN_PINS_AF_CONST )
0 commit comments