esp8266: Add "reset" target to Makefile.

Just always keep jumper in bootloader position. After flashing, uPy
automatically executed. And to get back to bootloader, do "make reset".
This commit is contained in:
Paul Sokolovsky 2015-01-31 00:51:12 +02:00
parent eca9a9323a
commit 8fff7f8d38
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ deploy: $(BUILD)/firmware-combined.bin
#$(Q)esptool.py --port $(PORT) write_flash 0 $<
$(Q)esptool.py --port $(PORT) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin 0x10000 $(BUILD)/firmware.elf-0x10000.bin
reset:
echo -e "\r\nimport pyb; pyb.hard_reset()\r\n" >$(PORT)
$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf
$(ECHO) "Create $@"
$(Q)esptool.py elf2image $^