From 9e878c3288017d0f145f0522784bd5ff3b4bfe33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=85gren?= Date: Thu, 13 Mar 2025 15:34:14 +0100 Subject: [PATCH] Add script to load pre-loaded app into flash --- .../tools/load_preloaded_app.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 hw/application_fpga/tools/load_preloaded_app.sh diff --git a/hw/application_fpga/tools/load_preloaded_app.sh b/hw/application_fpga/tools/load_preloaded_app.sh new file mode 100755 index 0000000..83163b1 --- /dev/null +++ b/hw/application_fpga/tools/load_preloaded_app.sh @@ -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"