unleashed-firmware/scripts/flash_otp_version_dfu.sh
rusdacent 202c1d4b0e
Improved reliability of shell scripts (#699)
* Add double quotes for shell variables
* Added exit for cd command. Prevent run commands after incorrect change directory.
2021-09-13 04:44:02 +03:00

17 lines
266 B
Bash
Executable file

#!/bin/bash
set -x -e
if [ "$#" -ne 1 ]; then
echo "OTP file required"
exit
fi
if [ ! -f "$1" ]; then
echo "Unable to open OTP file"
exit
fi
STM32_Programmer_CLI -c port=usb1 -d "$1" 0x1FFF7000
STM32_Programmer_CLI -c port=usb1 -r8 0x1FFF7000 8