Add makefile flash hooks

This commit is contained in:
Andrew Clink 2018-01-25 09:16:31 -07:00
parent 42e342e3dd
commit 63af6f4cc4

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)