-
Notifications
You must be signed in to change notification settings - Fork 147
Check if bootloader has app descriptor #872
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
Conversation
espflash/src/bin/espflash.rs
Outdated
| let section = object.section_by_name(".rodata_desc").is_some(); | ||
| let symbol = object.symbols().any(|sym| sym.name() == Ok("esp_app_desc")); | ||
|
|
||
| if !section || !symbol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably could check more things like the size of the app-desc, the magic word at the start and the placement (i.e. address) but if the check fails on these we screwed up and we have hil-tests for that
|
I'm not sure if we need to check this on other places as well or |
MabezDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nearly there! I think we should move the check code out lib.rs though, I suggested a new place.
MabezDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with suggestion applied, thanks!
Co-authored-by: Scott Mabin <[email protected]>
* Check if bootloader has app descriptor * changelog * refactor * another refactor * Update espflash/src/image_format/esp_idf.rs Co-authored-by: Scott Mabin <[email protected]> --------- Co-authored-by: Scott Mabin <[email protected]>
This checks, if the bootloader has an app desc present, if not, returns an error.
Also added an option for users to disable the check.
closes #866