@@ -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
122122if [ -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
127127else
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
208208fi
209209if [ -z " ${FILEPATH} " ]; then
210- echo " Error missing file argmument !" >&2
210+ echo " Error missing binary file argument !" >&2
211211 usage 1
212212fi
213213if [ ! -r " ${FILEPATH} " ]; then
0 commit comments