Add script to load pre-loaded app into flash

This commit is contained in:
Mikael Ågren 2025-03-13 15:34:14 +01:00 committed by Michael Cardell Widerkrantz
parent d239b952b0
commit 9e878c3288
No known key found for this signature in database
GPG Key ID: D3DB3DDF57E704E5

View 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"