blob: 7cb5bdb305124479bb5dc7551aeba18fd6ff66bb [file] [log] [blame]
David Brown22a6fe32017-01-10 10:40:43 -07001#! /bin/bash
David Brown79c4fcf2021-01-26 15:04:05 -07002#
3# SPDX-License-Identifier: Apache-2.0
David Brown22a6fe32017-01-10 10:40:43 -07004
5source $(dirname $0)/../target.sh
6
7lscript=/tmp/flash$$.jlink
8
9cat >$lscript <<EOF
10h
11r
12loadfile outdir/$BOARD/zephyr.bin $BASE_BOOT
David Vincze2d736ad2019-02-18 11:50:22 +010013loadfile hello.signed.bin $BASE_PRIMARY_SLOT
14loadfile shell.signed.bin $BASE_SECONDARY_SLOT
David Brown22a6fe32017-01-10 10:40:43 -070015q
16EOF
17
18JLinkExe -device $SOC -si SWD -speed auto \
19 -CommanderScript $lscript
20rm $lscript