Created
July 10, 2023 14:39
-
-
Save rafaelcorsi/51060fa0dd039a2df783f458cc271f20 to your computer and use it in GitHub Desktop.
Dockerfile - opensource toolchain for Intel/Altera Cyclone V FPGAs
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
FROM ubuntu:22.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y curl build-essential git 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 \ | |
wget unzip make g++ libftdi1-dev libhidapi-dev libudev-dev cmake \ | |
gzip libboost-all-dev libeigen3-dev liblzma-dev | |
RUN git clone https://github.com/YosysHQ/yosys yosys | |
WORKDIR /yosys | |
RUN make config-gcc; make -j$(nproc); make install | |
WORKDIR / | |
RUN git clone https://github.com/Ravenslofty/mistral mistral | |
WORKDIR /mistral | |
ENV MISTRAL_ROOT=/mistral | |
WORKDIR / | |
RUN git clone https://github.com/YosysHQ/nextpnr nextpnr | |
WORKDIR /nextpnr | |
RUN cmake . -DARCH=mistral -DMISTRAL_ROOT=$MISTRAL_ROOT; make -j$(nproc) | |
RUN make install | |
WORKDIR / | |
RUN git clone https://github.com/trabucayre/openFPGALoader openfpgaloader | |
WORKDIR /openfpgaloader | |
RUN cmake .; make -j$(nproc) | |
RUN make install | |
WORKDIR / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supposing you have a
toplevel.v
and ade0cv_pins.qsf
file, you can:make toplevel.rbf
: generate the fpga program filemake toplevel.prog
: programs the FPGAOn this makefile we are using the OpenFPGALoader installed native on the OS, but you can modify to program it from the docker, for this you need to route the USB device to the docker:
Please use the
lsusb
to get the device number003/002
(that will change from pc/pc)Makefile: