Skip to content

Commit 8fff7f8

Browse files
committed
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".
1 parent eca9a93 commit 8fff7f8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

esp8266/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ deploy: $(BUILD)/firmware-combined.bin
8080
#$(Q)esptool.py --port $(PORT) write_flash 0 $<
8181
$(Q)esptool.py --port $(PORT) write_flash 0 $(BUILD)/firmware.elf-0x00000.bin 0x10000 $(BUILD)/firmware.elf-0x10000.bin
8282

83+
reset:
84+
echo -e "\r\nimport pyb; pyb.hard_reset()\r\n" >$(PORT)
85+
8386
$(BUILD)/firmware-combined.bin: $(BUILD)/firmware.elf
8487
$(ECHO) "Create $@"
8588
$(Q)esptool.py elf2image $^

0 commit comments

Comments
 (0)