Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(stm32CubeProg): use getopt and extend options #97

Merged
merged 5 commits into from
Jun 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(maple_upload): replace usbID by usb vid and pid
Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Mar 30, 2024
commit b84d4ff2a3f70f412e0ea877377d1a0a28681268
11 changes: 6 additions & 5 deletions maple_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

set -e

if [ $# -lt 4 ]; then
echo "Usage: $0 <dummy_port> <altID> <usbID> <binfile>" >&2
if [ $# -lt 5 ]; then
echo "Usage: $0 <dummy_port> <altID> <usbVID> <usbPID> <binfile>" >&2
exit 1
fi
altID="$2"
usbID="$3"
binfile="$4"
usbVID=${3#"0x"}
usbPID=${4#"0x"}
binfile="$5"
EXT=""

UNAME_OS="$(uname -s)"
Expand Down Expand Up @@ -52,7 +53,7 @@ fi

COUNTER=5
while
"${DIR}/dfu-util.sh" -d "${usbID}" -a "${altID}" -D "${binfile}" -R
"${DIR}/dfu-util.sh" -d "${usbVID}:${usbPID}" -a "${altID}" -D "${binfile}" -R
ret=$?
do
if [ $ret -eq 0 ]; then
Expand Down