misc script to flasg nRF51 under linux

This commit is contained in:
Gordon Williams 2016-01-13 14:30:29 +00:00
parent a08421af7d
commit 0d131bd8cd

15
scripts/flash_nrf51_openocd.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
if [ $# -ne 1 ]
then
echo "USAGE:"
echo "scripts/flash_nrf51_openocd.sh espruino_XXXX.hex"
exit 1
fi
FIRMWARE=$1
# must be hex file
OPENOCD=`dirname $0`/../openocd-0.9.0
# OpenOCD from https://github.com/adafruit/Adafruit_nRF51822_Flasher
$OPENOCD/ubuntu/openocd -s $OPENOCD/scripts -f interface/stlink-v2.cfg -f target/nrf51.cfg -c init -c "reset init" -c halt -c "nrf51 mass_erase" -c "program $FIRMWARE verify" -c reset -c exit