2016-11-27 13:51:48 +00:00
|
|
|
#! /bin/bash
|
2017-09-08 10:27:41 +00:00
|
|
|
cd /mnt/qnap2/data/Projects/MicroPython/micropython/ports/esp8266
|
|
|
|
|
2016-11-27 13:51:48 +00:00
|
|
|
if [ $# -eq 1 ] && [ $1 = "--clean" ]
|
2017-09-08 10:27:41 +00:00
|
|
|
then
|
|
|
|
make clean
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $# -eq 1 ] && [ $1 = "--erase" ]
|
2016-11-27 13:51:48 +00:00
|
|
|
then
|
|
|
|
make clean
|
|
|
|
esptool.py --port /dev/ttyUSB0 erase_flash
|
|
|
|
fi
|
2017-09-08 10:27:41 +00:00
|
|
|
|
|
|
|
if make -j 8
|
2016-11-27 13:51:48 +00:00
|
|
|
then
|
2017-09-08 10:27:41 +00:00
|
|
|
sleep 1
|
2019-10-18 09:37:54 +00:00
|
|
|
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=detect -fm dio 0 build-GENERIC/firmware-combined.bin
|
2017-09-08 10:27:41 +00:00
|
|
|
cd -
|
|
|
|
sleep 4
|
|
|
|
rshell -p /dev/ttyUSB0 --editor nano --buffer-size=30
|
2016-11-27 13:51:48 +00:00
|
|
|
else
|
2017-09-08 10:27:41 +00:00
|
|
|
echo Build failure
|
2016-11-27 13:51:48 +00:00
|
|
|
fi
|
2016-11-27 13:56:27 +00:00
|
|
|
cd -
|