`metro_m4`
FreeBoard support for the [Metro M4 board] in the [atsamd-rs] repo. It is an [atsamd-rs tier 1 support] board. [](https://crates.io/crates/metro_m4)
FreeFree tier
About `metro_m4`
metro_m4 is a board support package (BSP) for the Adafruit Metro M4 Express board, part of the atsamd-rs project. It provides a Rust API to access the SAMD51 microcontroller's peripherals and implements the embedded-hal traits for common interfaces such as I2C, SPI, and UART. The crate is listed in the awesome-embedded-rust collection and is maintained as a tier 1 supported board in the atsamd-rs repository.
Key Features
Peripheral access via the SAMD51 peripheral access crate (PAC)
Implements embedded-hal traits for I2C, SPI, UART, and GPIO
Tier 1 support in the atsamd-rs project
Designed for the Adafruit Metro M4 Express board
Part of the awesome-embedded-rust ecosystem
Pros & Cons
Pros
- Well-integrated with the atsamd-rs ecosystem and tooling
- Tier 1 support ensures active maintenance and community backing
- Provides a high-level, type-safe API over the SAMD51 microcontroller
- Listed in awesome-embedded-rust for discoverability
Cons
- Limited to the Adafruit Metro M4 Express board only
- Requires Rust embedded toolchain and familiarity with embedded development
- Not a standalone application; must be used with other crates for full functionality
Best For
Embedded development with Rust on the Adafruit Metro M4 ExpressPrototyping IoT devices and sensorsEducation and learning embedded Rust programmingBuilding firmware for SAMD51-based custom hardware
FAQ
What is metro_m4?
metro_m4 is a Rust board support package (BSP) for the Adafruit Metro M4 Express board. It is part of the atsamd-rs project and provides abstractions over the SAMD51 microcontroller's hardware.
Does metro_m4 support other boards?
No, metro_m4 is specifically designed for the Adafruit Metro M4 Express. Other boards in the atsamd-rs family have their own BSPs (e.g., feather_m4, itsybitsy_m4).
What embedded-hal traits does it implement?
It implements the embedded-hal traits for I2C, SPI, UART, and digital I/O (GPIO). These traits allow you to use generic drivers and libraries with the Metro M4 board.