-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
doc,esp32: Improve and de-duplicate the flashing instructions. #16535
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
@UnexpectedMaker I'd be interested to know what you think of this, as your boards have the best download instructions included so far 🤩 . I think I picked up all the per-board variants (flashing mode buttons, and the boards which need external flashing mode wiring). You can see a copy of the suggested new generated deploy.md files for UM boards here: https://gist.github.com/projectgus/f2d24fa2e4689c41ce8002b70f0926bf#file-um_feathers2-md and also these ones where the name has no UM_ prefix: nanos3 and omgs3 Please let me know if you think anything here is wrong, or might lead to a worse user experience. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files 8000@@ Coverage Diff @@
## master #16535 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 167 167
Lines 21596 21596
=======================================
Hits 21291 21291
Misses 305 305 ☔ View full report in Codecov by Sentry. |
06e9206
to
c86075d
Compare
Code size report:
|
@projectgus Hiya! A few things...
Otherwise, I think consistency across all of the boards is great, good job! |
Thanks for the quick review, @UnexpectedMaker!
Oh, right. I put direct links to those two as they're not grouped with the other files in the gist. All the other Happy to change
Good catch! I've added a separate
Ah, this is where the |
Ahh, hmm, my mistake then, sorry. They should all be
Excellent!
Hmm, again, seems my mistake/inconsistency when adding the board data over time. There should be no spaces in my names other than when there is a Thanks for being so responsive Angus - Happy New Year btw! I hope you and the family are well :) |
@UnexpectedMaker Great! I've pushed a commit to change the spacings, as this PR otherwise will otherwise make the download pages inconsistent. I've left the omgs3/tinys3 naming alone, thanks for offering to pick that one up. It probably makes more sense to do it in a separate PR as it's separate from these changes. Feel free to tag me for review if you do submit a PR for it. And Happy New Year to you and your family, as well! 😁 |
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.
One other thing that I found when creating mpflash was that of the ESP32 port , the ARDUINO_NANO_ESP32 cannot be flashed with esptool , but needs dfutil The documentation is in place , but its easy to miss as its an outlier from most of the ESPxxx boards https://github.com/Josverl/micropython-stubber/blob/main/src/mpflash/mpflash/flash/esp.py |
bfc948c
to
57b7896
Compare
Thanks @Josverl for the insights! I've added notes for Windows users, and updated the gist with the previews.
Yes, that one is kept unchanged in this PR (I did add a spurious Do you suggest additional changes? We could mention this in the |
57b7896
to
47fb89c
Compare
Not in detail, but perhaps a note like: While many board in a port share the same flashing tools and common parameters, some boards will use different parameters or different flashing tools and methods. |
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.
Thanks @projectgus for this clean up, it's definitely a good improvement and will make it easier to maintain these instructions.
Will you squash the two commits that modify docs/esp32/tutorial/intro.rst
? It seems like the latter one fixes the first.
f38eb5a
to
8e991c0
Compare
Thanks @dpgeorge and @Josverl for the review comments. Have updated accordingly (and the preview gist is also refreshed). I ended up removing the flashing steps from the tutorial entirely and directing users to the download page. In most cases they already have that page open, and it's much easier to follow because it's the specific steps for that board only. I also made some more tweaks, particularly around the instructions for choosing a board to download as I realised these were also quite out of date. I moved the information about |
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.
A nice improvement; queries about flashing ESP32's are very common. I think this will help!
9fa9227
to
6b0f7c6
Compare
Allows two source files (ports/esp32/boards/deploy.md and deploy_nativeusb.md for boards with only native USB) for all esp32 installation steps, with templated chip name and flash offset inserted via string formatting. The new files add more text to explain the esptool.py port auto-detection, remove the unnecessary -z feature (already enabled by default), and add a bit of troubleshooting and port detection info. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Includes fixing the flashing address for newer SoCs, as reported in discussion https://github.com/orgs/micropython/discussions/16417 Also removes some redundant or out of date information, and adds links to the Espressif esptool docs which are quite comprehensive. Information about ESP32_GENERIC variants is moved to the board page, as it only applies to that board. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
The previous deploy.md refactors revealed that these boards had a different "product" entry in boards.json compared to the name given in the board.md file. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
The user already has it open, and its customised for their particular board. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
6b0f7c6
to
84e0aca
Compare
Summary
This PR aims to clean up the flashing instructions for the esp32 port, and also make them easier to maintain in the future.
The big change for the download pages is using string formatting to expand the very few things (chip name, flash offset) which are different between most boards. This allows using the same two
deploy.md
anddeploy_nativeusb.md
for almost all ESP32 boards, which also made it easier to add some additional troubleshooting docs there.The initial motivation comes from a few places:
-z
(which is enabled by default).Specific changes applied across here include:
Harmonise the flashing steps between the download pages and the ESP32 getting started doc.EDIT: Now the tutorial page refers to the download page for flashing steps - it's much simpler as these are the steps for this particular board, rather than "any" board.Testing
./build-downloads.py
to generate download pages from master and this branch, and diffed the directories to ensure no non-esp32-port files changed and that nothing important was missing from the updated esp32 download pages.Trade-offs and Alternatives
This work was funded through GitHub Sponsors.