Links

<aside> 💡 NOTE: This tutorial ends with compiling and uploading the example “blinky” design, not creating a custom FuseSoC core

</aside>

Installing FuseSoC Environment

Requires a native Linux installation of some kind to provide stable COM port access

cd ~
sudo pip3 install --upgrade fusesoc
fusesoc init

Acquiring Gowin Toolchains

# For Raspberry Pi get ARM, for x86 get x64
wget <https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2022-03-19/oss-cad-suite-linux-arm-20220319.tgz>
tar -xzf oss-cad-suite-linux-arm-20220319.tgz
mv oss-cad-suite oss-cad-suite-arm
# Add toolchain to universal path
echo -e '\\nexport PATH="<PATH-TO>/oss-cad-suite-arm/bin:$PATH"' | sudo tee -a /etc/profile

nextpnr-gowin Compilation and Setup

sudo pip3 install --upgrade apycula
cd ~
git clone <https://github.com/YosysHQ/nextpnr>
cd nextpnr
git checkout 8e9d0a6e
sudo apt install -y cmake libboost-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-iostreams-dev libboost-dev libeigen3-dev
cmake . -DARCH=gowin
make -j$(nproc) # Consider only using 2 threads on Raspberry Pi to prevent >1G RAM usage from hitting the swapfile
sudo make install