Skip to content

Commit b667072

Browse files
committed
tooling: Fix firmware targets using absolute paths.
1 parent 3bc8e16 commit b667072

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,23 @@ build: lint test ## Build (lint + test)
8282
# --- Firmware ---
8383

8484
$(MPY_DIR):
85-
@echo "Cloning micropython-steami into $(MPY_DIR)..."
86-
git clone --branch $(MICROPYTHON_BRANCH) $(MICROPYTHON_REPO) $(MPY_DIR)
87-
cd $(MPY_DIR) && git submodule update --init --recursive
85+
@echo "Cloning micropython-steami into $(CURDIR)/$(MPY_DIR)..."
86+
git clone --branch $(MICROPYTHON_BRANCH) $(MICROPYTHON_REPO) $(CURDIR)/$(MPY_DIR)
87+
cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) submodules
8888

8989
.PHONY: firmware
9090
firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers
9191
@echo "Updating submodule to current HEAD..."
92-
cd $(MPY_DIR)/lib/micropython-steami-lib && \
92+
cd $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib && \
9393
git fetch origin && \
9494
git checkout $$(cd $(CURDIR) && git rev-parse HEAD)
9595
@echo "Building firmware for $(BOARD)..."
96-
cd $(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD)
97-
@echo "Firmware ready: $(MPY_DIR)/ports/stm32/build-$(BOARD)/firmware.hex"
96+
cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD)
97+
@echo "Firmware ready: $(CURDIR)/$(MPY_DIR)/ports/stm32/build-$(BOARD)/firmware.hex"
9898

9999
.PHONY: deploy
100100
deploy: ## Flash firmware to the board via OpenOCD
101-
cd $(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) deploy-openocd
101+
cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) deploy-openocd
102102

103103
.PHONY: run
104104
run: ## Copy and run a script on the board (SCRIPT=path/to/file.py)

0 commit comments

Comments
 (0)