Logic Sniffer: upgrade process on Linux

From DP

Jump to: navigation , search

Tested on: Ubuntu 10.10; FPGA firmware ver. 2.12; PIC firmware ver. 2.1

Which programs will you need: git, svn, libusb, libusb-dev, dialog, (gcc, autotools, automake, patch)


Upgrade from the latest packaged version

The latest packaged version is available at http://gadgetfactory.net/logicsniffer/index.php?n=LogicSniffer.Download

Assuming the latest version is 0308,

Download either ols-0308.tgz or ols-0308-expert.tgz (download the expert package if you already have JRE installed).

 tar xf ols-0308-expert.tgz
 cd ols-0308/OLS_Upgrader
 sudo ./ols-upgrader.sh

The ols-upgrader.sh script runs 'dialog' to allow you to choose an FPGA ROM and a PIC Firmware image which will be uploaded onto the device in turn.

Checkout the latest repository and upgrade from that

Make a directory to work in, and cd into that directory. Next you will clone the git repository.

 git clone https://github.com/GadgetFactory/OpenBench-Logic-Sniffer

Compile PIC upgrader (fw_update)

 cd OpenBench-Logic-Sniffer/tools/fw_update
 sh ./configure

The last few lines should look like this:

checking for libusb... yes (  -lusb)
configure: creating ./config.status
config.status: creating Makefile
config.status: creating buffer/Makefile
config.status: creating dtrace/Makefile
config.status: creating exception/Makefile
config.status: creating image/Makefile
config.status: creating osdep/Makefile
config.status: creating parser/Makefile
config.status: creating config.h
config.status: executing depfiles commands

If it says:

checking for libusb... configure: error: libusb not found
you have no libusb-dev. Install it by executing:
sudo apt-get install libusb-dev

If there is no error, compile:


Few last lines should be like this:

make[2]: Leaving directory `/home/i/_ols_/fw_update'
make[1]: Leaving directory `/home/i/_ols_/fw_update'

If there is no error -- hooray, we have fw_update for Linux!

Copy fw_update to a directory in your $PATH and rename it ols-fw-update.

Compile FPGA upgrader (ols-loader)

 cd OpenBench-Logic-Sniffer/tools/ols-loader

Output should look something like this:

gcc -g -O0 -std=c99  -c main.c
gcc -g -O0 -std=c99  -c ols.c
gcc -g -O0 -std=c99  -c data_file.c
gcc -g -O0 -std=c99  -c serial.c
gcc -g -O0 -std=c99 -o ols-loader main.o ols.o data_file.o serial.o

Copy ols-loader into a directory in your $PATH

Perform the upgrade

cd OpenBench-Logic-Sniffer/OLS_Upgrader
chmod 755 ols-upgrader.sh
sudo ./ols-upgrader.sh

ols-upgrader.sh will give you a choice of FPGA bitstream to load. At present the choices are:

 logic_sniffer_3.07-Demon-Core.bit        FPGA ROM Demon Core 3.07
 Logic_Sniffer_dynamic_depth_2.12.bit     FPGA ROM 2.12

This will be loaded into the flash using the command:

  ols-loader -write -erase -p:/dev/ttyACM0 -wB:$FILENAME

Next, ols-upgrader.sh will give you a choice of PIC Firmware to load:

 OLSv1.firmware.v3.0.hex                  PIC Firmware Demon Core 3.0
 OLSv1.firmware.v2.6.hex                  PIC Firmware Demon Core 2.6
 OLSv1.04-firmware-v2.3.hex               PIC Firmware 2.3
 OLSv1-firmware-v2.1.hex                  PIC Firmware 2.1

At this point the PIC should be in bootloader mode. To check this, run "lsusb" from a separate terminal and you should see a device numbered 04d8:fc90. If your device is 04d8:fc92 then your OLS is not in bootloader mode.

If your OLS is not in bootloader mode, disconnect it, jumper PGC and PGD, and reconnect it. Make sure you see the correct USB vid:pid in "lsusb" before continuing.

When you press enter, ols-upgrader.sh will upgrade the PIC using this command:

 ols-fw-update -e -w -m flash -vid 0x04D8 -pid 0xFC90 -ix $PIC_FILENAME

If you get an error "Device Not Found" or a Segmentation Fault, maybe you forgot you have to run ols-fw-update as root.

Upgrade process

We just compiled both utilities necessary for upgrade. We just need to actually download latest firmware and upgrade our OLS.

cd ..  ;cd to your "main OLS dir"
svn checkout --username anonymous http://gadgetforge.gadgetfactory.net/svn/butterflylogic//trunk/package/OLS_Upgrader

(when asked for password, just hit enter)

Copy our utilities to OLS_Upgrader folder:

cp fw_update/fw_update OLS_Upgrader/
cp ols-loader/ols-loader OLS_Upgrader/

cd OLS_Upgrader
chmod +x OLS_Upgrader.sh

Modify OLS_Upgrader by patch: Download this file http://kormus.cz/data/OLS_Upgrader.patch into OLS_Upgrader folder

Apply patch:
patch OLS_Upgrader.sh OLS_Upgrader.patch

Connect your OLS to USB and check the name of new created device:

dmesg | tail

It should produce something like this:

[284914.304081] usb 6-1: new full speed USB device using uhci_hcd and address 75
[284914.493337] usb 6-1: configuration #1 chosen from 1 choice
[284914.495198] cdc_acm 6-1:1.0: This device cannot do calls on its own. It is not a modem.
[284914.495242] cdc_acm 6-1:1.0: ttyACM0: USB ACM device

Remember this "ttyACM0".

Run OLS_Upgrader (you need to have "dialog" installed):


If you see an error like this:

OLS_Upgrader$ ./OLS_Upgrader.sh 
./OLS_Upgrader.sh: line 12: dialog: command not found
./OLS_Upgrader.sh: line 32: dialog: command not found
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Unknown parameter 'line'
Press any key to continue...^C
then you need to install dialog, with
sudo apt-get install dialog
or equivalent.

Type /dev/ttyACM0 (or you device name) when you are asked. Follow the information displayed during upgrade process.

Hurray! Your OLS has the newest version of firmware!