finds.dev← search

// the find

atsamd-rs/atsamd

★ 654 · Rust · Apache-2.0 · updated Jun 2026

Target atsamd microcontrollers using Rust

atsamd-rs is the Rust HAL and BSP collection for Microchip's SAMD11/21/51 and SAME5x ARM Cortex-M microcontrollers — the chips powering most Adafruit and Arduino M0/M4 boards. If you're writing bare-metal Rust for a Feather M4, Metro M0, or anything in that family, this is the library you use. It sits on top of auto-generated PACs from Microchip SVD files and implements embedded-hal traits throughout.

Type-safe pin multiplexing enforced at compile time — you cannot accidentally configure a pin for a SERCOM it doesn't support, which catches a whole class of hardware bugs before you flash anything. Async support across SPI, I2C, USART, DMAC, ADC, and timers with embassy-executor and RTIC integration, not bolted on as an afterthought. The Tier 1 BSP system is honest about maintenance status — boards that track the latest HAL are clearly marked, so you know upfront whether you're on stable ground or old code. The undocumented-features opt-in for boards like PyGamer and ItsyBitsy M4 that use pin configs not in the datasheet is a pragmatic call: it works, they document it, they make you explicitly ask for it.

The BSP tier system cuts both ways — Tier 2 boards are pinned to old HAL versions with no stated path to upgrade, so if your board is in that bucket you may be stuck maintaining a fork. Several SAME5x PACs ship with no BSPs at all (atsame51n, atsame53j, atsame53n, atsame54n), meaning you get register access but no board-level ergonomics and you're writing your own pin definitions from the datasheet. The async runtime is BYOE (bring your own executor), which is fine architecturally, but the docs don't walk you through the embassy-executor setup and the examples assume you already know how; newcomers will hit confusing compile errors about missing wakers before finding the right incantation. Compile times on a workspace this large are brutal — the `build-all.py` CI script exists precisely because building everything sequentially takes a long time, and local iteration on a new peripheral driver will have you waiting.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →