Prerequisites
On an Ubuntu system, the following are the main dependencies:
The build system: install pdm
For synthesis: install oss-cad-suite
For examples that include a softcore: rust
To build stripped images for RISC-V, you also need:
rustup target add riscv32im-unknown-none-elf rustup component add rustfmt clippy llvm-tools cargo install cargo-binutils svd2rust form
To set up the environment:
cd gateware
git submodule update --init --recursive
pdm install
All examples are built in CI. If you’re having trouble setting up your environment, it may also be worth checking the github workflow configuration.
By default, synthesis will use yowasp-yosys
and yowasp-nextpnr-ecp5
, rather than any oss-cad-suite
you have installed. When running locally, builds are usually faster if you point to your own installation - modify gateware/.env.toolchain
(simply deleting it will try to find yosys in your PATH).