Difference between revisions of "Windows"

From sigrok
Jump to navigation Jump to search
(FIX ALL THE THINGS)
(47 intermediate revisions by 4 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 tables below list 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.


=== Supported ===
'''Downloads:'''
* [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])
* [https://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=release,platform=cross-x86_64-w64-mingw32/lastSuccessfulBuild/artifact/pulseview-NIGHTLY-64bit-static-release-installer.exe pulseview-NIGHTLY-64bit-static-release-installer.exe] ([https://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=debug,platform=cross-x86_64-w64-mingw32/lastSuccessfulBuild/artifact/pulseview-NIGHTLY-64bit-static-debug-installer.exe debug build])
* [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])
* [https://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=release,platform=cross-x86_64-w64-mingw32/lastSuccessfulBuild/artifact/sigrok-cli-NIGHTLY-64bit-static-release-installer.exe sigrok-cli-NIGHTLY-64bit-static-release-installer.exe] ([https://sigrok.org/jenkins/job/sigrok-cross-mingw/buildtype=static,debugtype=debug,platform=cross-x86_64-w64-mingw32/lastSuccessfulBuild/artifact/sigrok-cli-NIGHTLY-64bit-static-debug-installer.exe debug build])


{| border="0" style="font-size: smaller" class="alternategrey sigroktable"
<gallery widths="120px" heights="70px" perrow="5">
|-
File:Sigrok windows installer1.jpg
!Logic analyzer
File:Sigrok windows installer2.jpg
!Windows status
File:Sigrok windows installer3.jpg
|-
File:Sigrok windows installer4.jpg
| [[ASIX SIGMA]]/[[ASIX SIGMA|SIGMA2]]
File:Sigrok windows installer5.jpg
| bgcolor="lime" | Should work fine using libftdi + libusb-0.1-win32 (not runtime-tested yet, though).
</gallery>
|-
| [[ChronoVu LA8]]
| bgcolor="lime" | Works fine using libftdi + libusb-0.1-win32.
|-
| Demo driver
| bgcolor="lime" | Works fine.
|-
| [[IKALOGIC ScanaPLUS]]
| bgcolor="lime" | Works fine using libftdi + libusb-0.1-win32.
|-
| [[ZEROPLUS Logic Cube LAP-C(16032)]]
| bgcolor="lime" | Works fine using libusb-1.0.
|-
| [[ZEROPLUS LAP-16128U ]]
| bgcolor="lime" | Should works fine using libusb-1.0 (not runtime-tested yet, though).
|}


=== Work in progress ===
== Drivers ==


{| border="0" style="font-size: smaller" class="alternategrey sigroktable"
In order to use [[libsigrok]] (via a sigrok frontend) on Windows, you need to install the proper driver for the respective device.  
|-
!Logic analyzer
!Windows status
|-
| [[ARMFLY Mini-Logic ]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Braintechnology USB Interface V2.x]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Braintechnology USB-LPS]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[CWAV USBee SX]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Dangerous Prototypes Buspirate]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[EE Electronics ESLA100]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[IKALOGIC Scanalogic-2]]
| bgcolor="red" | HID-based, we need to use HIDAPI.
|-
| [[Lcsoft Mini Board]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Logic Shrimp]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[MCU123 Saleae Logic clone]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[MCU123 USBee AX Pro clone]]
| bgcolor="lime" | Works fine.
|-
| [[Openbench Logic Sniffer]]
| bgcolor="orange" | Serial port portability fixes required (partially implemented, but unfinished).
|-
| [[Robomotic BugLogic 3]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Robomotic MiniLogic]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Saleae Logic]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Link Instruments MSO-19‎]]
| bgcolor="orange" | Doesn't compile due to libudev dependency. TODO: Make libudev optional.


|- bgcolor="#6699ff"
=== COM/serial/RS232 driver ===
!Mixed-signal oscilloscope
!Windows status
|-
| [[ARMFLY AX-Pro]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[EE Electronics ESLA201A]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[XZL_Studio AX]]
| bgcolor="lime" | Should work fine - please test.


|- bgcolor="#6699ff"
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.
!Oscilloscope
!Windows status
|-
| [[Fluke ScopeMeter 199B]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Hantek DSO-2090]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Rigol DS1052E]]
| bgcolor="orange" | USB connection not supported yet, serial connection partially working.
|-
| [[Rigol DS1102E]]
| bgcolor="orange" | USB connection not supported yet, serial connection partially working.


