A bootloader for HiFive1 boards written in Rust
To build the project you'll need:
-
Rust 1.36 or a newer toolchain. e.g.
rustup default stable -
rust-stdcomponents (pre-compiledcorecrate) for the RISC-V target. Run:
$ rustup target add riscv32imac-unknown-none-elf-
Programmer software
- HiFive1 Rev B: Segger JLink software & documentation pack for Linux
- HiFive1: OpenOCD from SiFive
NOTE: This is the very short version that only covers building programs. For the long version, which additionally covers flashing, running and debugging programs, check the embedded Rust book.
- Clone the repository.
$ git clone https://github.com/Disasm/rboot
$ cd rboot-
If you have an old HiFive1 board, edit
Cargo.toml: replaceboard-hifive1-revbwithboard-hifive1. -
Run the programmer software.
- HiFive1 Rev B:
/path/to/JLinkGDBServer -device FE310 -if JTAG -speed 4000 -port 3333- HiFive1:
/path/to/openocd -f board/sifive-hifive1.cfg- Build and flash the bootloader.
$ cargo run --release --features board-hifive1-revbSubstitute board-hifive1-revb with something that fits your board.