2018-08-30 10:25:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-05-17 15:50:39 +00:00
|
|
|
#SERIAL_PORT=/dev/ttyUSB0
|
2018-08-30 10:25:14 +00:00
|
|
|
#SERIAL_PORT=/dev/tty.SLAB_USBtoUART
|
|
|
|
SERIAL_PORT=/dev/tty.wchusbserial1410
|
2018-02-15 19:33:11 +00:00
|
|
|
|
2018-08-15 06:36:11 +00:00
|
|
|
all: flash delay libs config update reset
|
|
|
|
|
|
|
|
delay:
|
|
|
|
sleep 3
|
2018-05-22 18:42:11 +00:00
|
|
|
|
2018-07-11 19:12:08 +00:00
|
|
|
reset:
|
2018-05-22 18:42:11 +00:00
|
|
|
esptool.py -p $(SERIAL_PORT) --after hard_reset read_mac
|
|
|
|
|
2018-08-15 06:36:11 +00:00
|
|
|
libs:
|
2018-07-11 19:12:08 +00:00
|
|
|
ampy -d 0.5 -p $(SERIAL_PORT) put uwebsockets.py
|
2018-01-10 21:21:26 +00:00
|
|
|
|
|
|
|
update:
|
2018-07-11 19:12:08 +00:00
|
|
|
ampy -d 0.5 -p $(SERIAL_PORT) put hal.py
|
|
|
|
ampy -d 0.5 -p $(SERIAL_PORT) put main.py
|
|
|
|
ampy -d 0.5 -p $(SERIAL_PORT) put boot.py
|
2018-01-10 21:21:26 +00:00
|
|
|
|
2018-01-12 09:11:36 +00:00
|
|
|
config:
|
2018-07-11 19:12:08 +00:00
|
|
|
ampy -d 0.5 -p $(SERIAL_PORT) put config.json
|
2018-01-10 21:21:26 +00:00
|
|
|
|
|
|
|
flash:
|
2018-02-15 19:33:11 +00:00
|
|
|
esptool.py -p $(SERIAL_PORT) -b 460800 erase_flash
|
|
|
|
esptool.py -p $(SERIAL_PORT) -b 460800 write_flash --flash_mode dio 0x1000 esp32-*.bin
|