Last active
April 6, 2020 21:02
-
-
Save swetland/a35817a02bf9f5df1b049eb2fdb90946 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
#### building open source ice40 family toolchain | |
#### | |
Updated April 2020 | |
To allow for easily swapping of tools, every component is installed | |
into /work/app/{appname}/{bin,lib,include,share,...} | |
Your path will need entries for each /work/app/{appname}/bin | |
Source checkouts live in /work/app/src/{appname}/... for tidyness | |
#### checkout and build verilator | |
#### https://www.veripool.org/projects/verilator/ | |
sudo apt install autoconf flex bison libfl2 libfl-dev | |
cd /work/app/src | |
git clone http://git.veripool.org/git/verilator | |
cd verilator | |
# git tag, find latest release tag, check out | |
git checkout -b v4.024 v4.024 | |
autoconf | |
./configure --prefix=/work/app/verilator | |
make -j8 | |
make install | |
export PATH=$PATH:/work/app/verilator/bin | |
#### checkout and build icestorm | |
#### http://www.clifford.at/icestorm/ | |
sudo apt-get install libftdi-dev | |
cd /work/app/src | |
git clone https://github.com/cliffordwolf/icestorm.git icestorm | |
cd icestorm | |
PREFIX=/work/app/icestorm make -j8 | |
PREFIX=/work/app/icestorm make install | |
export PATH=$PATH:/work/app/icestorm/bin | |
#### checkout and build project trellis | |
#### | |
cd /work/app/src | |
git clone --recursive https://github.com/SymbiFlow/prjtrellis | |
cd prjtrellis | |
cd libtrellis | |
cmake -DCMAKE_INSTALL_PREFIX=/work/app/prjtrellis . | |
make -j8 | |
export PATH=$PATH:/work/app/prjtrellis/bin | |
#### checkout and build yosys | |
#### https://github.com/YosysHQ/yosys | |
sudo apt-get install build-essential clang bison flex \ | |
libreadline-dev gawk tcl-dev libffi-dev git \ | |
graphviz xdot pkg-config python3 libboost-system-dev \ | |
libboost-python-dev libboost-filesystem-dev zlib1g-dev | |
cd /work/app/src | |
git clone https://github.com/YosysHQ/yosys.git yosys | |
cd yosys | |
make config-gcc # or config-clang | |
echo PREFIX := /work/app/yosys >> Makefile.conf | |
make -j8 | |
make install | |
export PATH=$PATH:/work/app/yosys/bin | |
#### checkout and built nextpnr-ice40 and nextpnr-ecp5 | |
#### https://github.com/YosysHQ/nextpnr | |
sudo apt-get install qt5-default libboost-all-dev python3-dev cmake libeigen3-dev | |
cd /work/app/src | |
git clone https://github.com/YosysHQ/nextpnr | |
cd nextpnr | |
cmake -DARCH=ice40 -DICEBOX_ROOT=/work/app/icestorm/share/icebox -DCMAKE_INSTALL_PREFIX=/work/app/nextpnr | |
make -j8 | |
make install | |
make clean | |
cmake -DARCH=ecp5 -DTRELLIS_ROOT=/work/app/src/prjtrellis -DCMAKE_INSTALL_PREFIX=/work/app/nextpnr . | |
make -j8 | |
make install | |
export PATH=$PATH:/work/app/nextpnr/bin | |
#### misc goodies | |
sudo apt install gtkwave | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment