Updating support for Seed Xiao

Trying to use Seeed Xiao module, the I2C is not working as I expected so started digging into configs. I found the file path for the variant.cpp is


I noted that there were more pins that the module has (39 against 14) and that some on board Leds are missing. After adding them and getting them working I thought it would be good to raise pull request and looked at the github locations and relaised I’m not clear as to how to about doing this with platform.io

After searching github for seeed xiao variant.cpp I found a much more relevant file with the pins I was looking for in place and only 17 pins defined which seems pretty close to right.


Can I help in getting this seemingly more up to date an accurate file into the release version, if so is there a guide/how to I can follow?


I think the Xiao variant has been derived from the femto one, files look the same, the file form Seeed studio when copied in over the installed make it work as expected




If PlatformIO is using an outdated version of the Seeed core (GitHub - Seeed-Studio/ArduinoCore-samd), it needs to be raised where the package is used, aka in GitHub - platformio/platform-atmelsam: Atmel SAM: development platform for PlatformIO. Per

the currently used version is 1.7.6, which also matches the release date of 4th July 2020 (Release 4.4.0 · platformio/platform-atmelsam · GitHub) in reference to Releases · Seeed-Studio/ArduinoCore-samd · GitHub.

A workaround would be to just point PlatformIO to use the latest git version (master) or the tagged release.

You can e.g. use

platform = atmelsam
board = seeed_xiao
framework = arduino
; update to latest git version
platform_packages = 

and that, for me, with a basic blinky sketch, results in

CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/seeed_xiao.html
PLATFORM: Atmel SAM (5.1.1) > Seeeduino XIAO
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
 - framework-arduino-samd-seeed 1.8.1+sha.bcc92a8
 - framework-cmsis 1.40500.0 (4.5.0)
 - framework-cmsis-atmel 1.2.0
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Building .pio\build\seeed_xiao\firmware.bin
Checking size .pio\build\seeed_xiao\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   7.3% (used 2408 bytes from 32768 bytes)
Flash: [          ]   4.0% (used 10616 bytes from 262144 bytes)
=================== [SUCCESS] Took 21.24 seconds ===================

(you can also use the link https://github.com/Seeed-Studio/ArduinoCore-samd.git#v1.8.1 to get the stable 1.8.1 release instead of bleeding-edge master)

So looks like this was when Seed fixed it on 1.8.0 " * Fixed xiao pin map error"

Should I raise PR on https://github.com/platformio/platform-atmelsam/blob/67d1784f116b3aa9a05d294eacca2a36d731b76f/platform.json#L72-L77
or is that handled centrally? as it stands its not in great place for the Xiao and I’m keen to help although to be fair still getting to grips with understanding the structure of this element of PlatformIO!

Well changing the version numebr in that file is only half the work, the other is actually generating and publishing a new framework-arduino-samd-seeed package of the desired version. The PlatformIO maintainers should do that (especially since only owner = 'platformio' packages are accepted anyways).

I’ve raised Update framework-arduino-samd-seeed to fix critical errors for Xiao Seeed board · Issue #146 · platformio/platform-atmelsam · GitHub to adress this. Until then, the workaround should work.

Cool, I have got it working for the time being so that’s great, Thanks