• This repository has been archived on 04/May/2023
  • Stars
    star
    197
  • Rank 196,519 (Top 4 %)
  • Language Makefile
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tools for SiFive's Freedom Platform

SiFive Freedom RISC-V Tools for Embedded Development

At SiFive we've been distributing binary release packages of the embedded development tools that target our Freedom RISC-V platforms. This repository contains the scripts we use to build these tools.

Packages and their contents

  • RISC-V GNU Newlib Toolchain (riscv64-unknown-elf-*)
    • Binutils
    • GCC
    • GDB
    • Newlib (and nano)
    • LibExpat
    • Python
  • RISC-V OpenOCD (riscv-openocd-*)
    • OpenOCD
    • LibUSB, LibUSB-Compat, LibFTDI
  • RISC-V QEMU (riscv-qemu-*)
    • QEMU (riscv32-softmmu + riscv64-softmmu)
    • ZLib, LibFFI, LibIConv, GetText, GLib, LibPNG, JPEG, PixMan
  • SDK Utilities (sdk-utilities-*)
    • DTC (Device Tree Compiler)
    • Freedom Elf2Hex
    • Spike DASM (Disassembler)
  • Trace Decoder (trace-decoder-*)
    • Trace Decoder
    • SWIG, Binutils (bfd, opcodes, liberty, ZLib
  • XC3SPROG (xc3sprog-*)
    • XC3SPROG
    • LibUSB, LibUSB-Compat, LibFTDI, LibIConv

All the packages has a uniquely named root folder, making it easy to untar/unzip'ing multiple versions next to each other.

To build the tools:

$ git clone [email protected]:sifive/freedom-tools.git
$ cd freedom-tools
$ make <package-name>

The final output is a set of tarballs in the "bin" folder that should be ready to use. The output of a Ubuntu build includes a set of tarballs and zip files for Windows which is build using the MinGW toolchain.

Prerequisites

Several standard packages are needed to build the tools on the different supported platforms.

On Ubuntu, executing the following command should suffice:

$ sudo apt-get install cmake autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf patchutils bc zlib1g-dev libexpat-dev libtool pkg-config mingw-w64 mingw-w64-tools texlive zip python-dev gettext libglib2.0-dev libpixman-1-dev swig ninja-build python3
$ sudo pip3 install meson

On Ubuntu, for cross-building Windows packages you should use Linuxbrew to install extra dependencies:

$ brew install mingw-w64

On OS X, you can use Homebrew to install most of the dependencies and then you also need MacTex:

$ brew install cmake autoconf automake gawk gnu-sed gnu-tar texinfo libtool pkg-config wget xz swig python3 ninja meson

On Fedora/CentOS/RHEL OS, executing the following command should suffice - plus see below:

$ sudo yum install cmake libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel swig rh-python35 ninja-build
$ sudo pip3 install meson

On CentOS/RHEL 7 and Fedora you can use yum install for the rest:

$ sudo yum install autoconf automake libtool pkg-config

On CentOS/RHEL 6 you need to download and compile some tools manually to get the correct versions:

$ wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
$ tar xzvf autoconf-2.69.tar
$ cd autoconf-2.69
$ ./configure
$ make
$ make install

$ wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
$ tar xzvf automake-1.15.tar.gz
$ cd automake-1.15
$ ./configure
$ make
$ make install

$ wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
$ tar xzvf libtool-2.4.6.tar.gz
$ cd libtool-2.4.6
$ ./configure
$ make
$ make install

$ wget https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
$ tar xzvf pkg-config-0.29.2.tar.gz
$ cd pkg-config-0.29.2
$ ./configure --with-internal-glib
$ make
$ make install

$ wget https://ftp.gnu.org/gnu/texinfo/texinfo-6.4.tar.gz
$ tar xzvf texinfo-6.4.tar.gz
$ cd texinfo-6.4
$ ./configure
$ make
$ make install

More Repositories

1

freedom

Source files for SiFive's Freedom platforms
Scala
1,058
star
2

freedom-e-sdk

Open Source Software for Developing on the Freedom E Platform
C
567
star
3

freedom-u-sdk

Freedom U Software Development Kit (FUSDK)
BitBake
270
star
4

Kami

Kami - a DSL for designing Hardware in Coq, and the associated semantics and theorems for proving its correctness. Kami is inspired by Bluespec. It is actually a complete rewrite of an older version from MIT
Coq
188
star
5

sifive-blocks

Common RTL blocks used in SiFive's projects
Scala
176
star
6

freedom-metal

Bare Metal Compatibility Library for the Freedom Platform
C
153
star
7

fpga-shells

Scala
126
star
8

wake

The SiFive wake build tool
C++
85
star
9

elf2hex

Converts ELF files to HEX files that are suitable for Verilog's readmemh.
Shell
81
star
10

freedom-u540-c000-bootloader

Freedom U540-C000 Bootloader Code
C
77
star
11

RiscvSpecFormal

The RiscvSpecKami package provides SiFive's RISC-V processor model. Built using Coq, this processor model can be used for simulation, model checking, and semantics analysis. The RISC-V processor model can be output as Verilog and simulated/synthesized using standard Verilog tools.
Haskell
73
star
12

duh

๐Ÿ‘พ Design โˆช Hardware
JavaScript
72
star
13

benchmark-dhrystone

"DHRYSTONE" Benchmark Program by Reinhold P. Weicker
C
71
star
14

block-inclusivecache-sifive

Scala
71
star
15

riscv-llvm

SiFive's LLVM working tree
C++
69
star
16

chisel-circt

Library to compile Chisel circuits using LLVM/MLIR (CIRCT)
Scala
69
star
17

meta-sifive

SiFive OpenEmbedded / Yocto BSP Layer
BitBake
49
star
18

block-nvdla-sifive

Verilog
40
star
19

freedom-devicetree-tools

A linker script generator for SiFive's Freedom platform
C++
32
star
20

cinco

Port of Arduino environment for Freedom E 300 Dev Kit & HiFive Board
C++
31
star
21

last-week-in-risc-v

Weekly RISC-V Newsletter
Shell
28
star
22

ProcKami

Kami based processor implementations and specifications
Coq
24
star
23

pydevicetree

Python Library for Parsing Devicetree Source v1
Python
23
star
24

wit

Workspace Integration Tool
Python
22
star
25

verilator

Fork of Verilator with prebuilt Ubuntu binaries (https://www.veripool.org/wiki/verilator)
C++
21
star
26

freedom-studio

IDE for SiFive's Freedom Platform
16
star
27

FreeRTOS-metal

C
14
star
28

berkeley-hardfloat-chisel3

Hardfloat using chisel3
Scala
12
star
29

block-pio-sifive

An example of on-boarding a PIO block in with duh and wake
Scala
12
star
30

api-generator-sifive

Wake build descriptions of hardware generators
Python
12
star
31

soc-testsocket-sifive

A simple SoC for testing IP blocks
Scala
11
star
32

soc-freedom-sifive

e300 and u500 devkits
Scala
10
star
33

hifive1-revb-pendulum

An LED Ring and Accelerometer Pendulum Demo for HiFive1 Rev B
C
10
star
34

benchmark-mem-latency

simple cache latency test
C
9
star
35

riscv-vector-intrinsic-fuzzing

A random fuzz generator for the RISC-V vector extension intrinsics
C
9
star
36

devicetree-overlay-generator

Generates Devicetree overlays which encode the assumptions and/or sane defaults
Python
9
star
37

cmsis-svd-generator

Generates CMSIS-SVD xml files from DTS info and Register templates
Python
9
star
38

chisel-circt-demo

Demonstration of a project using sifive/chisel-circt
Scala
9
star
39

ldscript-generator

Freedom Metal Linker Script Generator
Python
8
star
40

Amazon-FreeRTOS

C
8
star
41

FpuKami

Coq
7
star
42

duh-scala

โ›๏ธ DUH component export to Scala
JavaScript
7
star
43

sifive-libc

Assembly
6
star
44

duh-ipxact

โŒ DUH IP-XACT import / export package
JavaScript
6
star
45

duh-schema

๐Ÿ“ DUH Schema
JavaScript
6
star
46

StdLibKami

Standard Library of Kami Modules
Coq
5
star
47

block-ark

๐ŸŒŠ๐Ÿ›ณ๏ธ๐Ÿ˜๐Ÿ˜๐Ÿ…๐Ÿˆ๐Ÿช๐Ÿซ๐Ÿ‘๐Ÿ๐Ÿ€๐Ÿ๐ŸŒ๐ŸŒ block with all sorts of bus interfaces
5
star
48

example-hpm

Demonstrates usage of the RISC-V hardware performance counter APIs.
C
5
star
49

scl-metal

C
5
star
50

duh-core

๐ŸŒฐ DUH core
JavaScript
4
star
51

debug-mechanism-comparison

Comparison of 2 proposed debug mechanisms.
HTML
4
star
52

example-pmp-baremetal

Example on how to program Physical Memory Protection Regions
C
4
star
53

example-cflush

An example demonstrating how to use cflush (CFLUSH.D.L1) and use FENCE to ensure flush complete
C
4
star
54

example-return-pass

A simple example for RTL run return pass
Makefile
3
star
55

xc3sprog

Imported from svn://svn.code.sf.net/p/xc3sprog/code/trunk
C++
3
star
56

soscl

SiFive Open Source Cryptographic Library
HTML
3
star
57

api-scala-sifive

Package for building Scala projects with wake
Python
3
star
58

example-pmp

C
3
star
59

freedom-gcc-metal

Bare Metal GCC for SiFive's Freedom Platform
Makefile
3
star
60

example-gpio

C
3
star
61

duhportinf

๐Ÿ‰ DUH port inference package
Python
3
star
62

duh-verilog

๐Ÿ‡ปVerilog import / export package
JavaScript
3
star
63

freedom-qemu

QEMU System Emulator for SiFive's Freedom Platform
C
3
star
64

example-return-fail

A simple example for RTL run return fail
Makefile
3
star
65

freedom-elf2hex

Converts ELF files to HEX files that are suitable for Verilog's readmemh.
C
3
star
66

upf

upf tools
JavaScript
3
star
67

zephyr-sifive-freedom-template

Board template for building Zephyr RTOS for SiFive Freedom E-Series products
C
2
star
68

example-buserror

Freedom Metal Example for the SiFive Bus Error Unit
C
2
star
69

openocdcfg-generator

OpenOCD Configuration Generator for Freedom Metal
Python
2
star
70

example-chisel-wake

Example For Wake to run a Chisel design and unit test.
Scala
2
star
71

freedom-metal-docs

HTML
2
star
72

example-freertos-blinky-systemview

C
2
star
73

plic-baremetal

Low level setup for PLIC interrupt controller
C
2
star
74

example-l2pm

Example code to demonstrate usage of Sifive L2 performance monitor counters to capture L2 cache event logs.
C
2
star
75

Segger_SystemView-metal

C
2
star
76

example-user-mode

C
2
star
77

trace-decoder-tests

Tests for SiFive trace decoder
Assembly
2
star
78

rocket-chip-wake

Wake build description for rocket-chip
2
star
79

riscv-fsf-gdb

C
2
star
80

example-firrtl-wake

Example Chisel modules and Chisel -> Verilog Wake flow
Scala
2
star
81

environment-blockci-sifive

Docker image and Wake environment for hardware development
Dockerfile
2
star
82

example-freertos-blinky

Standard Blinky freertos example
C
1
star
83

chisel-bootcamp-india

This is a trimmed down version of chisel bootcamp targeted for Indian undergraduate students. The Exercises here are sourced from different public chisel materials
Scala
1
star
84

testenv-metal

Test environment for freedom-metal
C
1
star
85

test-wfi-multicore

C
1
star
86

duh-svd

DUH to SVD converter
JavaScript
1
star
87

example-multicore-hello

C
1
star
88

environment-example-sifive

An example environment package
1
star
89

duh-bus

๐ŸšŒ Bus definition DUH documents
JavaScript
1
star
90

spdk-multithread

C
1
star
91

prepare-riscv-toolchain-qemu

Shell
1
star
92

example-freertos-minimal

C
1
star
93

duh-mem

โ“‚๏ธ DUH memory package
JavaScript
1
star
94

soc-iofpga-sifive

An IOFPGA SoC
Scala
1
star
95

firesim-ci-image

CI Image with LLVM and RISC-V utilities
Shell
1
star
96

example-l2pf

Example code to demonstrate usage of Sifive L2 hardware prefetcher.
C
1
star
97

freedom-gdb-metal

Bare Metal GDB for SiFive's Freedom Platform
Makefile
1
star
98

example-clic-nested-interrupts

A simple example demonstrating how to use CLIC preemptive (level and priority) nested interrupts
C
1
star
99

tree-sitter-wake

Wake grammar for tree-sitter
JavaScript
1
star
100

example-gpio-testbench

Exercises a GPIO connected to an RTL Testbench
C
1
star