Awesome
ATSAMx7x Rust HAL and PACs
This repository holds the HAL (Hardware Abstraction Layer) and PACs (Peripheral Access Crates) that supports and enable working with Microchip SAM S70/E70/V70/V71-based devices using Rust.
The PACs are generated by SVD files provided by Microchip, publicly available at at the Microchip Packs Repository.
The HAL is the result of reading the MCU family datasheet, and provide a type-safe layer over the raw PACs. Were able, information is stored in the type-layer instead of computed at run-time. The HAL implements traits specified by embedded-hal, making it compatible with various Embedded Rust ecosystem crates.
[!TIP] We're not compatible with incoming Embedded HAL 1.0 as it's still in pre-release state.
Evaluation kit examples are available under boards/
, and provide examples for most implemented peripherals.
At present, examples are available for the SAM V71 Xplained Ultra (boards/atsamv71_xult
) and SAM E70 Xplained Pro (boards/atsame70_xpro
).
Development
[!NOTE] See into contribution guidelines for more details.
This repository employs a trunk-based development: development occurs on development
branch with short-lived branches that merges into it.
When a release is met, for example a v0.3.2
release, a v0.3.x
branch is spun of development
and the release tagged. If this branch already exists, relevant commits are back-ported instead.
Development is done towards development
.
Building
Install the ARMv7-EM target:
$ rustup target add thumbv7em-none-eabihf
and build the examples:
$ cd boards/atsamv71_xult
$ cargo build --examples
$ cd boards/atsame70_xpro
$ cargo build --examples
Flashing the device
Refer to the SAM V71 Xplained Ultra README.
License
All source code in this repository is licensed under either of
Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0) MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.