Skip to content
RISCV Rust Toolchain
Branch: master
Clone or download
Latest commit 6ed975e Jul 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
riscv-binutils-gdb @ 635c14e Update deps. Jul 24, 2018
riscv-openocd @ 2d9904a Update deps. Jul 24, 2018
.gitignore Initial commit. Nov 20, 2017
.gitmodules Update deps. Jul 24, 2018
Makefile Update deps. Jul 24, 2018
README.md Update README. Jul 24, 2018
build-env.sh Update llvm. Nov 25, 2017
env.sh Update modules and remove openocd.cfg riscv32-unknown-none.json Feb 23, 2018
manifest.scm Use ninja to build llvm. Nov 23, 2017

README.md

OBSOLETE

This is no longer the recommended way to get a Rust toolchain for RISCV. Instead, you can clone the riscv-rust/rust fork of Rust and build it as normal:

./x.py build

You can use

make toolchain

to build binutils and openocd for RISCV.

Rust Toolchain for RISCV

Supported boards

  • hifive (RV32IMAC)

Getting started

  1. Get the source
git clone --recursive https://github.com/riscv-rust/riscv-rust-toolchain
cd riscv-rust-toolchain
  1. Install build dependencies See manifest.scm for a list of the required build dependencies.

  2. Build the toolchain A list of all set environment variables is in build-env.sh, adapt to your distro if necessary.

# Builds llvm openocd binutils rust and xargo
make toolchain
  1. Clone quickstart template
git clone https://github.com/riscv-rust/riscv-rust-quickstart
cd riscv-rust-quickstart
  1. Follow instructions in riscv-rust-quickstart's README.md

RISCV crates

  • riscv crate provides routines for riscv specific asm instructions and reading/writing csr's.

  • riscv-rt crate provides startup code, linker script and interrupt handling code.

  • e310x crate is a svd2rust generated api to Freedom E310 MCU peripherals.

  • hifive crate is a board support crate for the hifive board.

License

ISC License

Copyright (c) 2017, David Craven

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

You can’t perform that action at this time.