mirror of
https://github.com/stakwork/sphinx-key.git
synced 2026-02-02 14:24:22 +01:00
Also take this opportunity to update the READMEs given the new little deploy.sh script we put together
26 lines
656 B
Bash
Executable File
26 lines
656 B
Bash
Executable File
check_port() {
|
|
cargo espflash board-info "$1" &> /dev/null
|
|
}
|
|
for FILE in /dev/tty.*
|
|
do
|
|
if check_port $FILE
|
|
then
|
|
PORT=$FILE
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [ -z "$PORT" ]
|
|
then
|
|
echo "ESP likely not connected! Exiting now."
|
|
exit 1
|
|
fi
|
|
git pull
|
|
cd factory
|
|
cargo espflash --release $PORT
|
|
cd ../sphinx-key
|
|
cargo build
|
|
esptool.py --chip esp32-c3 elf2image target/riscv32imc-esp-espidf/debug/sphinx-key
|
|
esptool.py --chip esp32c3 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x80000 target/riscv32imc-esp-espidf/debug/sphinx-key.bin
|
|
cargo espflash serial-monitor $PORT
|