This section provides detailed instructions on how to configure, build, and run the project. The project is designed for simulation and testing in a RISC-V environment using Rust, FreeRTOS, and the Hardisc fault injection framework.
Before building or running the project, ensure the following software and toolchains are installed and properly configured:
-
Rust with nightly toolchain support. Install via https://www.rust-lang.org/.
-
RISC-V GNU Toolchain compiled with support for:
- abi=ilp32
- arch=rv32imac_zicsr
(Toolchain can be downloaded and compiled from https://github.com/riscv-collab/riscv-gnu-toolchain.)
-
ModelSim - Intel FPGA Edition (tested with version 18.1), available at: https://www.intel.com/content/www/us/en/software-kit/750368/modelsim-intel-fpgas-standard-edition-software-version-18-1.html
-
Hardisc fault injector cloned, configured, and compiled. See its documentation for detailed setup instructions (https://github.com/janomach/the-hardisc).
-
Make tool installed (https://www.gnu.org/software/make/).
- Open the provided Makefile in the project files and update the following paths:
- MODELSIM - Set to the installation path of ModelSim.
- HARDISC - Set to the path where Hardisc is cloned and built.
-
Set Rust to use the nightly toolchain:
rustup default nightly -
Install the RISC-V target for Rust:
rustup target add riscv32imac-unknown-none-elf -
Download the FreeRTOS-Kernel submodule:
git submodule update --init --recursive
-
To compile the project:
make(The compiled binary and object dump can be found in the /target folder.)
-
To run the simulation:
make sim