The FPGA bitstream will be generated with Quartus Prime Lite Edition 20.1 and the dtb with Intel SoC FPGA Embedded Development Suite 20.1 Standard. The software can be downloaded from Intel. All development will be done on a GNU/Linux system. To be specific it will be done on Archlinux. Archlinux uses a rolling release and this was done around 2020-09-18. Archlinux is not a supported platform for Intel FPGA software. If you want a supported platform you can download an ancient version of CentOS or Ubuntu. Installing Quartus and EDS can be a little tricky. There are some information on the Archlinux wiki but it seams to mostly cover older version. There are also AUR packages of Quartus which I have not tried.

Quartus Prime Lite

To launch the installation of Quartus do.

$  tar xvf Quartus-lite-20.1.0.711-linux.tar
$  ./setup.sh

I accepted the default installation default directory under my home, but made it into a btrfs subvolume to prevent several gibabytes of spam in my backup. When the installer for Quartus ask which packets to install remove all optional packages. If not the installer will either hang or it will complete and identify itself as Quartus Standard asking for a license. On the first launch select the “Run the Quartus Prime Software” option in the first dialog. A second dialog saying “You successfully installed the Quartus Prime software, but did not install any devices. Do you want to launch the device installer to add devices?” should appear, select Yes. Navigate to the components directory in the directory you unpacked Quartus-lite-20.1.0.711-linux.tar and select Cyclone V and complete the installation of the devices.

Intel SoC FPGA Embedded Development Suite (EDS)

To launch the installation of EDS do.

$  chmod +x SoCEDSSetup-20.1.0.711-linux.run
$  ./SoCEDSSetup-20.1.0.711-linux.run

I opted to not install the Quartus Prime Programmer and Tools I already have them installed as part of Quartus. Apart from that I left all settings as default. I also installed EDS into a BTRFS subvolume to keep it out of my backups.

Setting up the environment

I added the folowing aliases to my .bashrc so I can easily set up the environment for either Quartus or EDS.

alias quartus20.1="~/intelFPGA_lite/20.1/nios2eds/nios2_command_shell.sh"
alias eds20.1="~/intelFPGA/20.1/embedded/embedded_command_shell.sh"

USB-Blaster

ArchWiki instruct us to add the following udev rule to /etc/udev/rules.d/51-altera-usb-blaster.rules to make the USB-Blaster (I and II) work.

SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"

Make the file and reload the rules.

# udevadm control --reload

Now jtagconfig should list any connected USB-Blasters and the devices connected to the JTAG.

$  jtagconfig
1) CV SoCKit [3-1.3]
  02D020DD   5CSEBA6(.|ES)/5CSEMA6/..
  4BA00477   SOCVHPS

Cross compiler

We need a cross compiler to compile code for the ARM processor. We download one and set up the environment.

$  cd
$  wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
$  tar xf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz

Add the flowing to ~/cross_compile_arrow_sockit.sh

#! /bin/bash

export PATH=~/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-

Add this to .bashrc

alias cross_compile_arrow_sockit="source ~/cross_compile_arrow_sockit.sh"

Finishing up

All the changes we made to .bashrc will not take effect until we log in next time. So either log out and in again or execute them manually in a terminal emulator.