Skip to content

Commit 2b0f1cd

Browse files
committed
espressif: fix dependencies in esp-idf modules
while developing esp-camera I had the problem that firmware.elf was not regenerated if the only file I edited was in the esp32-camera submodule. By telling make that $(IDF_CMAKE_TARGETS), the list of .a fliles produced by ninja-building esp-idf, depend on esp-idf-stamp and that firmware.elf in turn depends on these files, the ninja build is re-run on each make, which is reasonably quick if nothing needs to be rebuilt.
1 parent cfbfd53 commit 2b0f1cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/espressif/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,13 @@ else
446446
all: $(BUILD)/firmware.bin
447447
endif
448448

449+
$(IDF_CMAKE_TARGETS): esp-idf-stamp
450+
449451
.PHONY: esp-idf-stamp
450452
esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
451453
$(Q)ninja -C $(BUILD)/esp-idf $(IDF_CMAKE_TARGETS)
452454

453-
$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp
455+
$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS)
454456
$(STEPECHO) "LINK $@"
455457
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception
456458

0 commit comments

Comments
 (0)