Skip to content

Building on Linux

aushacker edited this page Feb 15, 2019 · 3 revisions

Tested on Ubuntu 18.04.1 LTS.

Getting Started

Before you do anything you need to read AN220.

FTDI devices have two kinds of drivers, VCP and D2XX. The VCP driver allows the device to be used solely as a serial port. The D2XX driver allows access to the more interesting devices modes such as GPIO, JTAG, SPI etc. It is important to note that Linux ships with the VCP driver by default. You need to disable the VCP driver before attempting to use the D2XX driver. AN220, section 1.1, tells you the commands to disable the VCP driver.

Install FTDI D2XX Driver

The FTDI Downloads page contains links to the driver archive and a ReadMe file. AN220 also has a bit to say about installation. At the time I tested this the current driver version was 1.4.8.

sudo mkdir /opt/ftdi
sudo mkdir /opt/ftdi/v1.4.8
sudo ln -s /opt/ftdi/v1.4.8 /opt/ftdi/current
cd ~/Downloads
wget https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.8.gz
tar xfv libftd2xx-x86_64-1.4.8.gz
sudo cp -r release/* /opt/ftdi/v1.4.8
sudo cp release/build/libftd2xx.so.1.4.8 /usr/local/lib
sudo ln -s /usr/local/lib/libftd2xx.so.1.4.8 /usr/local/lib/libftd2xx.so

Install Tools

Ubuntu 18.04.1 Desktop edition is missing a few tools required to build the project:

sudo apt install git
sudo apt install gcc
sudo apt install openjdk-8-jdk
sudo apt install maven

Configure Environment

Some parts of the maven build rely on having the JAVA_HOME environment variable set. This ultimately depends on where the package manager installs the JDK. On my workstation I used:

JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"

NB. You need to restart Ubuntu for this change to have effect.

Maven Build

mvn

Clone this wiki locally