kopia lustrzana https://github.com/peterhinch/micropython-samples
34 wiersze
730 B
Bash
Executable File
34 wiersze
730 B
Bash
Executable File
#! /bin/bash
|
|
cd /mnt/qnap2/data/Projects/MicroPython/micropython/ports/esp8266
|
|
MANIFEST='/mnt/qnap2/Scripts/manifests/esp8266_manifest.py'
|
|
|
|
if [ $# -eq 1 ] && [ $1 = "--clean" ]
|
|
then
|
|
make clean
|
|
fi
|
|
|
|
if [ $# -eq 1 ] && [ $1 = "--erase" ]
|
|
then
|
|
make clean
|
|
if esptool.py --port /dev/ttyUSB0 erase_flash
|
|
then
|
|
echo Flash erased OK
|
|
else
|
|
echo Connection failure
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
make submodules
|
|
if make -j 8 FROZEN_MANIFEST=$MANIFEST
|
|
then
|
|
sleep 1
|
|
esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect -fm dio 0 build-GENERIC/firmware-combined.bin
|
|
cd -
|
|
sleep 4
|
|
rshell -p /dev/ttyUSB0 --editor nano --buffer-size=30
|
|
else
|
|
echo Build failure
|
|
fi
|
|
cd -
|