From 63af6f4cc4deac8103b06559a660bc0017f21363 Mon Sep 17 00:00:00 2001 From: Andrew Clink Date: Thu, 25 Jan 2018 09:16:31 -0700 Subject: [PATCH] Add makefile flash hooks --- common.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common.mk b/common.mk index 4ece70a..f94752d 100644 --- a/common.mk +++ b/common.mk @@ -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)