Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
m
 
(68 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[File:sigrok windows.png|right|thumb|320px|sigrok-qt on Windows]]
[[File:Pv spiflash windows10.png|right|thumb|320px|[[PulseView]] on Windows 10]]
[[File:Pulseview win jtag.png|right|thumb|320px|[[PulseView]] on Windows XP]]


== Status ==
== Windows installers ==


We intend to fully support all major operating systems in sigrok, including Windows. However, we're not quite there, yet. Various portability issues need to be addressed still. The table below lists the current Windows status of the various hardware drivers.
We provide nightly Windows installers for [[sigrok-cli]] and [[PulseView]] (require Windows XP or higher). Please test and [http://sigrok.org/bugzilla/ report] any issues you encounter. You can find the installers on the [[Downloads]] page.


{| border="0" style="font-size: smaller"
|- bgcolor="#6699ff"
!Logic analyzer
!Windows status
|- bgcolor="#dddddd"
| [[Saleae Logic]]
| bgcolor="red" | Various issues need to be sorted out<sup>1</sup>.
|- bgcolor="#eeeeee"
| [[EE Electronics ESLA100]]
| bgcolor="red" | Various issues need to be sorted out<sup>1</sup>.
|- bgcolor="#dddddd"
| [[ASIX SIGMA]]
| bgcolor="lime" | Compiles fine using libftdi + libusb-0.1-win32 (not runtime-tested, though).
|- bgcolor="#eeeeee"
| [[Openbench Logic Sniffer]]
| bgcolor="orange" | Serial port portability fixes required (partially implemented, but unfinished).
|- bgcolor="#dddddd"
| [[ZEROPLUS Logic Cube LAP-C(16032)]]
| bgcolor="lime" | Uses libusb-1.0, but seems to work fine.
|- bgcolor="#eeeeee"
| [[Link Instruments MSO-19‎]]
| bgcolor="orange" | Doesn't compile due to libudev dependency. TODO: Make libudev optional.
|- bgcolor="#dddddd"
| [[ChronoVu LA8]]
| bgcolor="lime" | Works fine using libftdi + libusb-0.1-win32.
|- bgcolor="#eeeeee"
| [[Robomotic MiniLogic]]
| bgcolor="red" | Various issues need to be sorted out<sup>1</sup>.
|- bgcolor="#dddddd"
| [[Logic Shrimp]]
| bgcolor="orange" | Serial port portability fixes required (partially implemented, but unfinished).
|- bgcolor="#eeeeee"
| [[Lcsoft Mini Board]]
| bgcolor="red" | Various issues need to be sorted out<sup>1</sup>.
|- bgcolor="#dddddd"
| Demo driver
| bgcolor="lime" | Works fine.
|}


<sup>1</sup> There are various problems with the current sigrok and libusb-1.0 code on Windows that need to be fixed. Among other things, running poll()/select() on FDs is not possible on Windows, neither does libusb_get_pollfds() work.
== Self-extracting installer ==
Work in progress. We don't provide pre-built installers right now, but will do so in the near future, when a few issues have been sorted out.
Currently only the command-line tool [[sigrok-cli]] is fully supported, but (for testing purposes) the [[PulseView]], [[sigrok-qt]], or [[sigrok-gtk]] can be installed, too.
See [[Developers/Release_process#Windows_installers|Developers/Release process]] for details on creating your own installer files.


<gallery widths="120px" heights="70px" perrow="5">
<gallery widths="120px" heights="70px" perrow="5">
Line 62: Line 16:
</gallery>
</gallery>


== Building/installing the requirements ==
== Drivers ==
 
In order to use [[libsigrok]] (via a sigrok frontend) on Windows, you need to install the proper driver for the respective device.
 
=== COM/serial/RS232 driver ===
 
If your device is connected through a (virtual) COM port, libsigrok generally doesn't need a special driver. Please install the driver as provided by the manufacturer. If you are unsure, you can check if your device appears at the "Ports (COM&LPT)" section of the Windows Device Manager.


This page describes how to build sigrok on Windows.
'''Exception''': If the libsigrok driver uses the chip, for example an FTDI chip, in a special mode (i.e., not as a plain COM port), the Zadig steps outlined below '''will''' be required. One example for that is the "ftdi-la" libsigrok driver.


=== TortoiseGit ===
=== Device specific USB driver ===


For checking out the sigrok source code you can use [http://code.google.com/p/tortoisegit/ TortoiseGit] on Windows.
The device specific USB driver shipped with the vendor software is '''not''' going to work in almost all cases. You will need to install the '''WinUSB''' driver.


* Download and install the [http://code.google.com/p/tortoisegit/downloads/list latest version] (for 32bit or 64bit Windows) of TortoiseGit (just double-click the *.msi installer).
For installing the '''WinUSB''' driver you can use the [http://zadig.akeo.ie/ Zadig] executable. There are two versions, one for Windows XP ('''zadig_xp.exe'''), and another one for all other (Vista or higher) supported Windows versions ('''zadig.exe'''). Both 32 and 64 bit Windows versions are supported.
* Download and install the [http://code.google.com/p/msysgit/downloads/list latest version] of the "full installer" of [http://code.google.com/p/msysgit/ MSysGit] (double-click the *.exe installer).
The [[sigrok-cli]] and [[PulseView]] installers ship with both Zadig executable files for convenience and they're available from the Windows "Start" menu (the Zadig *.exe files themselves are located in the installation directory of the respective application).


=== MinGW/MSYS ===
If you already installed the vendor driver previously, you need to run Zadig and switch to the '''WinUSB''' driver (see above). There's no need to uninstall or deactivate the vendor driver manually, Zadig will handle all of this.


In order to build sigrok and various of its dependencies, we need a UNIX-like environment on Windows, which is provided by MinGW/MSYS.
'''Note:''' For some devices (such as the [[Hantek 6022BE]], for example) you might have to assign the WinUSB driver via Zadig '''twice''': the first time for the initial USB VID/PID the device has when attaching it via USB, and a second time after the firmware has been uploaded to the device and the device has "renumerated" with a '''different''' VID/PID pair.


* Download the [http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/ latest version] of the automated [http://mingw.org/ MinGW] installer named '''mingw-get-inst''' (double-click the installer EXE file, which will download and install all components).
See also the [https://github.com/pbatard/libwdi/wiki/Zadig Zadig wiki page] for more information.
** Make sure you enable "MinGW Compiler Suite", "C++ compiler", "MSYS Basic System", and "MinGW Developer Toolkit" in the installer.
** For simplicity it's recommended to leave the default install location of '''c:\MinGW''' unchanged.


Now open a MinGW shell via '''Start/Programs/MinGW/MinGW Shell''' and do the following:
== Firmware ==


$ '''mingw-get update'''
The Windows installers ship with all firmware files that are either open-source or where we have permission from the vendor to distribute them. Some devices will need other firmware which we cannot redistribute though. See the wiki page for the respective device on how you can extract those firmware files from the vendor's software.
$ '''mingw-get install msys-wget msys-unzip'''


=== autotools ===
You'll need to copy the extracted files into one of the directories where [[libsigrok]] will search for firmware files. The list of those directories can be found in [[PulseView]]'s "Settings->About" dialog in the "Firmware search paths" section, or in the [[sigrok-cli]] "-l 5" log output.


Installing the autotools (if not already done) is as simple as:
'''Example paths on 64bit PulseView on 64bit Windows 10 (might vary on other systems):'''


$ '''mingw-get install autoconf automake libtool'''
* C:\Users\''xxxx''\AppData\Local\sigrok-firmware (where ''xxxx'' is your username)
* C:\ProgramData\sigrok-firmware
* C:\Users\Public\Documents\sigrok-firmware
* C:\Program Files (x86)\sigrok\PulseView\share\sigrok-firmware


=== Additional files for sigrok ===
== Example files ==


Unfortunately, not all binary packages needed for a sigrok build come with a pkg-config .pc file, thus we provide our own files for simplicity. Extract the following into '''c:\MinGW\msys\1.0\local''':
The Windows installers ship with example dump files (from our [[Example dumps|sigrok-dumps]] repository), which are located in the '''examples''' subdirectory of the install directory of [[sigrok-cli]] and [[PulseView]].


* [http://sigrok.org/w/images/5/53/Sigrok_mingw_stuff.zip Sigrok_mingw_stuff.zip]
These files can be used to conveniently test various frontend features and [[protocol decoders]], and so on.


=== libglib and pkg-config ===
== Limitations and TODOs ==


sigrok also needs [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ libglib >= 2.28.0], which in turn needs [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config] (>= 0.22). Download the latest versions of the respective Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
See [http://sigrok.org/bugzilla/buglist.cgi?query_format=advanced&resolution=---&op_sys=Windows&list_id=2400 the list of currently known Windows issues] in Bugzilla.


* [http://ftp.gnome.org/pub/gnome/binaries/win32/glib/ glib and glib-dev]
== FAQ ==
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ pkg-config and pkg-config-dev]


Then run:
=== I cannot start sigrok-cli or PulseView: error Oxc0150002 ===


$ '''cd /c/MinGW/bin'''
This happens if you don't have the
$ '''cp libintl-8.dll intl.dll'''
* [https://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Redistributable Package]
* (older links) [https://www.microsoft.com/en-us/download/details.aspx?id=5555 Microsoft Visual C++ 2010 Redistributable Package (x86)] or [https://www.microsoft.com/en-us/download/details.aspx?id=14632 Microsoft Visual C++ 2010 Redistributable Package (x64)]
installed. Usually this is already installed on most machines since various other software packages also need this. If you didn't yet install it (or no other software package automatically installed it for you) you will see the '''Oxc0150002''' error and [[sigrok-cli]] and/or [[PulseView]] will not start.


=== libusb 1.0 ===
The root cause for this is that the above download will install the otherwise missing file '''msvcr100.dll''' (and possibly others) which is required for running sigrok frontends. The requirement is imposed by '''python34.dll''' to be more specific, which we use/need for running [[protocol decoders]].


$ '''git clone git://git.libusb.org/libusb-pbatard.git''' (or use TortoiseGit)
Please download the respective Microsoft Visual C++ 2010 Redistributable Package and install it, that should fix the issue and allow you to start [[sigrok-cli]] and/or [[PulseView]].
$ '''cd libusb-pbatard'''
$ '''./autogen.sh'''
$ '''touch configure'''
$ '''make'''
$ '''make install'''


=== libftdi + libusb-0.1-win32 ===
=== My device is not found or usable (USB/driver/firmware/hardware issues) ===


* Download and execute [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-devel-filter-1.2.5.0.exe/download libusb-win32-devel-filter-1.2.5.0.exe].
If a [[libsigrok]] frontend such as [[sigrok-cli]] or [[PulseView]] doesn't seem to find your device, that could have multiple reasons:
* Download and extract [http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.5.0/libusb-win32-bin-1.2.5.0.zip/download libusb-win32-bin-1.2.5.0.zip].
** Rename '''bin/x86/libusb0_x86.dll''' to '''libusb0.dll''' and copy it to '''/usr/local/bin'''.
** Rename '''include/lusb0_usb.h''' to '''usb.h''' and copy it to '''/usr/local/include'''.
** Copy '''lib/gcc/libusb.a''' to '''/usr/local/lib'''.
* Install libftdi. The easiest method is probably to use the [https://picusb.googlecode.com/files/libftdi-0.19_mingw32.zip libftdi-0.19_mingw32.zip] binaries from [http://code.google.com/p/picusb/downloads/list here].
** Extract the ZIP file into a temporary directory.
** Copy '''dll/libftdi.dll''' to '''/usr/local/bin'''.
** Copy '''lib/libftdi.a''' and '''lib/libftdi.dll.a''' to '''/usr/local/lib'''.
** Copy '''include/ftdi.h''' to '''/usr/local/include'''.


=== zlib ===
* You need to place the proper firmware and/or FPGA bitstream file(s) for your device (if any) into the respective directory where the frontend expects them. See [[Windows#Firmware|above]] for details.
* You need to install the correct vendor driver and/or use Zadig to assign the WinUSB driver to your device. See [[Windows#Drivers|above]] for details.
* Be careful into which USB port you plug the device. Windows assigns drivers to USB devices based on their serial number, and as a fallback (if the device doesn't have a USB serial number) it assigns drivers per USB port. That means (for example) that if you assigned the WinUSB driver using Zadig while your device was attached to a certain physical USB port, that assignment will '''not''' be available when you plug the same device into '''another''' USB port! You'll have to do the WinUSB driver assignment '''again''' (using Zadig) for that new USB port!
* For some devices (e.g. FX2-based ones) you might have to assign the WinUSB driver via Zadig twice: the first time for the initial USB VID/PID the device has when attaching it via USB, and a second time after the firmware has been uploaded to the device and the device has "renumerated" with a different VID/PID pair (run PulseView or sigrok-cli --scan to upload the firmware). Because of the different VID/PID pair, Windows will be unable to tell that it's actually the same USB device and only assign WinUSB to the device it saw first.
* If you use certain inexpensive FX2-based logic analyzers, please do '''not''' use the USB cable that they shipped with. Those USB cables seem to be of a consistently '''very''' bad quality and cause all kinds of strange issues. Use another USB cable of which you are sure that it is working well.


Download the latest versions of the respective Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
=== (FX2 based) logic analyzer terminates acquisition before the specified limit. ===


* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ zlib and zlib-dev]
Got trouble getting captures with an FX2 based logic analyzer at higher samplerates. Acquisition terminates before the specified amount of samples or time. Logs contain a message that the device "... only sent [a smaller amount of data]".


=== libzip ===
That's a known constraint of the ubiquitous FX2 chips which are found in many cheap and thus rather popular logic analyzers (and also in some oscilloscopes). The high rates of 24MSa/s for up to 8 logic channels, or 12MSa/s for up to 16 channels, are near the theoretical bandwidth limit of the USB 2.0 connection when communication overhead gets considered. In addition the FX2 chip only has little memory for to-get-transmitted data (covering the fraction of a millisecond). That's why successful communication heavily depends on the PC's capability to process the data which the FX2 chip provides. The slightest hiccup causes a FIFO overflow in the FX2. Lost data cannot get recovered, and it's uncertain which period of acquisition time was affected. So the only remaining option is to terminate the acquisition.


$ '''wget http://nih.at/libzip/libzip-0.10.tar.gz'''
Things to check:
$ '''tar xfvz libzip-0.10.tar.gz'''
* Sample data at lower rates when possible.
$ '''cd libzip-0.10'''
* Pick proper cables, those shipped with the cheap devices often are not up to their task.
$ '''./configure --with-zlib=/usr/local'''
* Make sure USB bandwidth for the logic analyzer is not shared with other devices. Ideally put the logic analyzer on a separate port so that nothing else occupies that bus. Avoid USB hubs in that acquisition setup.
$ '''make'''
* Disable features which could stall the acquisition. Separate the phase of data acquisition from the phase of processing that data.
$ '''make install'''
* Reduce the PC's workload during the time of acquisition (if it causes the communication to stall ocassionally).
* Past reports suggest that some operating systems are said to suffer more often from that issue than others.


=== Python ===
=== How do I see debug output from PulseView on Windows? ===


We also need Python >= 3.0 for running the sigrok [[protocol decoders]] which are written in Python. On Windows, sigrok currently assumes '''Python 3.2.x''' installed in '''c:\Python32'''.
Because of the division between console and graphical subsystems in Windows, debugging output is not directly visible in console like it would be on Linux.
Instead, in normal Windows builds, debugging output can be seen in PulseView settings window "Logging" tab.


* Download and install the [http://python.org/ftp/python/3.2.2/python-3.2.2.msi latest version] (currently 3.2.2) of the [http://python.org/download/ Python Windows installer] (just double-click the *.msi installer file).
The default log level is 2 (errors only). To capture full debug output, PulseView can be started with option `-l 5`, which is done by the `PulseView (debug)` shortcut created by the installer.
** For simplicity it's recommended to leave the default install location of '''c:\Python32''' unchanged.


'''Note:''' For now, please use the 32bit Python installer, as everything else is also 32bit based. Otherwise you'll have issues.
However, if the whole PulseView application crashes, the debug log in settings window disappears also. For these cases you should download the debug build from above. It will open a separate console window that will show log messages.


=== Qt ===
== Building from source ==


In order to also build the Qt-based [[GUI|sigrok-qt]], download the [http://qt.nokia.com/downloads#lgpl latest version] (>= 4.5) of the Qt SDK for Windows (LGPL version) and double-click the installer. The download includes the Qt libraries, Qt Creator, Qt Designer, and various other Qt development tools.
'''Note:''' This should generally not be necessary for users, please just use the provided [[Windows#Windows_installers|nightly installers]] (see above).


=== GTK+ ===
Get the [https://sigrok.org/gitweb/?p=sigrok-util.git sigrok-util] git repository, which contains instructions as well as scripts to help in the below steps.


Download the latest versions of the following Windows binaries and extract them into '''c:\MinGW\msys\1.0\local''':
=== Cross-compile using MXE ===


* [http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/ gtk+ and gtk+-dev]
If you ''really'' want to build from source, we recommend you use the [http://sigrok.org/gitweb/?p=sigrok-util.git;a=tree;f=cross-compile/mingw sigrok-cross-mingw] script from the sigrok-util repository (that uses [http://mxe.cc/ MXE]) to cross-compile the Windows binaries on a Linux system.
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ fontconfig and fontconfig-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/gdk-pixbuf/ gdk-pixbuf and gdk-pixbuf-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ cairo and cairo-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/pango/ pango and pango-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/atk/ atk and atk-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ freetype and freetype-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ libpng and libpng-dev]
* [http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/ expat and expat-dev]


== Building/installing sigrok components ==
Native builds are generally '''not''' supported by us! Yes, they can work in theory (see below), but it means a lot of hassle compared to a cross-compile using the above script, and native builds are not really well-tested by us.


Building [[libsigrok]]:
=== Native build using MSYS2 ===


$ '''git clone git://sigrok.org/libsigrok'''
If you ''do'' want to build the sigrok subprojects natively on a Windows system (instead of using the cross-compile method, see above) we recommend you use [http://www.msys2.org/ MSYS2]. More information is available on the [https://github.com/msys2/msys2/wiki/MSYS2-introduction MSYS2 introduction] and the [https://github.com/msys2/msys2/wiki/MSYS2-installation MSYS2 installation] pages.
$ '''cd libsigrok'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


Building [[libsigrokdecode]]:
Please read our [http://sigrok.org/gitweb/?p=sigrok-util.git;a=blob;f=cross-compile/msys2/README README] for details on how to set up MSYS2 in general, how to install the sigrok dependencies, and so on.


$ '''git clone git://sigrok.org/libsigrokdecode'''
Then, use our [http://sigrok.org/gitweb/?p=sigrok-util.git;a=blob;f=cross-compile/msys2/sigrok-native-msys2 sigrok-native-msys2] script to build all required software components.
$ '''cd libsigrokdecode'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


For building [[sigrok-cli]] (the command-line interface for sigrok):
'''Status''':
* This is still work in progress, not all parts are fully working, tested, or supported yet. Patches welcome!
* '''Working''': libusb (special branch), libserialport, libsigrok, libsigrokcxx, libsigrokdecode, sigrok-firmware, sigrok-firmware-fx2lafw.
* '''NOT yet working''': libsigrok Python/Ruby/Java bindings, sigrok-cli, sigrok-cli NSIS installer, PulseView, PulseView NSIS installer.
** Currently, the main missing parts in MSYS2 are static builds for [https://github.com/Alexpux/MINGW-packages/issues/3561 libzip] and [https://github.com/Alexpux/MINGW-packages/issues/3562 Python]. Once those are available, we should be able to build all sigrok subprojects natively via MSYS2.


$ '''git clone git://sigrok.org/sigrok-cli'''
=== Native build using the old MinGW+MSYS ===
$ '''cd sigrok-cli'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


For building [[PulseView]] (Qt GUI for sigrok):
Not supported by us. Please use one of the methods described above.


$ '''git clone git://sigrok.org/pulseview'''
=== Native build using Cygwin ===
$ '''cd pulseview'''
$ '''cmake -G "MSYS Makefiles" -D BOOST_ROOT:string=/usr/local .'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


For building [[sigrok-gtk]] ('''Note:''' sigrok-gtk is not yet usable!):
Not supported by us. Please use one of the methods described above.


$ '''git clone git://sigrok.org/sigrok-gtk'''
=== Native build using Borland/Embarcadero C++ Builder ===
$ '''cd sigrok-gtk'''
$ '''./autogen.sh'''
$ '''./configure'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


For building [[sigrok-qt]] ('''Note:''' sigrok-qt is not yet usable!):
Not supported by us. Please use one of the methods described above.


$ '''git clone git://sigrok.org/sigrok-qt'''
=== Native build using Microsoft Visual Studio ===
$ '''cd sigrok-qt'''
$ '''/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/qmake'''
$ '''make'''
$ '''make install'''
$ '''cd ..'''


If you get warnings claiming potential symbol conflicts when running qmake, you are likely not invoking '''qmake-qt4'''. Try running '''qmake-qt4''' to force the correct version.
Not supported by us. Please use one of the methods described above.

Latest revision as of 09:40, 15 December 2023

PulseView on Windows 10
PulseView on Windows XP

Windows installers

We provide nightly Windows installers for sigrok-cli and PulseView (require Windows XP or higher). Please test and report any issues you encounter. You can find the installers on the Downloads page.


Drivers

In order to use libsigrok (via a sigrok frontend) on Windows, you need to install the proper driver for the respective device.

COM/serial/RS232 driver

If your device is connected through a (virtual) COM port, libsigrok generally doesn't need a special driver. Please install the driver as provided by the manufacturer. If you are unsure, you can check if your device appears at the "Ports (COM&LPT)" section of the Windows Device Manager.

Exception: If the libsigrok driver uses the chip, for example an FTDI chip, in a special mode (i.e., not as a plain COM port), the Zadig steps outlined below will be required. One example for that is the "ftdi-la" libsigrok driver.

Device specific USB driver

The device specific USB driver shipped with the vendor software is not going to work in almost all cases. You will need to install the WinUSB driver.

For installing the WinUSB driver you can use the Zadig executable. There are two versions, one for Windows XP (zadig_xp.exe), and another one for all other (Vista or higher) supported Windows versions (zadig.exe). Both 32 and 64 bit Windows versions are supported. The sigrok-cli and PulseView installers ship with both Zadig executable files for convenience and they're available from the Windows "Start" menu (the Zadig *.exe files themselves are located in the installation directory of the respective application).

If you already installed the vendor driver previously, you need to run Zadig and switch to the WinUSB driver (see above). There's no need to uninstall or deactivate the vendor driver manually, Zadig will handle all of this.

Note: For some devices (such as the Hantek 6022BE, for example) you might have to assign the WinUSB driver via Zadig twice: the first time for the initial USB VID/PID the device has when attaching it via USB, and a second time after the firmware has been uploaded to the device and the device has "renumerated" with a different VID/PID pair.

See also the Zadig wiki page for more information.

Firmware

The Windows installers ship with all firmware files that are either open-source or where we have permission from the vendor to distribute them. Some devices will need other firmware which we cannot redistribute though. See the wiki page for the respective device on how you can extract those firmware files from the vendor's software.

You'll need to copy the extracted files into one of the directories where libsigrok will search for firmware files. The list of those directories can be found in PulseView's "Settings->About" dialog in the "Firmware search paths" section, or in the sigrok-cli "-l 5" log output.

Example paths on 64bit PulseView on 64bit Windows 10 (might vary on other systems):

  • C:\Users\xxxx\AppData\Local\sigrok-firmware (where xxxx is your username)
  • C:\ProgramData\sigrok-firmware
  • C:\Users\Public\Documents\sigrok-firmware
  • C:\Program Files (x86)\sigrok\PulseView\share\sigrok-firmware

Example files

The Windows installers ship with example dump files (from our sigrok-dumps repository), which are located in the examples subdirectory of the install directory of sigrok-cli and PulseView.

These files can be used to conveniently test various frontend features and protocol decoders, and so on.

Limitations and TODOs

See the list of currently known Windows issues in Bugzilla.

FAQ

I cannot start sigrok-cli or PulseView: error Oxc0150002

This happens if you don't have the

installed. Usually this is already installed on most machines since various other software packages also need this. If you didn't yet install it (or no other software package automatically installed it for you) you will see the Oxc0150002 error and sigrok-cli and/or PulseView will not start.

The root cause for this is that the above download will install the otherwise missing file msvcr100.dll (and possibly others) which is required for running sigrok frontends. The requirement is imposed by python34.dll to be more specific, which we use/need for running protocol decoders.

Please download the respective Microsoft Visual C++ 2010 Redistributable Package and install it, that should fix the issue and allow you to start sigrok-cli and/or PulseView.

My device is not found or usable (USB/driver/firmware/hardware issues)

If a libsigrok frontend such as sigrok-cli or PulseView doesn't seem to find your device, that could have multiple reasons:

  • You need to place the proper firmware and/or FPGA bitstream file(s) for your device (if any) into the respective directory where the frontend expects them. See above for details.
  • You need to install the correct vendor driver and/or use Zadig to assign the WinUSB driver to your device. See above for details.
  • Be careful into which USB port you plug the device. Windows assigns drivers to USB devices based on their serial number, and as a fallback (if the device doesn't have a USB serial number) it assigns drivers per USB port. That means (for example) that if you assigned the WinUSB driver using Zadig while your device was attached to a certain physical USB port, that assignment will not be available when you plug the same device into another USB port! You'll have to do the WinUSB driver assignment again (using Zadig) for that new USB port!
  • For some devices (e.g. FX2-based ones) you might have to assign the WinUSB driver via Zadig twice: the first time for the initial USB VID/PID the device has when attaching it via USB, and a second time after the firmware has been uploaded to the device and the device has "renumerated" with a different VID/PID pair (run PulseView or sigrok-cli --scan to upload the firmware). Because of the different VID/PID pair, Windows will be unable to tell that it's actually the same USB device and only assign WinUSB to the device it saw first.
  • If you use certain inexpensive FX2-based logic analyzers, please do not use the USB cable that they shipped with. Those USB cables seem to be of a consistently very bad quality and cause all kinds of strange issues. Use another USB cable of which you are sure that it is working well.

(FX2 based) logic analyzer terminates acquisition before the specified limit.

Got trouble getting captures with an FX2 based logic analyzer at higher samplerates. Acquisition terminates before the specified amount of samples or time. Logs contain a message that the device "... only sent [a smaller amount of data]".

That's a known constraint of the ubiquitous FX2 chips which are found in many cheap and thus rather popular logic analyzers (and also in some oscilloscopes). The high rates of 24MSa/s for up to 8 logic channels, or 12MSa/s for up to 16 channels, are near the theoretical bandwidth limit of the USB 2.0 connection when communication overhead gets considered. In addition the FX2 chip only has little memory for to-get-transmitted data (covering the fraction of a millisecond). That's why successful communication heavily depends on the PC's capability to process the data which the FX2 chip provides. The slightest hiccup causes a FIFO overflow in the FX2. Lost data cannot get recovered, and it's uncertain which period of acquisition time was affected. So the only remaining option is to terminate the acquisition.

Things to check:

  • Sample data at lower rates when possible.
  • Pick proper cables, those shipped with the cheap devices often are not up to their task.
  • Make sure USB bandwidth for the logic analyzer is not shared with other devices. Ideally put the logic analyzer on a separate port so that nothing else occupies that bus. Avoid USB hubs in that acquisition setup.
  • Disable features which could stall the acquisition. Separate the phase of data acquisition from the phase of processing that data.
  • Reduce the PC's workload during the time of acquisition (if it causes the communication to stall ocassionally).
  • Past reports suggest that some operating systems are said to suffer more often from that issue than others.

How do I see debug output from PulseView on Windows?

Because of the division between console and graphical subsystems in Windows, debugging output is not directly visible in console like it would be on Linux. Instead, in normal Windows builds, debugging output can be seen in PulseView settings window "Logging" tab.

The default log level is 2 (errors only). To capture full debug output, PulseView can be started with option `-l 5`, which is done by the `PulseView (debug)` shortcut created by the installer.

However, if the whole PulseView application crashes, the debug log in settings window disappears also. For these cases you should download the debug build from above. It will open a separate console window that will show log messages.

Building from source

Note: This should generally not be necessary for users, please just use the provided nightly installers (see above).

Get the sigrok-util git repository, which contains instructions as well as scripts to help in the below steps.

Cross-compile using MXE

If you really want to build from source, we recommend you use the sigrok-cross-mingw script from the sigrok-util repository (that uses MXE) to cross-compile the Windows binaries on a Linux system.

Native builds are generally not supported by us! Yes, they can work in theory (see below), but it means a lot of hassle compared to a cross-compile using the above script, and native builds are not really well-tested by us.

Native build using MSYS2

If you do want to build the sigrok subprojects natively on a Windows system (instead of using the cross-compile method, see above) we recommend you use MSYS2. More information is available on the MSYS2 introduction and the MSYS2 installation pages.

Please read our README for details on how to set up MSYS2 in general, how to install the sigrok dependencies, and so on.

Then, use our sigrok-native-msys2 script to build all required software components.

Status:

  • This is still work in progress, not all parts are fully working, tested, or supported yet. Patches welcome!
  • Working: libusb (special branch), libserialport, libsigrok, libsigrokcxx, libsigrokdecode, sigrok-firmware, sigrok-firmware-fx2lafw.
  • NOT yet working: libsigrok Python/Ruby/Java bindings, sigrok-cli, sigrok-cli NSIS installer, PulseView, PulseView NSIS installer.
    • Currently, the main missing parts in MSYS2 are static builds for libzip and Python. Once those are available, we should be able to build all sigrok subprojects natively via MSYS2.

Native build using the old MinGW+MSYS

Not supported by us. Please use one of the methods described above.

Native build using Cygwin

Not supported by us. Please use one of the methods described above.

Native build using Borland/Embarcadero C++ Builder

Not supported by us. Please use one of the methods described above.

Native build using Microsoft Visual Studio

Not supported by us. Please use one of the methods described above.