12 unstable releases (4 breaking)

new 0.5.0 Feb 17, 2025
0.4.0 Feb 12, 2025
0.3.0 Jun 16, 2024
0.2.4 Dec 6, 2021
0.1.3 Nov 23, 2021

#103 in Embedded development

Download history 9/week @ 2024-11-20 6/week @ 2024-11-27 7/week @ 2024-12-04 8/week @ 2024-12-11 11/week @ 2025-01-01 63/week @ 2025-01-08 111/week @ 2025-02-05 680/week @ 2025-02-12

791 downloads per month
Used in 3 crates (via va108xx-hal)

Apache-2.0

460KB
11K SLoC

Crates.io docs.rs

PAC for the Vorago VA108xx microcontroller family

This repository contains the Peripheral Access Crate (PAC) for Voragos VA108xx series of Cortex-M0 based microcontrollers.

The crate was generated using svd2rust.

If you are interested in higher-level abstractions, it is recommended you visit the va108xx-hal HAL crate and the vorago-reb1 BSP crate which build on top of this PAC.

Usage

To use this crate, add this to your Cargo.toml

[dependencies.va108xx]
version = "<Most Recent Version>"
features = ["rt"]

The rt feature is optional and recommended. It brings in support for cortex-m-rt.

For full details on the autgenerated API, please see the svd2rust documentation.

Optional Features

  • defmt: Add support for defmt by adding the defmt::Format derive on many types.
  • debug: Add Debug derives for various structures

Regenerating the PAC

If you want to re-generate the PAC, for example if the register file va416xx.svd changes or the svd2rust version is updated, you can do some using the following these steps:

  1. Make sure all necessary tools are installed: svd2rust, svdtools and form. You can install all tools with cargo:

    cargo install --locked svd2rust svdtools form
    
  2. Patch the vendor-provided SVD file svd/va41xx.svd. This can be done using svdtools in conjunction with the svd/va108xx-patch.yml file.

    svdtools patch svd/va108xx-patch.yml
    
  3. Use svd2rust to generate the Rust library

    svd2rust -i svd/va108xx.svd.patched
    
  4. Use the form tool to split the generated lib.rs into individual modules.

    form -i lib.rs -o src/
    

The gen-helper.sh automates steps 2-4.

Dependencies

~550–740KB