From 982ffdee7e5a5054d81fdef713da31615a3cf80d Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 25 Jan 2024 11:30:14 +1100 Subject: [PATCH] stm32/mboot/Makefile: Revert change to BOARD_DIR that removed abspath. This reverts the change from ce2058685b9ca2278849b3117c2461f6b6fc727f. Without abspath, the build artefacts (object files) for boards with source files are placed outside the build directory, because the BOARD_DIR variable starts with "..". For the list of source files added to SRC_C, none of them can start with "..". The usual fix for that would be to make the files relative to the top of the MicroPython repo (because of the vpath rule), eg ports/stm32/boards/$(BOARD). But then the $(wildcard ...) pattern won't find files in this directory. So abspath is necessary, although it will prevent building when there is a space in the path. A better solution for spaces needs to be found. Signed-off-by: Damien George --- ports/stm32/mboot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm32/mboot/Makefile b/ports/stm32/mboot/Makefile index 9908194237..389f9f5d0f 100755 --- a/ports/stm32/mboot/Makefile +++ b/ports/stm32/mboot/Makefile @@ -6,7 +6,7 @@ BOARD ?= $(notdir $(BOARD_DIR:/=)) else # If not given on the command line, then default to PYBV10. BOARD ?= PYBV10 -BOARD_DIR ?= ../boards/$(BOARD) +BOARD_DIR ?= $(abspath ../boards/$(BOARD)) endif # If the build directory is not given, make it reflect the board name.