Skip to content

Commit

Permalink
Fixed incorect arguments for stlink_upload
Browse files Browse the repository at this point in the history
The number of arguments being passed to the stlink_upload script on
linux, linux64, macosx is one (this may have been more in the past but
the with version 1.8.8) this is now only a single argument.

The change changes the variable referenced in the script from $4 to $1.

This change already appears to have been applied to the windows version
of the script.
  • Loading branch information
timsavage committed Mar 30, 2019
1 parent ee0caa6 commit 398fff6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/linux/stlink_upload
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
$(dirname $0)/stlink/st-flash write "$4" 0x8000000
$(dirname $0)/stlink/st-flash write "$1" 0x8000000
exit 0

## Remove the lines 2 and 3 (above) if you want this script to wait until the Serial device has been enumerated and loaded before the script exits
Expand Down
2 changes: 1 addition & 1 deletion tools/linux64/stlink_upload
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ USBRESET=$(which usb-reset) || USBRESET="./usb-reset"
LEAF_STATUS=$(leaf_status)
echo "USB Status [$LEAF_STATUS]"

$(dirname $0)/stlink/st-flash write "$4" 0x8000000
$(dirname $0)/stlink/st-flash write "$1" 0x8000000

sleep 4
# Reset the usb device to bring up the tty rather than DFU
Expand Down
2 changes: 1 addition & 1 deletion tools/macosx/stlink_upload
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
$(dirname $0)/stlink/st-flash write "$4" 0x8000000
$(dirname $0)/stlink/st-flash write "$1" 0x8000000

0 comments on commit 398fff6

Please sign in to comment.