-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[BACKPORT release/1.15] tools/bootloader: add force-erase option and add bootloader version #23210
Conversation
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.
@julianoes - I have the bugfix changes for the RT in #23110 (commits). Since this PR changes system behavior, I think we should bring in the bux fix PR first and then rebase this PR on it.
Ok, that's fine with me. Let me know when I should rebase it. |
@julianoes - Please rebase |
If the STM32H7 fails to program or erase a full chunk of 256 bytes, the ECC check will trigger a busfault when trying to read from it. To speed up erasing and optimize wear, we read before erasing to check if it actually needs erasing. That's when a busfault happens and the erase time outs. The workaround is to add an option to do a full erase without check. Credit goes to: ArduPilot/ardupilot#22090 And the protocol option added to the bootloader is the same as for ArduPilot, so compatible. Signed-off-by: Julian Oes <julian@oes.ch>
This adds a new protocol extension which allows to get the bootloader version. The bootloader version is different from the bootloader protocol revision which has stabilized at 5 and is not easy to update unless a bootloader is actually breaking the protocol. The reason being that both the Python script as well as the uploader used in QGC will not attempt to load firmware if they don't know the bootloader version, so it could basically be considered a "breaking" protocol revision. Signed-off-by: Julian Oes <julian@oes.ch>
Includes: - Remove some of the outdated Python2 checks and compatibility. - Try not catch all exceptions but only the expected ones. Otherwise, this makes it really hard to debug if anything unexpected actually goes wrong. - Make use of fstrings. - Make output slightly prettier. Signed-off-by: Julian Oes <julian@oes.ch>
Just so we don't conflict on these commands in the future.
Signed-off-by: Julian Oes <julian@oes.ch>
ee43c0c
to
e5b40c1
Compare
Quite a few were missing, and everything on one line was hard to diff.
…P_RESERVATION_SIZE param (#23204)
e5b40c1
to
5f76134
Compare
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 @dagar - pleas have a look
Backport of: #22777
And fixups: #23174
And updated target list: #23234
Best to be rebased cleanly so that the git hash embedded in the bootloader makes sense and points to the actual branch.