1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/cc2538dk/dist/flash.sh
cladmi 52b0b183a3
boards/flash.sh: rename HEXFILE to BINFILE
Flasher are doing 'loadbin' so use BINFILE name.
2018-11-26 16:39:11 +01:00

24 lines
665 B
Bash
Executable File

#!/bin/sh
# This flash script dynamically generates a file with a set of commands which
# have to be handed to the flashing script of SEGGER (JLinkExe >4.84).
# After that, JLinkExe will be executed with that set of commands to flash the
# latest .bin file to the board.
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
BINDIR=$1
BINFILE=$2
FLASHADDR=200000
# setup JLink command file
echo "speed 1000" > $BINDIR/burn.seg
echo "loadbin $BINFILE $FLASHADDR" >> $BINDIR/burn.seg
echo "r" >> $BINDIR/burn.seg
echo "g" >> $BINDIR/burn.seg
echo "exit" >> $BINDIR/burn.seg
# flash new binary to the board
JLinkExe -device CC2538SF53 < $BINDIR/burn.seg
echo ""