Skip to content

ferrous-systems/cortex-r82-examples

Repository files navigation

cortex-r82-examples

This repository contains code examples for the Ferrocene-exclusive compilation target: aarch64r82-unknown-none, Arm Cortex-R82 bare-metal (hard-float)

Requirements

  • A Ferrocene toolchain license

  • Criticalup, Ferrocene's toolchain manager

  • Arm's Fixed Virtual Platform (FVP) Architecture Envelope Model (AEM) Base R, AKA FVP_BaseR_AEMv8R 1, which is free to use

    The FVP is used to execute the examples. Ensure that it's part of your $PATH. Version 'Fast Models [11.30.27 (Nov 14 2025)]' has been tested.

  • (Optionally) Arm's Fixed Virtual Platform (FVP) Cortex-R models, like FVP_BaseR_Cortex-R82 2, which requires a license

Setup

Run the following command to install the required Ferrocene components:

$ criticalup install

Check out git submodules:

$ git submodule update --init

Running the examples

aarch64-cpu / armv8-r

These examples target the Armv8-R AArch64 ISA which is compatible with the Cortex-R82 ISA.

Prior to running any example, set the following environment variable from the root of this repository:

To run the examples on the AEM FVP:

$ export CARGO_TARGET_AARCH64R82_UNKNOWN_NONE_RUNNER="FVP_BaseR_AEMv8R -f $(pwd)/FVP_BaseR_AEMv8R.cfg"

Or, to run the examples on the Cortex-R82 FVP:

$ export CARGO_TARGET_AARCH64R82_UNKNOWN_NONE_RUNNER="FVP_BaseR_Cortex-R82 -f $(pwd)/FVP_BaseR_Cortex-R82.cfg"

Or configure the runner for the aarch64r82-unknown-none target in the .cargo/config.toml file.

You must also comment out the [unstable] section in .cargo/config.toml so that the libcore shipped with Ferrocene is used.

Change directory to aarch64-cpu/examples/armv8-r and follow the instructions in the README file contained in that directory.

Whenever instructed to execute cargo run, run instead criticalup run cargo run --target aarch64r82-unknown-none.

Licence

Licensed under either MIT or Apache-2.0 at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.

About

Rust Examples for the Arm Cortex-R82 processor using the Ferrocene toolchain

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages