Skip to content

Commit 778a7d0

Browse files
committed
tooling: Auto-init submodules in make firmware if missing.
1 parent 5086533 commit 778a7d0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ $(MPY_DIR):
9898

9999
.PHONY: firmware
100100
firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers
101+
@if [ ! -f "$(MPY_DIR)/lib/micropython-lib/README.md" ]; then \
102+
echo "Initializing submodules for $(BOARD)..."; \
103+
cd $(CURDIR)/$(MPY_DIR)/ports/stm32 && $(MAKE) BOARD=$(BOARD) submodules; \
104+
fi
101105
@echo "Linking local drivers..."
102106
rm -rf $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib
103107
ln -s $(CURDIR) $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib

0 commit comments

Comments
 (0)