202c1d4b0e
* Add double quotes for shell variables * Added exit for cd command. Prevent run commands after incorrect change directory.
18 lines
264 B
Bash
Executable File
18 lines
264 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=swd -d "$1" 0x1FFF7000
|
|
|
|
STM32_Programmer_CLI -c port=swd -r8 0x1FFF7000 8
|