Skip to content

04 LogicAnalyzer Software

Agustín Gimenez Bernad edited this page Jul 8, 2024 · 6 revisions

Why a new software?

This has been a recurring question: why create a new software instead of using sigrok/pulseview?

First of all, I don't like it, I had very bad experiences with it (random crashes in multiple machines) and the most prominent one is the protocol. Sigrok uses a protocol that does not allow to send custom commands to the device, and the LogicAnalyzer trigger is implemented in hardware. The device is able to achieve the 100Msps using the PIO units of the Pico, and this allowed me to create a trick to use a secondary PIO machine to determine when the trigger pattern is matched. I need to send the parameters to the Pico, and the Sigrok protocol does not allow this.

Also, I know other projects that have been years waiting for its driver to be included in Sigrok without success, so for me is faster, easier and more flexible to implement my own software.

The software

The software has been built using .net 7.0, it uses the Avalonia UI framework for the UI so the application is 100% portable, I publish versions for Windows, Linux and MacOS, so you can run it in nearly any machine, even a Raspberry is able to run it.

I use Visual Studio to create it, but you can build it using Visual Studio Code. I encourage you to use Visual Studio as it's more more mature and full of functionalities not available on VS Code, but hey, if you don't like it or don't have enough space to install it feel free to use VS Code.

The solution includes two executables and five libraries. The first executable "CLCapture" is the command line capture utility, it captures samples into a CSV file that can be imported into PulseView. The second executable "LogicAnalyzer" is the main software, it's a full fledged analyzer that allows you to see the samples, use protocol analyzers, modify the captures and even create your own digital signal files. Next we have the "SharedDriver" library, this library is the main driver used by both applications to interact with the device, it contains the support for the USB and WiFi devices and also implements the multi-capture driver which is used to daisy-chain up to five analyzers using a single trigger. Next we have the "SignalDescriptionLanguage" library, it implements the parser and generator for the SDL files, more info about this on the LogicAnalyzer program section. Finally there are three protocol analyzer libraries for RS-232, SPI and I2C.

Notes for Linux and MacOS users

The programs are built and packaged under Windows, so the executables will lack the execution permission. Once you have decompressed the applications you will need to issue a "chmod +x {executable}" in order to be able to run it. Also, for the osx-arm version you will need to remove the executable and all the dylib's from quarantine, the fastest way is to remove the full directory from quarantine issuing a "sudo xattr -r -d com.apple.quarantine {directory}".

Update for Mac users

Apple being the greedy company that it is now is blocking even the quarantine removal workaround, you will need to codesign yourself the app in order for it to work: "codesign --force --deep -s - ./LogicAnalyzer"