mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-05-05 07:25:00 -04:00
21 lines
391 B
Bash
Executable file
21 lines
391 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
if [ $# != 1 ]
|
|
then
|
|
echo "Usage: $0 app_file"
|
|
exit
|
|
fi
|
|
|
|
APP="$1"
|
|
|
|
echo "WARNING: Will erase entire partition table."
|
|
read -p "Press CTRL-C to abort. Press key to continue." -n1 -s
|
|
|
|
# Erase partition table
|
|
tillitis-iceprog -o 0x20000 -e 64k
|
|
|
|
# Erase existing pre loaded app
|
|
tillitis-iceprog -o 0x30000 -e 128k
|
|
|
|
# Write pre loaded app
|
|
tillitis-iceprog -o 0x30000 "$APP"
|