Skip to content

Commit b84d4ff

Browse files
committed
feat(maple_upload): replace usbID by usb vid and pid
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent f0c3abe commit b84d4ff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

maple_upload.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
set -e
44

5-
if [ $# -lt 4 ]; then
6-
echo "Usage: $0 <dummy_port> <altID> <usbID> <binfile>" >&2
5+
if [ $# -lt 5 ]; then
6+
echo "Usage: $0 <dummy_port> <altID> <usbVID> <usbPID> <binfile>" >&2
77
exit 1
88
fi
99
altID="$2"
10-
usbID="$3"
11-
binfile="$4"
10+
usbVID=${3#"0x"}
11+
usbPID=${4#"0x"}
12+
binfile="$5"
1213
EXT=""
1314

1415
UNAME_OS="$(uname -s)"
@@ -52,7 +53,7 @@ fi
5253

5354
COUNTER=5
5455
while
55-
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" -R
56+
"${DIR}/dfu-util.sh" -d "${usbVID}:${usbPID}" -a "${altID}" -D "${binfile}" -R
5657
ret=$?
5758
do
5859
if [ $ret -eq 0 ]; then

0 commit comments

Comments
 (0)