connection: error handling - #270
Merged
jessebraham merged 4 commits intoOct 24, 2022
Merged
Conversation
maximeborges
force-pushed
the
bugfix/connection_error-handling
branch
from
October 24, 2022 17:30
db8d79e to
031fa68
Compare
maximeborges
marked this pull request as draft
October 24, 2022 17:33
Contributor
Author
|
Mmh I'm not able to flash anymore, I'm getting a |
maximeborges
marked this pull request as ready for review
October 24, 2022 19:29
The `size` field for `Command::FlashDeflateBegin` is the uncompressed size of the segment. It was rounded up to the memory block size, and the stub was expecting more data when the flash ended, even though the inflator was returning successfully.
maximeborges
force-pushed
the
bugfix/connection_error-handling
branch
from
October 24, 2022 19:29
a0711aa to
2a987d7
Compare
Contributor
Author
|
The |
jessebraham
suggested changes
Oct 24, 2022
jessebraham
left a comment
Member
There was a problem hiding this comment.
Thank you for this! Overall it looks good to me.
Sorry but there's just one small typo I'd like to see fixed please 😁
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
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.
Since we just swapped the two fields, we need to check
errorinstead ofstatusnow.I've been mainly working with the stub since I'm erasing the OTA partition when flashing.
After taking a better look at the error handling there I'm not really sure where the values from
RomErrorKindare coming from, since they are neither in the C stub code nor thebootloaderandbootloader_supportcomponents.I added the generic errors from the stub. There is other values used in other places in there but they are not under an enum and it would take quite a bit of time to reference all of them for now.
If anyone has any clue where those are coming from, otherwise I'd say that we can remove them at some point.