-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
docs: Add reference for reset and boot sequence, document factory reset for esp32 & rp2. #15956
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
@TRadigk Interested if you have any comments on this PR. Does it look like it resolves your comment from here: #15230 (comment) ? |
81fed50
to
6b401a2
Compare
@projectgus I've checked all changes and fully agree with them. The boot sequence is clearly laid out and to be found on a top level 👍 (which helps to understand that this is not port port specific, but micropython specific). You added a way to recover from soft-bricking for every port allowing it to be found with the search and providing guidance to recover, which I also like very much. |
6b401a2
to
f5c6f7a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15956 +/- ##
=======================================
Coverage 98.57% 98.57%
=======================================
Files 164 164
Lines 21335 21335
=======================================
Hits 21030 21030
Misses 305 305 ☔ View full report in Codecov by Sentry. |
f5c6f7a
to
17f91da
Compare
After discussion with @dpgeorge have added a commit which deprecates |
Code size report:
|
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.
These changes look great thanks for writing them!
2. Find the serial port name of your board, and then use esptool to erase the | ||
entire flash contents:: | ||
|
||
esptool.py -p PORTNAME erase_flash |
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.
For most users these days the auto-detection of port works well - it's often only advanced users that have more than one com port on their computer at any one time. As such I'd remove the need to "find serial port name" as new users wont know how to do this.
If desired this could be split to show the basic esptool.py erase_flash
first and then a short follow up paragraph on setting the port name as well if needed?
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.
Tries to imagine a world where there aren't nine serial devices plugged into a computer at all times
😁 In all seriousness, I think I agree. However, I suggest I submit a separate PR for this that also changes it in the esp32 tutorial. Also there are the download page instructions, although I'm not sure where these are generated from - maybe damien has to make that change somewhere internally.
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.
Also there are the download page instructions, although I'm not sure where these are generated from
They should be in the various deploy.md
files (part of the board.json
and board.md
set of files).
17f91da
to
5f0a2a7
Compare
@andrewleech @dpgeorge Thanks for the great reviews! I've made some edits based on your suggestions, please take a look. (Apologies, I rebased so the "compare" feature in GitHub may show a lot of unrelated edits.) |
I have reviewed the changes here and am happy with this PR now. Except the commit that deprecates |
5f0a2a7
to
40baa05
Compare
After discussion with @dpgeorge, |
40baa05
to
a126b6e
Compare
Also rewrote the suggested |
It's tricky to recommend something because in production you'd usually want the app to be as robust and secure as possible and hence not allow ctrl-C or anything to stop it, but that contradicts with having a convenient development cycle, eg using Anyway, what you have now is good! |
Previously individual ports documented these aspects to varying degrees, but most of the information is common to all ports. In particular, this adds a canonical explanation of `boot.py` and `main.py`. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
This is currently an implementation detail of MicroPython rather than by design. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
a126b6e
to
c5d74fe
Compare
Summary
This started out as a task to document
boot.py
andmain.py
on the rp2 port (Closes #15230). However, I realised the boot sequence and reset types were documented per-port and sometimes inconsistent so I decided to consolidate these into a common reference page that each port can link to.In follow-up commits I added port-specific factory reset docs for esp32 and rp2 ports. These ports don't have any MicroPython-specific recovery features like Safe Mode boots, the factory reset process is to erase the entire flash. However, now it's explicitly documented as such.