From 778a7d05aaa9733d065e9e7aeac8a75a0067e36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NEDJAR?= Date: Thu, 9 Apr 2026 16:20:02 +0200 Subject: [PATCH 1/3] tooling: Auto-init submodules in make firmware if missing. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 591ae787..345b2db0 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,10 @@ $(MPY_DIR): .PHONY: firmware firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers + @if [ ! -f "$(MPY_DIR)/lib/micropython-lib/README.md" ]; then \ + echo "Initializing submodules for $(BOARD)..."; \ + cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) submodules; \ + fi @echo "Linking local drivers..." rm -rf $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib ln -s $(CURDIR) $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib From e9fa5ece3b5ca5ca7de45f165ad305bc1ebcd408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NEDJAR?= Date: Thu, 9 Apr 2026 16:25:53 +0200 Subject: [PATCH 2/3] fix: Add set -e to firmware targets to fail-fast on errors. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 345b2db0..15806385 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,7 @@ $(MPY_DIR): .PHONY: firmware firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers + set -e @if [ ! -f "$(MPY_DIR)/lib/micropython-lib/README.md" ]; then \ echo "Initializing submodules for $(BOARD)..."; \ cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) submodules; \ @@ -111,6 +112,7 @@ firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers .PHONY: firmware-update firmware-update: $(MPY_DIR) ## Update the MicroPython clone and board-specific submodules + set -e @echo "Updating micropython-steami..." rm -rf $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib cd $(CURDIR)/$(MPY_DIR) && git fetch origin && git checkout $(MICROPYTHON_BRANCH) && git checkout -- lib/micropython-steami-lib && git pull --ff-only From 3d12432f56afb17007654e60849e90f5cdcac810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NEDJAR?= Date: Thu, 9 Apr 2026 16:27:31 +0200 Subject: [PATCH 3/3] style: Silence set -e with @ prefix in firmware targets. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 15806385..62768eb6 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ $(MPY_DIR): .PHONY: firmware firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers - set -e + @set -e @if [ ! -f "$(MPY_DIR)/lib/micropython-lib/README.md" ]; then \ echo "Initializing submodules for $(BOARD)..."; \ cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) submodules; \ @@ -112,7 +112,7 @@ firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers .PHONY: firmware-update firmware-update: $(MPY_DIR) ## Update the MicroPython clone and board-specific submodules - set -e + @set -e @echo "Updating micropython-steami..." rm -rf $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib cd $(CURDIR)/$(MPY_DIR) && git fetch origin && git checkout $(MICROPYTHON_BRANCH) && git checkout -- lib/micropython-steami-lib && git pull --ff-only