mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esptool.py & Makefile: Fix compressed upload support (enabled by default)
This commit is contained in:
parent
550c7a4446
commit
aa4c31f3b0
@ -33,7 +33,7 @@ clean: bootloader-clean
|
|||||||
|
|
||||||
bootloader: $(BOOTLOADER_BIN)
|
bootloader: $(BOOTLOADER_BIN)
|
||||||
@echo "Bootloader built. Default flash command is:"
|
@echo "Bootloader built. Default flash command is:"
|
||||||
@echo "$(ESPTOOLPY_SERIAL) write_flash 0x1000 $(BOOTLOADER_BIN)"
|
@echo "$(ESPTOOLPY_WRITE_FLASH) 0x1000 $(BOOTLOADER_BIN)"
|
||||||
|
|
||||||
all_binaries: $(BOOTLOADER_BIN)
|
all_binaries: $(BOOTLOADER_BIN)
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@ PYTHON ?= $(call dequote,$(CONFIG_PYTHON))
|
|||||||
ESPTOOLPY := $(PYTHON) $(IDF_PATH)/bin/esptool.py --chip esp32
|
ESPTOOLPY := $(PYTHON) $(IDF_PATH)/bin/esptool.py --chip esp32
|
||||||
ESPTOOLPY_SERIAL := $(ESPTOOLPY) --port $(ESPPORT) --baud $(ESPBAUD)
|
ESPTOOLPY_SERIAL := $(ESPTOOLPY) --port $(ESPPORT) --baud $(ESPBAUD)
|
||||||
|
|
||||||
APP_FLASH_COMMAND=$(ESPTOOLPY_SERIAL) write_flash $(CONFIG_APP_OFFSET) $(APP_BIN)
|
ESPTOOLPY_WRITE_FLASH=$(ESPTOOLPY_SERIAL) write_flash $(if $(CONFIG_ESPTOOLPY_COMPRESSED),-z)
|
||||||
|
|
||||||
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_APP_OFFSET) $(APP_BIN)
|
ESPTOOL_ALL_FLASH_ARGS += $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
|
||||||
$(APP_BIN): $(APP_ELF)
|
$(APP_BIN): $(APP_ELF)
|
||||||
@ -20,7 +21,7 @@ $(APP_BIN): $(APP_ELF)
|
|||||||
|
|
||||||
flash: all_binaries
|
flash: all_binaries
|
||||||
@echo "Flashing project app to $(CONFIG_APP_OFFSET)..."
|
@echo "Flashing project app to $(CONFIG_APP_OFFSET)..."
|
||||||
$(Q) $(ESPTOOLPY_SERIAL) write_flash $(ESPTOOL_ALL_FLASH_ARGS)
|
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
||||||
|
|
||||||
app-flash: $(APP_BIN)
|
app-flash: $(APP_BIN)
|
||||||
$(Q) $(APP_FLASH_COMMAND)
|
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
.PHONY: build-components menuconfig all build clean all_binaries
|
.PHONY: build-components menuconfig all build clean all_binaries
|
||||||
all: all_binaries # other components will add dependencies to 'all_binaries'
|
all: all_binaries # other components will add dependencies to 'all_binaries'
|
||||||
@echo "To flash all build output, run 'make flash' or:"
|
@echo "To flash all build output, run 'make flash' or:"
|
||||||
@echo $(ESPTOOLPY_SERIAL) write_flash $(ESPTOOL_ALL_FLASH_ARGS)
|
@echo $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
||||||
|
|
||||||
# (the reason all_binaries is used instead of 'all' is so that the flash target
|
# (the reason all_binaries is used instead of 'all' is so that the flash target
|
||||||
# can build everything without triggering the per-component "to flash..."
|
# can build everything without triggering the per-component "to flash..."
|
||||||
@ -174,7 +174,7 @@ $(APP_ELF): $(addsuffix -build,$(notdir $(COMPONENT_PATHS_BUILDABLE)))
|
|||||||
# component's Makefile.projbuild
|
# component's Makefile.projbuild
|
||||||
app: $(APP_BIN)
|
app: $(APP_BIN)
|
||||||
@echo "App built. Default flash app command is:"
|
@echo "App built. Default flash app command is:"
|
||||||
@echo $(APP_FLASH_COMMAND) # APP_FLASH_COMMAND is set in esptool_py's Makefile.projbuild
|
@echo $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
|
||||||
all_binaries: $(APP_BIN)
|
all_binaries: $(APP_BIN)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user