mirror of
https://github.com/hatlabs/SH-ESP32-test-jig.git
synced 2025-05-16 15:20:18 -07:00
Add an autoflash script
This commit is contained in:
parent
032be6eef7
commit
e7f9e1f82e
18
device-under-test/autoflash.sh
Executable file
18
device-under-test/autoflash.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
shopt -s inherit_errexit
|
||||||
|
|
||||||
|
SERIAL_DEV=/dev/tty.usbserial-310
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo "Insert device."
|
||||||
|
if [ -c $SERIAL_DEV ]; then
|
||||||
|
pio run -e esp32dev -t upload
|
||||||
|
echo "Done. Remove device."
|
||||||
|
while [ -c $SERIAL_DEV ] ; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user