mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-03-26 00:28:15 -04:00
Add script to load pre-loaded app into flash
This commit is contained in:
parent
d239b952b0
commit
9e878c3288
21
hw/application_fpga/tools/load_preloaded_app.sh
Executable file
21
hw/application_fpga/tools/load_preloaded_app.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/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"
|
Loading…
x
Reference in New Issue
Block a user