Play and learn with the SiFive HiFive1 board featuring a FE310-G000 SoC integrating SiFive's E31 RISC-V core.
This guide is for the HiFive1 revision A board, not the revision B with onboard Segger J-Link and ESP32 modules.
Begin by clonig this repository to your machine
$> git clone https://github.com/andrsmllr/hifive1_fe310_devbrd
First and foremost the Freedom-E-SDK (or just SDK in short) is required. The SDK contains the complete toolchain required to build a program binary for the Freedom-E platform (which includes the HiFive1 dev board). The official SDK is included in this repository using git submodules (folders ./ freedom-e-sdk and ./freedom).
To check out the submodules do
$> git submodule update --init --recursive
You can install the SDK on your system from the submodules by using the install script
$> ./install_sifive_toolchain.sh
To test that the basics work, the hello example can be build by
$> cd ./freedom-e-sdk
$> make software PROGRAM=hello BOARD=sifive-hifive1
The program is uploaded to the HiFive1 by
$> cd freedom-e-sdk
$> make upload PROGRAM=hello BOARD=sifive-hifive1
Alternatively you can pull my docker container from dockerhub (the image is quite big at the moment and could probably be optimzed quite a bit)
$> docker pull andrsmllr/freedom-e-sdk:latest
The docker container comes with the SDK up and ready for action. The recommended way to use the docker container is by invoking the run scripts in ./freedom-e-sdk-docker.
To test that the basics work, the hello example can be build by
$> ./freedom-e-sdk-docker/run_exec.sh software PROGRAM=hello BOARD=sifive-hifive1
The program is uploaded to the HiFive1 by
$> ./freedom-e-sdk-docker/run_exec.sh upload PROGRAM=hello BOARD=sifive-hifive1
To see the output of the hello example program you need to connect to the HiFive1 over the built-in USB-UART.
Connect the micro-USB port of the SiFive HiFive1 dev board to your machine, Linux should detect an FTDI device like this
$> lsusb
Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
You should also see a USB serial devices in the /dev folder
$> ls /dev/ttyUSB*
/dev/ttyUSB1
Use your favorite terminal emulator to connect to the serial device, 115200 Baud, 8 data bits, 1 stop bit, 0 parity bits.
If building and uploading the hello example was successful you should see the classic "Hello World!" message after uploading the program file as explained in the Getting Started section above. Every time you reset the HiFive board (red button) the "Hello World!" message should be printed again.
HiFive1 Product Page
HiFive1 Schematic
SiFive FE310-G000 Datasheet
SiFive HiFive1 Getting Started Guide
SiFive FE310-G000 Manual
SiFive E31 Manual