8 releases (breaking)

Uses new Rust 2021

0.12.0 Jan 3, 2022
0.11.0 Nov 8, 2021
0.10.0 Sep 27, 2021
0.9.0 Jan 1, 2021
0.6.1 Jun 5, 2020

#428 in Embedded development

Download history 27/week @ 2022-08-05 16/week @ 2022-08-12 16/week @ 2022-08-19 11/week @ 2022-08-26 17/week @ 2022-09-02 24/week @ 2022-09-09 7/week @ 2022-09-16 7/week @ 2022-09-23 26/week @ 2022-09-30 21/week @ 2022-10-07 4/week @ 2022-10-14 6/week @ 2022-10-21 18/week @ 2022-10-28 19/week @ 2022-11-04 15/week @ 2022-11-11 16/week @ 2022-11-18

68 downloads per month

MIT/Apache

1MB
19K SLoC

Seeeduino XIAO Board Support Crate

This crate provides a type-safe API for working with the Seeed Studio Seeeduino XIAO.

Prerequisites

  • Install the cross compile toolchain rustup target add thumbv6m-none-eabi
  • Install the cargo-hf2 tool however your platform requires

Uploading an example

Check out the repository for examples.

  • Be in this directory cd boards/xiao_m0
  • Put your device in bootloader mode by bridging the RST pads twice in quick succession. The orange LED will pulse when the device is in bootloader mode.
  • Build and upload in one step: cargo hf2 --release --example blink --features="unproven"
    • Note that if you're using an older cargo-hf2 that you'll need to specify the VID/PID when flashing: cargo hf2 --vid 0x2886 --pid 0x002f --release --example blink --features="unproven"

If you are on Linux and hf2 fails to flash your board even if it is connected and in bootloader mode, you might need to add some udev rules if you have not done that yet.

The example for adafruit boards is shown here.

You might want to have all the hf2 related rules in a single file, i.e. /etc/udev/rules.d/99-hf2-boards.rules, or have a different rules file for each vendor. The rules for Seeeduino boards look like this:

#seeeduino rules
ATTRS{idVendor}=="2886", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2886", MODE="0666"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2886", MODE="0666"

After adding the rules remember to reboot or run:

sudo udevadm control --reload-rules
sudo udevadm trigger

For more information on hf2 and other methods of uploading your code, take a look at the base project README.

Dependencies

~5MB
~146K SLoC