-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards/adafruit-{clue,itsybitsy-nrf52}: Convert to Common adafruit-nrf52-bootloader
module
#21395
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
I thought about this some more and it probably doesn't make sense to do that. The value |
The Adafruit Clue and Itsybitsy nRF52 also use the Adafruit nRF52 Bootloader which has a common module that can be used. Especially the Itsybitsy nRF52 (mis)uses the nrfutil programmer target and has a lot of redundant code. Furthermore, the Double Tap Magic Value used by both boards is incorrect for using the USB Bootloader.
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 minor nit. I trust your testing.
@maribu let me know if the new change satisfies you, then we can merge (or you hit the merge button if you're happy). |
Thank you for the review :) |
Contribution description
The aim of this PR is twofold:
It would be nice to not have the SoftDevice version hard-coded, which prevents using the
adafruit-nrfutil
with boards such as theseeedstudio-xiao-nrf52840(-sense)
.Migrate the only two boards using the
adafruit-nrfutil
to the commonboards_common_adafruit-nrf52-bootloader
.In the process, the Makefile of the
adafruit-itsybitsy-nrf52
can be decluttered, a lot of duplicate code is present and it abuses thenrfutil
programmer target.2a) Change the default bootloader to
uf2conv
.The Magic Double Tap values of the Clue and Itsybitsy-nRF52 don't enable the MSD feature which
uf2conv
would use, so they are in-factadafruit-nrfutil
only.Open Discussion Points: The Clue and Itsybitsy-nRF52 should work with
uf2conv
as well, that would drop the requirement to installadafruit-nrfutil
, which has it's own quirks...ToDos:
1) Change the documentation to hint to the common Adafruit nRF52 Bootloader documentation in both thedoc.txt
of the clue and itsybitsy as well as the common Flashing documentation: doc/doxygen/src/flashing.md2) Make the commonreset.c
more universal so that different Magic Double Tap values can be set (0x4E
for theadafruit-nrfutil
and0x57
foruf2conv
).Testing procedure
BOARD=adafruit-clue make -C tests/sys/shell flash term
should still work. If you don't have a Clue or Itsybitsy-nRF52, you can flash the Adafruit nRF52 Bootloader to an nRF52840DK as well.Issues/PRs references
None.