Skip to content

Commit f3cf2b4

Browse files
committed
feat(stm32cubeprog): change -f/--file to -b/-bin
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent c16ca3b commit f3cf2b4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎stm32CubeProg.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ usage() {
2929
3030
Mandatory options:
3131
-i, --interface <'swd'/'dfu'/'serial'/'jlink'> interface identifier: 'swd', 'dfu', 'serial' or 'jlink'
32-
-f, --file <path> file path to be downloaded: bin or hex
32+
-b, --bin <file_path> binary file path to be downloaded: bin or hex
3333
Optional options:
3434
-a, --address <hex value> flash base address. Default: $ADDRESS
3535
-e, --erase erase all sectors before flashing
@@ -120,12 +120,12 @@ esac
120120
# parse command line arguments
121121
# options may be followed by one colon to indicate they have a required arg
122122
if [ -n "${GNU_GETOPT}" ]; then
123-
if ! options=$(getopt a:hi:m:ef:o:c:r:s:d:v:p: "$@"); then
123+
if ! options=$(getopt a:b:hi:m:e:o:c:r:s:d:v:p: "$@"); then
124124
echo "Terminating..." >&2
125125
exit 1
126126
fi
127127
else
128-
if ! options=$(getopt -a -o a:hi:m:ef:o:c:r:s:d:v:p: --long address:,help,interface:,mode:,erase,file:,start:,offset:,com:,rts:,dtr:,vid:,pid:,parity: -- "$@"); then
128+
if ! options=$(getopt -a -o a:b:hi:m:e:o:c:r:s:d:v:p: --long address:,bin:,help,interface:,mode:,erase,start:,offset:,com:,rts:,dtr:,vid:,pid:,parity: -- "$@"); then
129129
echo "Terminating..." >&2
130130
exit 1
131131
fi
@@ -159,7 +159,7 @@ while true; do
159159
ERASE="--erase all"
160160
shift 1
161161
;;
162-
-f | --file)
162+
-b | --bin)
163163
FILEPATH=$2
164164
shift 2
165165
;;
@@ -207,7 +207,7 @@ if [ -z "${INTERFACE}" ]; then
207207
usage 1
208208
fi
209209
if [ -z "${FILEPATH}" ]; then
210-
echo "Error missing file argmument!" >&2
210+
echo "Error missing binary file argument!" >&2
211211
usage 1
212212
fi
213213
if [ ! -r "${FILEPATH}" ]; then

0 commit comments

Comments
 (0)