Merge pull request #556 from andrewclink/master

Add makefile flash hooks
This commit is contained in:
Ruslan V. Uss 2018-02-09 13:04:04 +05:00 committed by GitHub
commit 5f8b3d43c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -244,11 +244,15 @@ $(FW_FILE): $(PROGRAM_OUT) $(FIRMWARE_DIR)
$(Q) $(ESPTOOL) elf2image --version=2 $(ESPTOOL_ARGS) $< -o $(FW_FILE)
flash: all
$(if will_flash, $(call will_flash, "flash"))
$(ESPTOOL) -p $(ESPPORT) --baud $(ESPBAUD) write_flash $(ESPTOOL_ARGS) \
0x0 $(RBOOT_BIN) 0x1000 $(RBOOT_CONF) 0x2000 $(FW_FILE) $(SPIFFS_ESPTOOL_ARGS)
$(if did_flash, $(call did_flash, "flash"))
erase_flash:
$(if will_flash, $(call will_flash, "erase"))
$(ESPTOOL) -p $(ESPPORT) --baud $(ESPBAUD) erase_flash
$(if did_flash, $(call did_flash, "erase"))
size: $(PROGRAM_OUT)
$(Q) $(CROSS)size --format=sysv $(PROGRAM_OUT)