@@ -42,13 +42,13 @@ UNAME_OS="$(uname -s)"
42
42
case " ${UNAME_OS} " in
43
43
Linux* )
44
44
STM32CP_CLI=STM32_Programmer.sh
45
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
45
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
46
46
export PATH=" $HOME /STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin" :" $PATH "
47
47
fi
48
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
48
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
49
49
export PATH=" /opt/stm32cubeprog/bin" :" $PATH "
50
50
fi
51
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
51
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
52
52
echo " STM32CubeProgrammer not found ($STM32CP_CLI )."
53
53
echo " Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:"
54
54
echo " https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -58,10 +58,10 @@ case "${UNAME_OS}" in
58
58
;;
59
59
Darwin* )
60
60
STM32CP_CLI=STM32_Programmer_CLI
61
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
61
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
62
62
export PATH=" /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin" :" $PATH "
63
63
fi
64
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
64
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
65
65
echo " STM32CubeProgrammer not found ($STM32CP_CLI )."
66
66
echo " Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:"
67
67
echo " https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -71,7 +71,7 @@ case "${UNAME_OS}" in
71
71
;;
72
72
Windows* )
73
73
STM32CP_CLI=STM32_Programmer_CLI.exe
74
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
74
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
75
75
if [ -n " ${PROGRAMFILES+x} " ]; then
76
76
STM32CP86=${PROGRAMFILES} /STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
77
77
export PATH=" ${STM32CP86} " :" $PATH "
@@ -80,7 +80,7 @@ case "${UNAME_OS}" in
80
80
STM32CP=${PROGRAMW6432} /STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin
81
81
export PATH=" ${STM32CP} " :" $PATH "
82
82
fi
83
- if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
83
+ if ! command -v $STM32CP_CLI > /dev/null 2>&1 ; then
84
84
echo " STM32CubeProgrammer not found ($STM32CP_CLI )."
85
85
echo " Please install it or add '<STM32CubeProgrammer path>\bin' to your PATH environment:"
86
86
echo " https://www.st.com/en/development-tools/stm32cubeprog.html"
@@ -143,6 +143,6 @@ if [ $# -gt 0 ]; then
143
143
OPTS=" $* "
144
144
fi
145
145
146
- ${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE: +" -e all" } -q -d " ${FILEPATH} " ${ADDRESS} " ${OPTS} "
146
+ ${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE: +" -e all" } -q -d " ${FILEPATH} " " ${ADDRESS} " " ${OPTS} "
147
147
148
148
exit $?
0 commit comments