pebble/platform/silk/boot/flash
2025-01-27 11:38:16 -08:00

24 lines
385 B
Bash
Executable file

#!/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