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

Add option --bin for choosing one binary when there are more than one binaries #233

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

wzhd
Copy link
Contributor

@wzhd wzhd commented Sep 10, 2022

A beginner in esp decided to build several slightly different binaries by placing the source codes in src/bin in the same project. The following error message is produced when the binary to flash is not specified:

 Error: cargo_espflash::multiple_artifacts
 
   × Failed to build project
   ╰─▶ Multiple build artifacts found
  help: Please specify which artifact to flash using --bin

Running cargo espflash --bin myapp1 /dev/ttyACM0 doesn't seem to solve it, though, with this message:

error: Found argument '--bin' which wasn't expected, or isn't valid in this context

      If you tried to supply `--bin` as a value rather than a flag, use `-- --bin`

This commit adds the option --bin to build_options, which has worked in my case.

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Good catch, thank you for fixing this! I've relaxed the Clippy checks a bit on master since this has been opened so I won't worry about the failing check in this PR, it's a pretty silly reason.

Just one final thing before I merge, we are in the process of trying to re-license this project to MIT/Apache 2. Assuming you consent to your contributions being under these licenses rather than GPL2 could you please just say so in this RFC?

EDIT: the re-licensing has completed, so I hope you're okay with that as I'm going to go ahead and merge this 😁

@jessebraham jessebraham merged commit 5a7a6f9 into esp-rs:master Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants