Support for the Seeed Studio XIAO SAMD21 #14678
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces support for the XIAO Seeeduino SAMD21 board. It includes a single configuration for NSH and also documentation about how to program the board.
Impact
The impact of this PR is that another SAMD21 based board is now supported by NuttX. I have not tried the peripherals yet outside of getting NSH to boot and run.
Testing
Configured and compiled the binary using the NuttX build system, converted to a uf2 format file and copied it to the Xiao board over USB. I then connected a TTL cable to the UART pins of the Xiao and confirmed that NuttX boots into NSH. I tried the hello world command and
uname.I wanted to test with OS test, but noticed that there are linker errors with pthreads. I'm wondering if this is a limitation of the chip support?
For documentation, I tested by running
make htmllocally and confirming the absence of errors and warnings, and then opened the docs in my browser to verify formatting.Questions
For something like the RP2040 based chips which use a UF2 bootloader, the picotool is a dependency for performing the elf to uf2 conversion. I am wondering as per my comment in the documentation, if it would be worth cloning the Microsoft uf2 conversion tool in the post-build configuration steps, and automatically converting the
.hexfile to a.uf2file. This might make the process more seamless for users. The project is MIT licensed so I believe it would be okay to refer to from NuttX/use in the build system.If that seems like a good idea, I can open another PR to perform that conversion later.