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.
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
A workaround would be to just point PlatformIO to use the latest git version (master) or the tagged release.
You can e.g. use
[env:seeed_xiao]
platform = atmelsam
board = seeed_xiao
framework = arduino
; update to latest git version
platform_packages =
framework-arduino-samd-seeed@https://github.com/Seeed-Studio/ArduinoCore-samd.git
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)
PACKAGES:
- 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)
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).