aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mcuboot/flash.sh
diff options
context:
space:
mode:
authorNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
committerNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
commite5e3fc02b8a2adf9ea100c162d1290cecdf617ef (patch)
tree78d4da0239ff8bf7a8694c28f804f81d2496979f /tools/mcuboot/flash.sh
parent14bd790701f4e2f6d75ef8a1f52b9f38023c2dd9 (diff)
parent9f9d0eb5df8ff86b9cd1e095afa3159094dde53c (diff)
Updated to include WatchFaceAnalog and fixed clashes
Diffstat (limited to 'tools/mcuboot/flash.sh')
-rw-r--r--tools/mcuboot/flash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/mcuboot/flash.sh b/tools/mcuboot/flash.sh
new file mode 100644
index 00000000..a2c58c75
--- /dev/null
+++ b/tools/mcuboot/flash.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+
+source $(dirname $0)/../target.sh
+
+lscript=/tmp/flash$$.jlink
+
+cat >$lscript <<EOF
+h
+r
+loadfile outdir/$BOARD/zephyr.bin $BASE_BOOT
+loadfile hello.signed.bin $BASE_PRIMARY_SLOT
+loadfile shell.signed.bin $BASE_SECONDARY_SLOT
+q
+EOF
+
+JLinkExe -device $SOC -si SWD -speed auto \
+ -CommanderScript $lscript
+rm $lscript