Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atsams-rs/atsamx7x-rust

Rust HAL, PACs, and examples for the Microship SAM E70/S70/V70/V71
https://github.com/atsams-rs/atsamx7x-rust

atmel-arm atmel-sam atmel-sam-family hal rust-embedded

Last synced: about 1 month ago
JSON representation

Rust HAL, PACs, and examples for the Microship SAM E70/S70/V70/V71

Awesome Lists containing this project

README

        

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](https://packs.download.microchip.com/).

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](https://docs.rs/embedded-hal/0.2.7/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](https://www.microchipdeveloper.com/boards:sam-v71-xult) (`boards/atsamv71_xult`) and [SAM E70 Xplained Pro](https://microchipdeveloper.com/boards:sam-e70-xpro) (`boards/atsame70_xpro`).

## Development

> [!NOTE]
> See into [contribution guidelines](CONTRIBUTING.md) for more details.

This repository employs a [trunk-based development](https://trunkbaseddevelopment.com/): 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:
```sh
$ rustup target add thumbv7em-none-eabihf
```
and build the examples:
```sh
$ 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](boards/atsamv71_xult/README.md).

License
---
All source code in this repository is licensed under either of

Apache License, Version 2.0 ([LICENSE-APACHE](./LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
MIT license ([LICENSE-MIT](./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.