RRG-Proxmark3/tools/jtag_openocd/openocd_flash_recovery.sh
2021-02-04 13:10:29 +01:00

11 lines
310 B
Bash
Executable File

#!/usr/bin/env bash
cd $(dirname "$0")
. openocd_configuration || exit 1
if [ ! -e "$IMAGE" ]; then
echo "$IMAGE missing. Abort!"
exit 1
fi
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_BOARD -c "init;halt;flash erase_sector 0 0 15;flash erase_sector 1 0 15;flash write_image $IMAGE 0x100000;exit"