-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support for the Seeed Studio XIAO SAMD21 #14678
Conversation
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
I think the build failure isn't related to my changes? It appears to be failing on other PRs as well. |
Yes, the fix is here: #14663
do you disable CONFIG_DISABLE_PTHREAD in defconfig? |
Yes, makes sense! I was just modifying the configuration from another SAMD21 board and it appears it has quite a bit disabled. I've now managed to compile the OS test example and try running it, although it appears to fail an assertion when testing
I haven't modified any underlying chip code, so this may be a pre-existing issue with the SAMD21J18 code. I will have to investigate further; this is the only SAMD21 board I own. Let me know if this blocks this PR. |
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 html
locally 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
.hex
file to a.uf2
file. 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.