summaryrefslogtreecommitdiff
path: root/tools/mcuboot/flash.sh
diff options
context:
space:
mode:
authorpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-20 21:45:29 (GMT)
committerpanky-codes <pankaj.sarathy1992@gmail.com>2021-03-20 21:45:29 (GMT)
commit534565088033221d29e968acf7267145ff10203b (patch)
treec93ae7c7aa7995204f56b979ff6524feba83763d /tools/mcuboot/flash.sh
parent754ac233040af805ffa2e15b24539d5d02a876e5 (diff)
parenta3ff2e46ca9e663af864a2bd04b9afa3efbddfb8 (diff)
Merged upstream
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 0000000..a2c58c7
--- /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