mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
make: Add macro to test for & try to fix up files required for submodules
Now applied to both esptool.py & esp32 wifi libs
This commit is contained in:
@@ -9,7 +9,8 @@ PYTHON ?= $(call dequote,$(CONFIG_PYTHON))
|
||||
# to invoke esptool.py (with or without serial port args)
|
||||
#
|
||||
# NB: esptool.py lives in the sdk/bin directory not the component directory
|
||||
ESPTOOLPY := $(PYTHON) $(COMPONENT_PATH)/esptool/esptool.py --chip esp32
|
||||
ESPTOOLPY_SRC := $(COMPONENT_PATH)/esptool/esptool.py
|
||||
ESPTOOLPY := $(PYTHON) $(ESPTOOLPY_SRC) --chip esp32
|
||||
ESPTOOLPY_SERIAL := $(ESPTOOLPY) --port $(ESPPORT) --baud $(ESPBAUD)
|
||||
|
||||
# the no-stub argument is temporary until esptool.py fully supports compressed uploads
|
||||
@@ -17,12 +18,14 @@ ESPTOOLPY_WRITE_FLASH=$(ESPTOOLPY_SERIAL) $(if $(CONFIG_ESPTOOLPY_COMPRESSED),--
|
||||
|
||||
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||
|
||||
$(APP_BIN): $(APP_ELF)
|
||||
$(APP_BIN): $(APP_ELF) $(ESPTOOLPY_SRC)
|
||||
$(Q) $(ESPTOOLPY) elf2image -o $@ $<
|
||||
|
||||
flash: all_binaries
|
||||
flash: all_binaries $(ESPTOOLPY_SRC)
|
||||
@echo "Flashing project app to $(CONFIG_APP_OFFSET)..."
|
||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
||||
|
||||
app-flash: $(APP_BIN)
|
||||
app-flash: $(APP_BIN) $(ESPTOOLPY_SRC)
|
||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||
|
||||
$(eval $(call SubmoduleRequiredForFiles,$(ESPTOOLPY_SRC)))
|
||||
|
Reference in New Issue
Block a user