From 9c837a6f694b6d000eb7b6a5e5c4a1ef820bf25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sun, 23 Dec 2018 23:28:40 +0200 Subject: [PATCH] Add firmware makefile --- .gitignore | 5 +++++ firmware/Makefile | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 firmware/Makefile diff --git a/.gitignore b/.gitignore index ef94eba..c2a4dec 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ _autosave* export *.kicad_pcb-bak *rescue.lib +firmware/*.bin +*.drl +*.g* +*.ps +*.zip diff --git a/firmware/Makefile b/firmware/Makefile new file mode 100644 index 0000000..240cb70 --- /dev/null +++ b/firmware/Makefile @@ -0,0 +1,17 @@ +NAME=esp8266-20180511-v1.9.4.bin + +flash: + wget -c http://micropython.org/resources/firmware/${NAME} + esptool.py -p /dev/ttyUSB0 write_flash 0 ${NAME} + +erase: + esptool.py -p /dev/ttyUSB0 erase_flash + +upload: + ampy -p /dev/ttyUSB0 put picoweb.py + ampy -p /dev/ttyUSB0 put timezone.py + ampy -p /dev/ttyUSB0 put main.py + +console: + echo "Ctrl-A + Ctrl-Q to close Picocom" + picocom -b115200 /dev/ttyUSB0