Leaving this here mostly for me, but short instructions on how to install Pulseview on Linux to use cheap logic analyzers.
Clone Logic analyzers that use the Cypress FX2 chips are readily available for cheap - like this one on Amazon. But to set them up on Linux is a few steps and I seem to always have to hunt down the exact steps. So I’m noting them here for my future self and anyone else that needs them.
Libsigrok
First, you will need the basic library - AND the udev rules that go with it!
- clone the repo - “git clone git://sigrok.org/libsigrok”
- install the dependencies (these are for Ubuntu/Debian/Mint)
sudo 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 libftdi1-dev libieee1284-3-dev libvisa-dev nettle-dev libavahi-client-dev \
libhidapi-dev check doxygen python3-numpy python3-dev python-gi-dev python3-setuptools-git swig default-jdk
- Build and install
./configure
make
sudo make install
- Copy the udev files as described here - you should read those steps. For me this was the following from the libsigrok directory:
sudo cp contrib/60-libsigrok.rules /etc/udev/rules.d/
sudo cp contrib/61-libsigrok-plugdev.rules /etc/udev/rules.d/
sudo udevadm trigger
The last step is required to reload the rules.
Install the Firmware
The logic analyzer is useless without the firmware that should be loaded onto it when it’s plugged into your USB port. From a folder you can clone into, you need to get these files into the right spot like this:
sudo apt install sdcc
git clone git://sigrok.org/sigrok-firmware-fx2lafw
cd sigrok-firmware-fx2lafw
./autogen.sh
./configure
make
sudo make install
Install Pulseview
I have had bad luck with the Debian/Ubuntu builds. The only thing that’s reliably worked for me is the nightly appimage builds, available on this download page. For me, I used the Linux 64 bit:
wget https://sigrok.org/download/binary/pulseview/pulseview-NIGHTLY-x86_64-debug.appimage
mv pulseview-NIGHTLY-x86_64-debug.appimage ~/bin
cd ~/bin
ln -s ./pulseview-NIGHTLY-x86_64-debug.appimage ./pulseview
chmod +x pulseview
This is assuming you are setup to run appimages and ~/bin is in your path.
Run Pulseview
From the CLI you can now just type “pulseview” and it will start. If all went well you will see that it autodetected the device “Saleae Logic” instead of “Demo Device” - like this:
Enjoy
How to use a logic analyzer is an exercise for the reader. But Sparkfun has a tutorial that is likely very helpful.