|- bgcolor="#6699ff"
=== Device specific USB driver ===
!Multimeter
!Windows status
|-
| All serial port based DMMs
| bgcolor="lime" | Should work fine - please test.
|-
| All uni-t-dmm based DMMs
| bgcolor="red" | HID-based, we need to use HIDAPI.
|-
| All victor-dmm based DMMs
| bgcolor="red" | HID-based, we need to use HIDAPI.


|- bgcolor="#6699ff"
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.
!Sound level meter
!Windows status
|-
| [[CEM DT-8852]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Colead SL-5868P]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Kecheng KC-330B]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[Tondaj SL-814]]
| bgcolor="lime" | Should work fine - please test.


|- bgcolor="#6699ff"
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.
!Thermometer
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).
!Windows status
|-
| [[Lascar Electronics EL-USB-2]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[MIC 98581]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[MIC 98583]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[UNI-T UT325]]
| bgcolor="red" | HID-based, we need to use HIDAPI.
|-
| [[Voltcraft K204]]
| bgcolor="lime" | Should work fine - please test.


|- bgcolor="#6699ff"
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.
!Hygrometer
!Windows status
|-
| [[Lascar Electronics EL-USB-2]]
| bgcolor="lime" | Should work fine - please test.
|-
| [[MIC 98583]]
| bgcolor="lime" | Should work fine - please test.


|- bgcolor="#6699ff"
'''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.
!Datalogger
!Windows status
|-
| [[Lascar Electronics EL-USB-CO]]
| bgcolor="lime" | Should work fine - please test.


|}
See also the [https://github.com/pbatard/libwdi/wiki/Zadig Zadig wiki page] for more information.


== Self-extracting installers ==
== Firmware ==


Work in progress. We don't provide pre-built installers for [[sigrok-cli]] and [[PulseView]] right now, but will do so in the near future, when a few issues have been sorted out.
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.


<gallery widths="120px" heights="70px" perrow="5">
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.
File:Sigrok windows installer1.jpg
 
File:Sigrok windows installer2.jpg
'''Example paths on 64bit Pulseview on 64bit Windows 10 (might vary on other systems):'''
File:Sigrok windows installer3.jpg
* C:\Users\''xxxx''\AppData\Local\sigrok-firmware (where ''xxxx'' is your username)
File:Sigrok windows installer4.jpg
* C:\ProgramData\sigrok-firmware
File:Sigrok windows installer5.jpg
* C:\Users\Public\Documents\sigrok-firmware
</gallery>
* C:\Program Files (x86)\sigrok\PulseView\share\sigrok-firmware
 
== Example files ==
 
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]].
 
These files can be used to conveniently test various frontend features and [[protocol decoders]], and so on.
 
== Limitations and TODOs ==
 
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.
 
== FAQ ==
 
=== I cannot start sigrok-cli or PulseView: error Oxc0150002 ===
 
This happens if you don't have the [https://www.microsoft.com/en-us/download/details.aspx?id=5555 Microsoft Visual C++ 2010 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 '''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]].


== Drivers ==
Please download the [https://www.microsoft.com/en-us/download/details.aspx?id=5555 Microsoft Visual C++ 2010 Redistributable Package] and install it, that should fix the issue and allow you to start [[sigrok-cli]] and/or [[PulseView]].


In order to use [[libsigrok]] (via a sigrok frontend) on Windows, you need to install the proper driver for the respective device. The driver shipped with the vendor software is '''not''' going to work in almost all cases.
=== My device is not found or usable (USB/driver/firmware/hardware issues) ===


You can use the latest [http://sourceforge.net/projects/libwdi/files/zadig/ zadig] utility (from the [http://sourceforge.net/projects/libwdi/ libwdi] project) on Windows to install the respective driver. There are two zadig versions, one for Windows XP, and another one for all other supported Windows versions.
If a [[libsigrok]] frontend such as [[sigrok-cli]] or [[PulseView]] doesn't seem to find your device, that could have multiple reasons:


Devices where libsigrok uses libftdi will need the '''libusb-win32''' driver, devices where libsigrok uses libusb-1.0 will need the '''WinUSB''' driver.
* 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!
* 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 ==


See [[Windows/Building]].
'''Note:''' This should generally not be necessary for users, please just use the provided [[Windows#Windows_installers|nightly installers]] (see above).
 
=== Cross-compile using MXE ===
 
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.
 
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 [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.
 
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!
* '''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.
 
=== 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.

Revision as of 01:14, 9 November 2018

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.

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.

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 Microsoft Visual C++ 2010 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 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 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!
  • 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!
  • 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.