From 87e426c7c78051ef817f022c6df7c320a00eba1d Mon Sep 17 00:00:00 2001 From: Mike Causer Date: Thu, 15 Dec 2016 00:34:40 +1100 Subject: [PATCH] esp8266: Add "erase" target to Makefile, to erase entire flash. --- esp8266/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esp8266/Makefile b/esp8266/Makefile index ebf5fc95b6..117ab53f9e 100644 --- a/esp8266/Makefile +++ b/esp8266/Makefile @@ -180,6 +180,10 @@ deploy: $(BUILD)/firmware-combined.bin $(ECHO) "Writing $< to the board" $(Q)esptool.py --port $(PORT) --baud $(BAUD) write_flash --verify --flash_size=$(FLASH_SIZE) --flash_mode=$(FLASH_MODE) 0 $< +erase: + $(ECHO) "Erase flash" + $(Q)esptool.py --port $(PORT) --baud $(BAUD) erase_flash + reset: echo -e "\r\nimport machine; machine.reset()\r\n" >$(PORT)