You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
838 B
28 lines
838 B
rm -f firmware/*bin
|
|
cp /home/wes/code/nodemcu-firmware/bin/*bin ./firmware
|
|
rm -f sources/lfs.img
|
|
cd sources && ./compile.sh
|
|
cd ../
|
|
|
|
nodemcu-tool reset
|
|
function reset_flash() {
|
|
nodemcu-tool reset
|
|
esptool.py --port /dev/ttyUSB0 erase_flash
|
|
esptool.py --port /dev/ttyUSB0 write_flash -fm qio 0x00000 firmware/0x00000.bin
|
|
esptool.py --port /dev/ttyUSB0 write_flash -fm qio 0x10000 firmware/0x10000.bin
|
|
}
|
|
|
|
reset_flash
|
|
|
|
CONN_DELAY=5000
|
|
|
|
nodemcu-tool --connection-delay $CONN_DELAY remove lfs.img
|
|
nodemcu-tool --connection-delay $CONN_DELAY upload sources/lfs.img
|
|
|
|
while [[ $? != 0 ]]; do
|
|
nodemcu-tool --connection-delay $CONN_DELAY upload sources/lfs.img
|
|
done
|
|
#
|
|
echo 'print(node.LFS.reload("lfs.img"))' | nodemcu-tool --connection-delay $CONN_DELAY terminal
|
|
nodemcu-tool --connection-delay $CONN_DELAY remove lfs.img
|
|
nodemcu-terminal
|
|
|