fix: esp32c3 direct boot#358
Merged
Merged
Conversation
Prior to this change, attempting to `espflash flash` with the `--format direct-boot` argument targeting an esp32c3 would fail, reporting: ``` Error: espflash::unsupported_image_format × Image format direct-boot is not supported by the esp32c3 revision v0.3 help: The esp32c3 only supports direct-boot starting with revision 3 ``` However, direct-boot on this board was working prior to the changes in b25af06, and looking at the [docs][esp32c3 revisions] it seems that the mapping that was chosen for the `c3` specifically was `v0.REVISION`: > ECO | Revision (Major.Minor) > ----------------------------- > ECO1 | v0.1 > ECO2 | v0.2 > ECO3 | v0.3 > ECO4 | v0.4 [esp32c3 revisions]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/system/chip_revision.html#revisions
This change rewords the error message from "revision 3" to "revision 3 (v0.3)" in an effort to clarify the mapping between hardware revisions and major/minor version numbers. Additionally, it moves the esp32c3-specific error closer to the actual version check to make it easier to keep both in sync.
Previously, `cargo check --all-targets` reported this import as unused. Since it's just `const u16`, the import is probably side-effect free and indeed safe to remove.
jessebraham
approved these changes
Mar 8, 2023
jessebraham
left a comment
Member
There was a problem hiding this comment.
Sorry for taking so long to get to this, thanks for the fix!
Contributor
Author
|
Not a problem, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to this change, attempting to
espflash flashwith the--format direct-bootargument targeting an esp32c3 would fail, reporting:However, direct-boot on this board was working prior to the changes in
b25af06, and looking at the docs it seems that the
mapping that was chosen for the
c3specifically wasv0.REVISION:Additionally, this PR contains a small cleanup change (f0ab4dd) and a proposal for moving/updating the error message emitted above.