File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ endif()
13
13
# Set the board directory and check that it exists.
14
14
if (NOT MICROPY_BOARD_DIR )
15
15
set (MICROPY_BOARD_DIR ${MICROPY_PORT_DIR} /boards/${MICROPY_BOARD} )
16
+ else ()
17
+ if (NOT IS_ABSOLUTE "${MICROPY_BOARD_DIR} " )
18
+ set (MICROPY_BOARD_DIR "${MICROPY_PORT_DIR} /${MICROPY_BOARD_DIR} " )
19
+ endif ()
16
20
endif ()
17
21
if (NOT EXISTS ${MICROPY_BOARD_DIR} /mpconfigboard.cmake )
18
22
message (FATAL_ERROR "Invalid MICROPY_BOARD specified: ${MICROPY_BOARD} " )
Original file line number Diff line number Diff line change 5
5
# Select the board to build for, defaulting to GENERIC.
6
6
BOARD ?= GENERIC
7
7
8
+ BOARD_DIR ?= boards/$(BOARD )
9
+ ifeq ($(wildcard $(BOARD_DIR ) /.) ,)
10
+ $(error Invalid BOARD specified : $(BOARD_DIR ) )
11
+ endif
12
+
8
13
# If the build directory is not given, make it reflect the board name.
9
14
BUILD ?= build-$(BOARD )
10
15
@@ -28,7 +33,7 @@ ifdef USER_C_MODULES
28
33
CMAKE_ARGS += -DUSER_C_MODULES=${USER_C_MODULES}
29
34
endif
30
35
31
- IDFPY_FLAGS += -D MICROPY_BOARD=$(BOARD ) -B $(BUILD ) $(CMAKE_ARGS )
36
+ IDFPY_FLAGS += -D MICROPY_BOARD_DIR= $( BOARD_DIR ) -D MICROPY_BOARD=$(BOARD ) -B $(BUILD ) $(CMAKE_ARGS )
32
37
33
38
ifdef FROZEN_MANIFEST
34
39
IDFPY_FLAGS += -D MICROPY_FROZEN_MANIFEST=$(FROZEN_MANIFEST )
You can’t perform that action at this time.
0 commit comments