HiFive Unleashed

HiFive Unleashed is a RISC-V development board by SiFive. Check here for details.

Building the GCC toolchain

  1. It is recommended to build the toolchain from source.

     git clone https://github.com/riscv/riscv-gnu-toolchain.git
     cd riscv-gnu-toolchain
     git submodule update --init --recursive
     export RISCV=/opt/riscv
     ./configure --prefix="${RISCV}" --enable-multilib
     make linux
    

    After it is built, add the $RISCV/bin folder to your PATH. The built toolchain works for both 32-bit and 64-bit.

  2. Alternatively, any pre-built toolchain with multilib enabled should work.

Building seL4test

Checkout the sel4test project using repo as per seL4Test

repo init -u https://github.com/seL4/sel4test-manifest.git
repo sync
mkdir cbuild
cd cbuild
../init-build.sh -DPLATFORM=hifive -DRISCV64=1
# The default cmake wrapper sets up a default configuration for the target platform.
# To change individual settings, run `ccmake` and change the configuration
# parameters to suit your needs.
ninja

Generated binaries can be found in the images/ directory.

Booting via SD card

  1. Set all DIP switches to 1(towards CPU).

  2. Prepare the SD card
    sudo sgdisk --clear --new=1:2048:67583 --typecode=1:3000 /dev/sdX
    sudo dd if=images/sel4test-driver-image-riscv-hifive of=/dev/sdX1
    
  3. Insert the SD card and connect the micro USB port(J7). Note that the UART device node is /dev/ttyUSB1