Skip to content

[maple_upload] Improve script on linux and macosx #62

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

Merged
merged 5 commits into from
May 5, 2020
Merged

[maple_upload] Improve script on linux and macosx #62

merged 5 commits into from
May 5, 2020

Conversation

GrantM11235
Copy link
Contributor

This makes it possible to recover if upload-reset isn't working, for example if a board is running a sketch without USB CDC enabled

Changes:

  • Uncomment set -e
  • Ask the user to manually reset their device if upload-reset fails
  • Retry dfu-util if no device is found
  • Print periods while waiting for serial port
  • Exit with an error if script times out while waiting for serial port
  • Send all messages to STDERR

This makes it possible to recover if upload-reset isn't working,
for example if a board is running a sketch without USB CDC enabled

Changes:
* Uncomment `set -e`
* Ask the user to manually reset their device if upload-reset fails
* Retry dfu-util if no device is found
* Print periods while waiting for serial port
* Exit with an error if script times out while waiting for serial port
* Send all messages to STDERR
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR.
shfmt was used to check format, see my comments.
And one thought about the number of retry.

@GrantM11235
Copy link
Contributor Author

Thanks for the review!

Let me know if I should squash those fixes in to the first commit or if I should squash everything to one commit.

Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fpistm fpistm added the enhancement New feature or request label May 5, 2020
@fpistm fpistm added this to the 1.4.0 milestone May 5, 2020
@fpistm fpistm merged commit aa4efdd into stm32duino:master May 5, 2020
@GrantM11235 GrantM11235 deleted the maple-script branch May 5, 2020 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants