Preparation
I decided i'm not going to store all the git repos in my /home folder, but rather put all of them in a separate /opt/ one. It is placed directly in the root directory, therefore to make all the operations we'll need the elevated permissions. Instead of putting sudo in front of all the commands, we'll switch to a superuser to act as root for all the build operations. Open up your terminal and input the 3 commands below:
$ sudo su # mkdir /opt # cd /opt
Now we are in the /opt/ directory acting as a root indicated by the hash prompt instead of $.
Building libserialport
Installing the required packages:
# apt-get install git-core gcc make autoconf automake libtool
Building procedure:
# git clone git://sigrok.org/libserialport # cd libserialport # ./autogen.sh # ./configure # make # make install
Building libsigrok
Go back to /opt/ folder and install all the required packages:
# cd .. # apt-get install git-core gcc g++ make autoconf autoconf-archive \ automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev \ libusb-1.0-0-dev libftdi-dev check doxygen python-numpy\ python-dev python-gi-dev python-setuptools swig default-jdkBuilding procedure:
# git clone git://sigrok.org/libsigrok # cd libsigrok # ./autogen.sh # ./configure # make # make installNow, in order to be able to run the libsigrok frontends, as our FX2LP board without superuser permissions we need to copy the udev rules and restart the udev:
# cp /opt/libsigrok/contrib/z60_libsigrok.rules /etc/udev/rules.d/ # /etc/init.d/udev restart
Building libsigrokdecode
Go back to /opt/ folder and install all the required packages:
# cd .. # apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-dev python3-devBuilding procedure:
# git clone git://sigrok.org/libsigrokdecode # cd libsigrokdecode # ./autogen.sh # ./configure # make # make install
Building sigrok-cli
Go back to /opt/ folder and install all the required packages:
# cd /opt # apt-get install git-core gcc make autoconf automake libtool pkg-config libglib2.0-devBuilding procedure:
# git clone git://sigrok.org/sigrok-cli # cd sigrok-cli # ./autogen.sh # ./configure # make # make install
Building pulseview
In this step i encountered some problems. Following the official build procedure the cmake . operation always failed asking for the path to the Qt5Config.cmake file:
... By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one. Could not find a package configuration file provided by "Qt5" with any of the following names: Qt5Config.cmake qt5-config.cmake Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed. ...The problem is solved by adding qtbase5-dev to the list of prerequisites. Here is the updated command:
# cd /opt # apt-get install git-core g++ make cmake libtool pkg-config \ libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev\ libboost-filesystem-dev libboost-system-dev libqt5svg5-dev qtbase5-devBuilding pulseview will take some time, depending on the machine specs. Below is the procedure:
# git clone git://sigrok.org/pulseview # cd pulseview # cmake . # make # make install
Building fx2lafw firmware
The last step is to build the firmware that will be loaded into the CY7C68013A chip upon enumerating it in the system. First we need to install sdcc :
# cd /opt # apt-get install sdccBuilding procedure:
# git clone git://sigrok.org/sigrok-firmware-fx2lafw # cd sigrok-firmware-fx2lafw # ./autogen.sh # ./configure # make # make installWhen it's done, type exit to leave the superuser mode back to your normal user account.
By now you should have the latest version of sigrok and Pulseview installed and ready to go. Connect the FX2LP board and run the following command to check if the sigrok command line tool detects it:
§ sigrok-cli --scanThe result should look like this:
You can run pulseview by typing its name in the terminal. It should automatically detect the presence of the FX2LP board, showing it as Saleae Logic.
Be sure to check a great tutorial video about logic analyzers @ OpenTechLab Youtube channel: