2022-04-26 19:17:21 +00:00
|
|
|
NAME=esp32-20220117-v1.18.bin
|
2018-02-27 07:47:00 +00:00
|
|
|
|
2022-04-26 19:17:21 +00:00
|
|
|
all: flash upload console
|
2018-02-27 07:47:00 +00:00
|
|
|
|
2022-04-26 19:17:21 +00:00
|
|
|
bin/${NAME}:
|
|
|
|
mkdir -p bin
|
|
|
|
wget https://micropython.org/resources/firmware/${NAME} -O bin/${NAME}
|
2018-02-27 07:47:00 +00:00
|
|
|
|
2022-04-26 19:17:21 +00:00
|
|
|
flash: bin/${NAME}
|
2018-02-27 07:47:00 +00:00
|
|
|
esptool.py -p /dev/ttyUSB0 -b 921600 write_flash --flash_mode dio 0x1000 bin/${NAME}
|
|
|
|
sleep 5
|
|
|
|
ampy -p /dev/ttyUSB0 put ssd1306.py
|
|
|
|
|
2022-04-26 19:17:21 +00:00
|
|
|
upload:
|
|
|
|
ampy -p /dev/ttyUSB0 put boot.py
|
|
|
|
ampy -p /dev/ttyUSB0 put main.py
|
|
|
|
|
2018-02-27 07:47:00 +00:00
|
|
|
console:
|
|
|
|
echo "Ctrl-A + Ctrl-Q to close Picocom"
|
|
|
|
picocom -b115200 /dev/ttyUSB0
|