Skip to content

Instantly share code, notes, and snippets.

@vchernin
Last active January 8, 2025 21:34
Show Gist options
  • Save vchernin/a48820a59311add325606543b8df8818 to your computer and use it in GitHub Desktop.
Save vchernin/a48820a59311add325606543b8df8818 to your computer and use it in GitHub Desktop.
Quartus 19.1 with nios 2 eds

Tested on fedora 37

How to install a functional quartus and nios 2 software build tools for eclipse on linux using a container. Hopefully this can save you time so you can get back to your real work of debugging a typo which breaks your entire verilog project.

Prerequistes

Install quartus

First install quartus 19.1 as normal in the normal location

then install nios 2 eds by overwritting the files exactly as instructed here
Archived: 1, 2, or see dropdown below

Eclipse installation instructions backup

No, the Nios® II SBT for Eclipse is not included starting from Intel® Quartus® Prime Pro and Standard Edition Software version 19.1 onwards.

Resolution

To install the Nios® II SBT for Eclipse, follow the steps below:

  1. Download CDT 8.8.1 which is Eclipse C/C IDE for Mars.2

    CDT 8.8.1 for Windows

    CDT 8.8.1 for Linux

Note: Try the mirror links if the main source link doesn't work.

2. Extract the downloaded file into <Intel Quartus installation directory>/nios2eds/bin. You should see the <Intel Quartus installation directory>/nios2eds/bin/eclipse folder after extraction is done.

  1. Rename the <Intel Quartus installation directory>/nios2eds/bin/eclipse folder to <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2

4. Extract the <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2_plugins.zip (or tar.gz for Linux) to <Intel Quartus installation directory>/nios2eds/bin. The extraction will override files in <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2

5. Verify the extraction is done correctly by making sure you see the <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2/plugin_customization.ini file

6. You can now launch Nios II SBT for Eclipse via eclipse-nios2.exe

The instructions are included in the <Intel Quartus installation directory>/nios2eds/bin/README.

This information will be included in the future release version of Intel® FPGA Software Installation and Licensing User Guide.

udev rules

This is only applicable if you are using the same soc device.

Add the following to /etc/udev/rules.d/92-usbblaster.rules

# USB-Blaster
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666"

SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666"

# USB-Blaster II
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666"

Then run:

udevadm control --reload

Container Setup

Make sure you have distrobox installed. It is in the fedora repos at least in fedora 37. You will also need a container manager like podman or docker (I tested with podman).

We pull the specific image with sha256 for reproducibility (distrobox will use the image you just pulled)
latest as of 2023-01-12

podman pull docker.io/almalinux:9.1@sha256:264308cf4be3130c489cad2e1885e80e0d7fe8b1fabdf383d3b3ec3f33f3e67b
podman tag docker.io/almalinux:9.1@sha256:264308cf4be3130c489cad2e1885e80e0d7fe8b1fabdf383d3b3ec3f33f3e67b quartus-alma-linux-image
distrobox create --image localhost/quartus-alma-linux-image
distrobox enter quartus-alma-linux-image

the first row of libraries are the base ones needed to run quartus
gtk2 is needed to theme quartus, and also to bring gtk swt dependencies for nios 2 eclipse
make and perl are needed for nios 2 compilations in distrobox:

sudo dnf install -y \
libnsl freetype libSM libXrender fontconfig libXext \
gtk2 \
make perl

If you need libpng12 still for some reason, install it for epel 9 with:

# from https://koji.fedoraproject.org/koji/buildinfo?buildID=2277625
wget https://kojipkgs.fedoraproject.org//packages/libpng12/1.2.57/18.el9/x86_64/libpng12-1.2.57-18.el9.x86_64.rpm
sudo dnf install libpng12-1.2.57-18.el9.x86_64.rpm

Note this particular nios 2 eclipse installation seems to like to misbehave (but that seems to normal for quartus). I find if I get a pop up telling me something can't be run, following this tutorial, I need to delete the entry under nios 2 hardware on the left in the "debug configurations" window that pops up if it can't load the program. And maybe do that 2 or 3 times before it behaves.

Also make sure to keep nios 2 eclipse working directory not in your git repos, as you want it to stay so you can actually open recent projects in case you delete your files. I am not sure how to recreate a eclipse project in a reproducible way if you didn't have one already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment