From 19f5da9e1bf23821095da2252c2f3c2381f2fe21 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Fri, 8 Jul 2022 15:26:52 +1000 Subject: [PATCH] esp32/Makefile: Force micropython-lib as a required submodule. Also use mkrules.mk's submodule target rather than duplicating the call to `submodule sync`. Until we can find a way to use idf.py/cmake to discover submodules we have no way to discover optional or board-specific submodules so need to err on the side of including everything. Signed-off-by: Jim Mussared --- ports/esp32/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index 88f946fa98..b7d804d073 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -14,7 +14,11 @@ BAUD ?= 460800 PYTHON ?= python3 -GIT_SUBMODULES += lib/berkeley-db-1.xx +# Would be good to use cmake to discover submodules (see how rp2/Makefile does +# it), but on ESP32 the same trick doesn't work because "idf.py build" fails +# on berkeley-db dependency before printing out the submodule list. +# For now just force the submodule dependencies here. +GIT_SUBMODULES += lib/berkeley-db-1.xx lib/micropython-lib .PHONY: all clean deploy erase submodules FORCE @@ -52,4 +56,4 @@ erase: idf.py $(IDFPY_FLAGS) -p $(PORT) -b $(BAUD) erase_flash submodules: - git submodule update --init $(addprefix ../../,$(GIT_SUBMODULES)) + $(MAKE) -f ../../py/mkrules.mk GIT_SUBMODULES="$(GIT_SUBMODULES)" submodules