esp8266: Add "erase" target to Makefile, to erase entire flash.

This commit is contained in:
Mike Causer 2016-12-15 00:34:40 +11:00 committed by Damien George
parent 48d81c6900
commit 87e426c7c7
1 changed files with 4 additions and 0 deletions

View File

@ -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)