Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
(7 intermediate revisions by the same user not shown)
Line 6: Line 6:


'''Downloads:'''
'''Downloads:'''
* [http://sigrok.org/jenkins/job/sigrok-cross-mingw/default/lastSuccessfulBuild/artifact/pulseview-NIGHTLY-installer.exe pulseview-NIGHTLY-installer.exe]
* [http://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=release,platform=cross-i686-w64-mingw32/lastSuccessfulBuild/artifact/pulseview-NIGHTLY-32bit-static-release-installer.exe pulseview-NIGHTLY-32bit-static-release-installer.exe] ([http://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=debug,platform=cross-i686-w64-mingw32/lastSuccessfulBuild/artifact/pulseview-NIGHTLY-32bit-static-debug-installer.exe debug build])
* [http://sigrok.org/jenkins/job/sigrok-cross-mingw/default/lastSuccessfulBuild/artifact/sigrok-cli-NIGHTLY-installer.exe sigrok-cli-NIGHTLY-installer.exe]
* [http://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=release,platform=cross-i686-w64-mingw32/lastSuccessfulBuild/artifact/sigrok-cli-NIGHTLY-32bit-static-release-installer.exe sigrok-cli-NIGHTLY-32bit-static-release-installer.exe] ([http://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=debug,platform=cross-i686-w64-mingw32/lastSuccessfulBuild/artifact/sigrok-cli-NIGHTLY-32bit-static-debug-installer.exe debug build])


<gallery widths="120px" heights="70px" perrow="5">
<gallery widths="120px" heights="70px" perrow="5">
Line 30: Line 30:


For installing the '''WinUSB''' driver you can use the [http://zadig.akeo.ie/ Zadig] executable from the [https://github.com/pbatard/libwdi/wiki libwdi] project. 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.
For installing the '''WinUSB''' driver you can use the [http://zadig.akeo.ie/ Zadig] executable from the [https://github.com/pbatard/libwdi/wiki libwdi] project. 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 (they're located in the installation directory of the respective application).
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.
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.
Line 57: Line 57:
!Windows status
!Windows status


|-
| fx2lafw
| bgcolor="orange" | There seems to be some issue causing frontend hangs ([http://sigrok.org/bugzilla/show_bug.cgi?id=343 bug #343]). Needs to be investigated (could be a libsigrok driver issue, or libusb issue, or USB/thread code issue, or something entirely different).
|-
|-
| openbench-logic-sniffer
| openbench-logic-sniffer
| bgcolor="orange" | The OLS (and other compatible devices such as Buspirate) only work once in [[PulseView]], subsequent acquisitions fail ([http://sigrok.org/bugzilla/show_bug.cgi?id=563 bug #563]).
| bgcolor="orange" | The OLS (and other compatible devices such as Buspirate) only work once in [[PulseView]] or [[sigrok-cli]] (sometimes not at all), subsequent acquisitions fail ([http://sigrok.org/bugzilla/show_bug.cgi?id=638 bug #638]).
|-
| serial port code
| bgcolor="orange" | There may be an issue still in the serial port handling on Windows ([http://sigrok.org/bugzilla/show_bug.cgi?id=341 bug #341]). Needs to be investigated.
|-
| sysclk-lwla
| bgcolor="orange" | Acquisition "hangs" on Windows ([http://sigrok.org/bugzilla/show_bug.cgi?id=328 bug #328]). May or may not be related to (or have the same cause as) [http://sigrok.org/bugzilla/show_bug.cgi?id=343 bug #343].


|}
|}
See [http://sigrok.org/bugzilla/buglist.cgi?query_format=advanced&resolution=---&op_sys=Windows&list_id=2400 the current list of Windows issues] in Bugzilla for the full list.


== FAQ ==
== FAQ ==
Line 89: Line 82:
* 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.
* 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!
* 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!
* If you use certain inexpensive FX2-based logic analyzers, please do '''not''' use the USB cable that they shipped with. Those USB cables seems 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.
* 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.


== Building from source ==
== Building from source ==
Line 105: Line 98:
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://sourceforge.net/projects/msys2/ MSYS2]. More information is available on the [http://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/ MSYS2 introduction] and the [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2 installation] pages.
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://sourceforge.net/projects/msys2/ MSYS2]. More information is available on the [http://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/ MSYS2 introduction] and the [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2 installation] pages.


After you've run the [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2 installer] (use '''msys2-x86_64-*.exe'''. i.e. the 64bit MSYS2) you can install the [[Building#Build_requirements|sigrok requirements]] like this:
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.
 
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.
 
'''Status''':
* This is still work in progress, not all parts are fully working, tested, or supported yet. Patches welcome!
* MSYS2 currently doesn't ship with all packages we want. E.g. the following are missing: autoconf-archive, libftdi1, librevisa, SWIG >= 3.0.8.
* '''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.
 
=== 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 ===


$ '''pacman -Sy'''
Not supported by us. Please use one of the methods described above.
$ '''pacman -S git autoconf automake libtool make pkg-config wget patch mingw-w64-i686-toolchain \'''
  '''mingw-w64-i686-glib2 mingw-w64-i686-glibmm mingw-w64-i686-libusb mingw-w64-i686-check mingw-w64-i686-boost \'''
  '''mingw-w64-i686-libzip mingw-w64-i686-doxygen mingw-w64-i686-python3 mingw-w64-i686-python3-numpy \'''
  '''mingw-w64-i686-python3-gobject mingw-w64-i686-python3-setuptools mingw-w64-i686-swig mingw-w64-i686-qt4 mingw-w64-i686-cmake'''


Afterwards, you can open a new '''MSYS2 MinGW32''' shell (do '''not''' use the '''MSYS Shell''', that won't work as expected!) and build the sigrok subprojects pretty much like on any [[Linux]] system.
=== Native build using Microsoft Visual Studio ===


'''TODO''':
Not supported by us. Please use one of the methods described above.
* This is still work in progress, not all parts are fully working, tested, or supported yet!
* MSYS2 currently doesn't ship with all packages we want. E.g. the following are missing: autoconf-archive, libftdi1, librevisa.
* There may be a few bugs that need to be fixed in sigrok subprojects first. Examples: [http://sigrok.org/bugzilla/show_bug.cgi?id=553 bug #533].

Revision as of 01:08, 7 September 2016

PulseView on Windows

Windows installers

We provide nightly Windows installers for sigrok-cli and PulseView. Please test and report any issues you encounter.

Downloads:

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 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.

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 from the libwdi project. 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.

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 the firmware subfolder of the respective installation directory of sigrok-cli or Pulseview, e.g. C:\Program Files\sigrok\sigrok-cli\firmware or C:\Program Files\sigrok\PulseView\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

The table below lists some of the known remaining issues.

Driver/component Windows status
openbench-logic-sniffer The OLS (and other compatible devices such as Buspirate) only work once in PulseView or sigrok-cli (sometimes not at all), subsequent acquisitions fail (bug #638).

See the current list of Windows issues in Bugzilla for the full list.

FAQ

I cannot start sigrok-cli or PulseView: error Oxc0150002

This happens if you don't have the Microsoft Visual C++ 2008 Redistributable Package 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 msvcr90.dll (and possibly others) which is required for running sigrok frontends. The requirement is imposed by python32.dll to be more specific, which we use/need for running protocol decoders.

Please download the Microsoft Visual C++ 2008 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!
  • 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.

Building from source

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

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!
  • MSYS2 currently doesn't ship with all packages we want. E.g. the following are missing: autoconf-archive, libftdi1, librevisa, SWIG >= 3.0.8.
  • 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.

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.