Close

Installing the RISC-V Toolchain

A project log for Algol RISC-V CPU for CAT iCE40 FPGA Board

Is this a hardware project? A software project? IDK.

dave-vandenboutDave Vandenbout 12/13/2017 at 15:070 Comments

On my Win7 machine, I created a linux VM to host the RISC-V toolchain:

$ mkdir xenial64
$ cd xenial64
$ vagrant init ubuntu/xenial64
$ vagrant up
$ vagrant ssh

Then I built the toolchain on the VM:

$ sudo apt-get update
$ git clone https://github.com/riscv/riscv-tools.git
$ cd riscv-tools
$ git submodule update --init --recursive
$ sudo apt-get install autoconf automake autotools-dev curl device-tree-compiler libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev pkg-config
$ export RISCV=/home/ubuntu/riscv
$ export PATH=$PATH:/home/ubuntu/riscv/bin
$ ./build.sh

Unfortunately, the build.sh failed. I tried some other linux distros (ubuntu/trusty64, debian/jessie64) without success: the toolchain failed to build for a variety of reasons. Finally, I edited the build.sh file to remove the build of the riscv-openocd tool. (I figured I wouldn't need the on-chip debugger right now.) After that, the build was successful. 

Discussions