-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·38 lines (36 loc) · 890 Bytes
/
deploy.sh
File metadata and controls
executable file
·38 lines (36 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
check_exists() {
command -v "$1" > /dev/null
}
if ! check_exists esptool.py
then
echo "esptool.py not installed!"
echo "install with this command: pip install esptool"
exit 1
fi
if ! check_exists ldproxy
then
echo "ldproxy not installed!"
echo "install with this command: cargo install ldproxy"
exit 1
fi
if ! check_exists cargo-espflash
then
echo "cargo-espflash not installed!"
echo "install with this command: cargo install cargo-espflash"
exit 1
fi
if ! check_exists espflash
then
echo "espflash not installed!"
echo "install with this command: cargo install espflash"
exit 1
fi
cargo espflash erase-flash
cd factory
cargo espflash flash --release
cd ../sphinx-key
cargo espflash save-image --bin sphinx-key --release --chip esp32c3 sphinx-key.bin
espflash write-bin 0x50000 sphinx-key.bin
cargo espflash monitor