diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 47 |
1 files changed, 38 insertions, 9 deletions
@@ -17,6 +17,15 @@ First, clone this repository: git clone --recursive https://github.com/sifive/freedom-e-sdk.git ``` +To see Makefile options: + +``` +cd freedom-e-sdk +make help +``` + +#### Building Tools from Source #### + Ubuntu packages needed: $ sudo apt-get install autoconf automake libmpc-dev libmpfr-dev libgmp-dev gawk bison flex texinfo libtool libusb-1.0-0-dev make g++ pkg-config libexpat1-dev zlib1g-dev @@ -25,24 +34,34 @@ Next, build the tools: ``` cd freedom-e-sdk -make tools +make tools [BOARD=freedom-e300-hifive1] ``` If your machine has enough resources, you can speed up the build process by adding `-j n` to `make`, where `n` is the number of processors of your build system. -To compile a bare-metal RISC-V program: -``` -cd freedom-e-sdk -make software [PROGRAM=demo_gpio] -``` +#### Using Pre-Built Binary Tools #### -To see additional options: +If you would like to avoid compiling the tools from source, they are +available as pre-built binaries from + +https://sifive.com/products/tools + +For OpenOCD and/or RISC-V GNU Toolchain, +download the .tar.gz for your platform, and unpack it to +your desired location. Then, use the `RISC_PATH` and `RISCV_OPENOCD_PATH` +variables when attempting to use the tools: ``` -cd freedom-e-sdk -make help +cp openocd-<date>-<platform>.tar.gz /my/desired/location/ +cp riscv64-unknown-elf-gcc-<date>-<platform>.tar.gz /my/desired/location +cd /my/desired/location +tar -xvf openocd-<date>-<platform>.tar.gz +tar -xvf riscv64-unknown-elf-gcc-<date>-<platform>.tar.gz +export RISCV_OPENOCD_PATH=/my/desired/location/openocd +export RISCV_PATH=/my/desired/location/riscv64-unknown-elf-gcc-<date>-<version> ``` + ### Updating your SDK ### If you'd like to update your SDK to the latest version: @@ -59,6 +78,16 @@ If you would like to recompile the entire toolchain after performing the above: make uninstall make tools ``` +### Using the Tools ### + +To compile a bare-metal RISC-V program: + +``` +cd freedom-e-sdk +make software [PROGRAM=demo_gpio] [BOARD=freedom-e300-hifive1] +``` + +Run `make help` for more commands. ### Benchmarking ### |