I can find some Sparkfun modifications in those repos, but they’re for older samd21 products – I can’t find anything for the samd51 products.
I’m specifically interested in building a new bootloader for the SAMD51 Thing Plus to address this issue with resetting into the bootloader from application code: viewtopic.php?f=145&t=55574
Adafruit also fixed this obscure issue with spurious flash corruption in their samd bootloader. Seems like something that may also need to be addressed in the Sparkfun samd bootloaders (unless it’s not problem on those (?)).
Hi thanks for your interest in getting a fix for that issue. I had been following that thread but I have not had the time to look into it. As for the files, I’m not sure where they are unfortunately. That particular engineer is no longer at SparkFun. I, at first, thought you were asking about the MicroMod SAMD51 Processor Board and was going to point you that repository. Let me know if there’s some other way I might be able to help.
After some though it was most likely built using Microsoft’s repository, let me know if there’d be a better reason to use Adafruit’s. Also, please let me know if you still have interest in doing it now knowing that there isn’t source files for it. I’ll be happy to look into it when I have more time (not likely this month), if you decide you’re no longer interested.
Here’s my attempt at reconstructing the UF2 bootloader board config files for the SAMD51 Thing Plus. I’m pretty sure that the first half is correct, but much less sure about the USART config at the bottom – not sure if the USART config is even used since USE_UART is disabled by default. In theory I routed the USART to the pins broken out as D0 and D1. Note that this config corrects the chip variant.
As for using the Microsoft or Adafruit fork of the uf2-samdx1 repo, I don’t know, I think Sparkfun will need to take a look at them and decide which way to go. Cloning both of them into the same repo as remotes and then looking at the changes in the core bootloader source with gitk adafruit/master microsoft/master src scripts &, you can see where the repos diverged about 2 years ago. The Adafruit fork clearly has more changes – whether those are all good and relevant, I don’t know, but they look useful at first glance. The fix for spurious flash writes (highlighted in the screenshot below) hasn’t been ported/merged back to the Microsoft repo.
I built a bootloader from the Adafruit uf2-samdx1 repo at the v3.13.0 tag with the board config attached to my earlier comment and flashed it to one of my SAMD51 Thing Plus boards using the uf2 updater. It updated successfully and seems to be working well so far.
I’m looking over it this afternoon, any chance you’d want to do a pull request on the hardware repository? You can put the files within a folder titled uf2 bootloader. This will help give credit where credit’s due and document its’ progress.
vynce:
I built a bootloader from the Adafruit uf2-samdx1 repo at the v3.13.0 tag with the board config attached to my earlier comment and flashed it to one of my SAMD51 Thing Plus boards using the uf2 updater. It updated successfully and seems to be working well so far.
Hello,
would it be possible to get a copy of your uf2 for the samd51 thing plus?
So Vynce’s work on fixing that value has finally been pulled into the main branch, which now includes the uf2 bootloader directly. I have also included the new uf2 folder with the reset fix in our SparkFun SAMD Arduino Board release v1.8.13.