mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
misc script to flasg nRF51 under linux
This commit is contained in:
parent
a08421af7d
commit
0d131bd8cd
15
scripts/flash_nrf51_openocd.sh
Executable file
15
scripts/flash_nrf51_openocd.sh
Executable 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
|
||||||
Loading…
x
Reference in New Issue
Block a user