Icesugar 40 using docker
2025-12-22
docker run -it -v .:/chisel-book --name ice40 ubuntu:24.04
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get install build-essential clang bison flex libreadline-dev \
gawk tcl-dev libffi-dev git mercurial graphviz \
xdot pkg-config python3 libftdi-dev vim \
curl openjdk-25-jdk python3-dev libboost-all-dev cmake libeigen3-dev -y
cd /chisel-book
mkdir ice40
cd ice40
git clone https://github.com/YosysHQ/icestorm.git icestorm
cd icestorm
make -j
make install
cd ..
git clone https://github.com/cseed/arachne-pnr.git arachne-pnr
cd arachne-pnr
make -j
make install
cd ..
git clone https://github.com/YosysHQ/nextpnr nextpnr
cd nextpnr
cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . -B build
cd build
make # -j won't work
make install
cd ../..
git clone https://github.com/YosysHQ/yosys.git yosys
cd yosys
git submodule update --init
make -j4
make install
cd ..