mirror of
https://github.com/google/pebble.git
synced 2025-03-15 08:41:21 +00:00
25 lines
385 B
Text
25 lines
385 B
Text
|
#!/bin/bash
|
||
|
|
||
|
set -o errexit
|
||
|
|
||
|
SCRIPTDIR="${0%/*}"
|
||
|
IMGFILE="${SCRIPTDIR}/build/tintin_boot.hex"
|
||
|
|
||
|
if [ ! -f "${IMGFILE}" ]; then
|
||
|
echo "Cannot find bootloader binary at '${IMGFILE}'."
|
||
|
echo "Try running './waf build'"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
OPENOCD_SCRIPT="
|
||
|
init
|
||
|
reset halt
|
||
|
flash write_image erase \"${IMGFILE}\"
|
||
|
reset
|
||
|
shutdown
|
||
|
"
|
||
|
|
||
|
openocd -f openocd.cfg -c "${OPENOCD_SCRIPT}"
|
||
|
|
||
|
# vim:filetype=sh
|