https://github.com/kodraus/hifive1-revb-template
A Cargo template for running Rust on RISC-V based HiFive1 boards
https://github.com/kodraus/hifive1-revb-template
embedded example riscv rust
Last synced: 26 days ago
JSON representation
A Cargo template for running Rust on RISC-V based HiFive1 boards
- Host: GitHub
- URL: https://github.com/kodraus/hifive1-revb-template
- Owner: KodrAus
- License: unlicense
- Created: 2021-01-07T03:32:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-22T11:00:57.000Z (over 4 years ago)
- Last Synced: 2025-03-05T00:46:48.685Z (over 1 year ago)
- Topics: embedded, example, riscv, rust
- Language: Rust
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HiFive1 Rev B Cargo Template
A template for running Rust on RISC-V based [HiFive1 boards](https://www.sifive.com/boards/hifive1-rev-b) with [SEGGER Embedded Studio](https://www.segger.com/products/development-tools/embedded-studio/editions/risc-v/). See the [`riscv-rust-quickstart`](https://github.com/riscv-rust/riscv-rust-quickstart) repository for examples and other templates you can use to get started.
## Prerequisites
To get started:
Grab [a prebuilt RISC-V toolchain](https://www.sifive.com/software) for your host platform and add the `riscv64-unknown-elf-gcc` binary to your `PATH`.
Install [SEGGER Embedded Studio](https://www.segger.com/products/development-tools/embedded-studio/editions/risc-v/).
Add the `riscv32imac-unknown-none-elf` target:
```
rustup target add riscv32imac-unknown-none-elf
```
## Installing the template
You can use the [`cargo generate`](https://crates.io/crates/cargo-generate) tool to clone this repository:
```
cargo generate --git https://github.com/KodrAus/hifive1-revb-template
```
You can then open the `.emProject` file in Embedded Studio, which can take care of building, flashing, and debugging your program on an attached device.