22 stable releases (3 major)

✓ Uses Rust 2018 edition

3.0.4 Jun 28, 2020
3.0.0 Apr 15, 2020
2.9.0 Jan 16, 2020
2.8.2 Nov 23, 2019
0.1.3 Apr 19, 2018

#19 in Embedded development

Download history 138/week @ 2020-03-16 232/week @ 2020-03-23 75/week @ 2020-03-30 242/week @ 2020-04-06 232/week @ 2020-04-13 81/week @ 2020-04-20 70/week @ 2020-04-27 96/week @ 2020-05-04 77/week @ 2020-05-11 94/week @ 2020-05-18 136/week @ 2020-05-25 172/week @ 2020-06-01 72/week @ 2020-06-08 95/week @ 2020-06-15 156/week @ 2020-06-22 187/week @ 2020-06-29

517 downloads per month

MIT/Apache

91KB
1K SLoC

crates.io crates.io

cortex-a

Low level access to Cortex-A processors.

Currently Supported Architectures

  • AArch64
  • AArch32

Usage

Example from https://github.com/rust-embedded/rust-raspi3-OS-tutorials

unsafe fn el2_to_el1_transition() -> ! {
    // Enable timer counter registers for EL1.
    CNTHCTL_EL2.write(CNTHCTL_EL2::EL1PCEN::SET + CNTHCTL_EL2::EL1PCTEN::SET);

    // No offset for reading the counters.
    CNTVOFF_EL2.set(0);

    // Set EL1 execution state to AArch64.
    HCR_EL2.write(HCR_EL2::RW::EL1IsAarch64);

    // Set up a simulated exception return.
    SPSR_EL2.write(
        SPSR_EL2::D::Masked
            + SPSR_EL2::A::Masked
            + SPSR_EL2::I::Masked
            + SPSR_EL2::F::Masked
            + SPSR_EL2::M::EL1h,
    );

Disclaimer

Descriptive comments in the source files are taken from the ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile.

License

Licensed under either of

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 dual licensed as above, without any additional terms or conditions.

Dependencies

~58KB