dist/tools/uf2: integrate flashing of adafruit bootloader#21330
dist/tools/uf2: integrate flashing of adafruit bootloader#21330mguetschow wants to merge 2 commits into
Conversation
|
It's not entirely unlikely that that's a bug in It seems like not all banks are flashed, I downloaded the |
|
I played around with this more and I don't think that the However I don't reeeeeeeeally feel like debugging the Arduino nRF52 Bootloader, but apparently it can be done with the nRF52840DK using Segger RTT to receive the debug output. |
The same is true for the Adafruit Clue and the Itsybitsy-nRF52; The That might be an option to avoid installing pip package (semi-)globally? |
|
Thanks for picking this up. We have a similar situation with the nrf52840dongle (which use the original nordic bootloader). Let's not slow down this effort over a generic solution, but on the long run, a |
Contribution description
Since #21281, boards using the adafruit nrf52 uf2 bootloader will default to keeping the SoftDevice (although not using it) and are checked to have the expected SoftDevice version present. If it is not, a warning is presented to the user requiring them to (re)install the bootloader manually.
This PR offers an automated way of installing the bootloader. Currently it doesn't work as intended though since the bootloader is for some reason required to be flashed twice (for the softdevice to be properly installed), and a second flashing fails unless the board was power-cycled in-between. We could certainly add interactive instructions for the user, but maybe there is a better way?
Also, the
flash-dfucommand requirespip3 install --user adafruit-nrfutilwhich is currently not checked for nor installed automatically. Maybepipxwould be an option.Would be nice to have some kind of solution before the next RIOT release though, as previous users will otherwise need to perform the inconvenient manual bootloader reflash.
Testing procedure
make -C examples/basic/hello-world BOARD=feather-nrf52840-sense UF2_SOFTDEV=DROP flash, press enter to continue.make -C examples/basic/hello-world BOARD=feather-nrf52840-sense flash, press enter to continue and install the bootloader.Issues/PRs references
Follow-up of #21281.