-
-
Notifications
You must be signed in to change notification settings - Fork 459
[MKC-761] Bootloader reloading (non-AVR boards) tutorial #738
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
This PR summarizes an forum post by Per giving instructions on how to burn the bootloader on non-AVR boards.
✅ docs-content deploy preview ready
|
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.
Hey @Hannes7eicher , there's a lot of formatting errors in this article, and some other minor things that needs to be addressed (btw preview is here: https://docscontent-hannes7eicherbootloaderreloadi.gatsbyjs.io/tutorials/generic/bootloader-reloading)
- Several H1 titles used (single hashtag). We never use them because in an article, there's only one (the title of the article). Instead, use a simple structure of H2s and H3s (## and ###).
- I think "Step 1" and "Step 2" doesn't fit well in an article style. They should be named something like "Requirements" and "Instructions".
- The step by step is all rendered as a paragraph. They need to be bullet points to work.
- Code snippets are not closed, because the backticks needs to be placed on a new line.
- There is a couple of first person used. Example:
"..so I recommend against this option.."
. Let's not use "I". Would be better to use"..so it is recommend to not use this option.."
.
Hi @per1234, this is a tutorial based on this forum post about unbricking Nano 33 IoT that you wrote some time back. We were asked to make it into a tutorial as it may aid people with the same issues. It should be more or less your instructions, polished and fit into a docs article format. Can you take a look and see if there are anything you would change? Thank you. Edit: here is the preview: https://docscontent-hannes7eicherbootloaderreloadi.gatsbyjs.io/tutorials/generic/bootloader-reloading |
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.
In addition to the specific items I pointed out, I think you should consider an easier alternative approach that was added to the library since the time of the forum post you used as a reference.
The Adafruit_DAP library now provides an example sketch that has the bootloader binary built in to the sketch, which eliminates the need to download the binary and use an SD card, significantly simplifying the required hardware and the instructions.
I'll share my instructions for that method:
1. Select **Sketch > Include Library > Manage Libraries...** from the Arduino IDE menus.
1. Wait for any index updates to finish.
1. In the **"Filter your search..."** field, type `Adafruit DAP library`
1. Press **<kbd>Enter</kbd>**.
1. Click on "**Adafruit DAP library by Adafruit**".
1. Click the **<kbd>Install</kbd>** button.
1. Wait for the installation to finish.
1. Close **Library Manager**.
1. Select **File > Examples > Adafruit DAP library > samd21 > flash_MKR_bootloaders** from the Arduino IDE menus. <br />
(despite the "MKR" in the sketch name, this also supports the [**Nano 33 IoT**](https://store.arduino.cc/products/arduino-nano-33-iot))
1. Select your **programmer** Arduino board from Arduino IDE's **Tools > Board** menu.
1. Select the port of the **programmer** Arduino board from Arduino IDE's **Tools > Port** menu.
1. Select **Sketch > Upload** from the Arduino IDE menus.
1. Wait for the upload to finish successfully.
1. Unplug the **programmer** Arduino board from your computer.
1. Connect the **programmer** Arduino board to the **target** Arduino board as follows:
| Programmer | Target |
| ---------- | ------ |
| VCC | +3V3 |
| 1 | SWDIO |
| 2 | SWCLK |
| GND | GND |
| 0 | RESETN |
**SWD pads on MKR boards other than MKR 1000:** <br />
 <br />
**MKR 1000 SWD header pinout:** <br />
 <br />
**Nano 33 IoT SWD pads:** <br />
 <br />
1. Plug the USB cable of the **programmer** Arduino board into your computer.
1. Select **Tools > Serial Monitor** from the Arduino IDE menus.
1. Select "No line ending" from the dropdown menu near the bottom right corner of the **Serial Monitor** window.
1. You should see some instructions for using the sketch in the **Serial Monitor** output field. <br />
This includes a menu of the boards supported by the sketch:
```text
[...]
Select Arduino MKR board to erase and flash with bootloader:
Z -> Arduino Zero (6504 bytes)
MZ -> Arduino MKR Zero (6408 bytes)
1000 -> Arduino MKR 1000 WIFI (6408 bytes)
1010 -> Arduino MKR WIFI 1010 (7984 bytes)
[...]
```
Find your **target** Arduino board on the list and note the code written to the left of it.
1. Type the code for the **target** Arduino board in the message field of **Serial Monitor**.
1. Press the <kbd>**Enter**</kbd> key.
1. The Serial Monitor output field should now show the board you selected and the progress of flashing the bootloader to the **target** Arduino board.
Wait for it to show "Done!"
1. Unplug the **programmer** Arduino board from your computer.
1. Disconnect the **programmer** Arduino board from the **target** Arduino board.
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
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.
It seems 5961cd8 was intended to add a tutorial for the approach that doesn't require the use of the SD card, as I shared at #738 (review). However, both files have instructions for the approach that uses the SD card.
If you are creating tutorials for both approaches, I think it would be good to cross-link them with an explanation of they reason why one one would be chosen over the other:
- The tutorial that uses the SD card should be used when the user wants to flash a different bootloader than the ones Adafruit bundled with the "flash_MKR_bootloaders" example.
- The tutorial that does not use an SD card should be used by users who want the easiest solution.
Instead of splitting the sd card & non-sd card approach into different files, I've put them together.
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.
I wonder if it would be better to swap the order of the two tutorials so the preferred approach is first, with the more difficult approach that is only superior for rare advanced use cases is second?
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
content/tutorials/generic/bootloader-reloading/bootloader-reloading.md
Outdated
Show resolved
Hide resolved
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
…ading.md Co-authored-by: per1234 <accounts@perglass.com>
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.
Looks great. Thanks @Hannes7eicher!
What This PR Changes
Contribution Guidelines