Resolving the libusb issues with OpenOCD

This page explains how to resolve various libusb-related issues with the OpenOCD tool.

Libusb-related errors typically result in one of the following messages shown by OpenOCD:

Error: libusb_get_device_list() failed with LIBUSB_ERROR_NO_DEVICE

or

Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: open failed

The most common cause for this error is the missing USB driver for the debug probe. To troubleshoot it, please follow the steps below:

  1. Ensure that the USB debugger is connected and appears in Windows Device Manager.
  2. Ensure that the Windows Device Manager doesn't show any errors (e.g. about missing/incomplete drivers) for the device.
  3. Ensure that the USB debugger isn't captured by a USB virtualization tool (e.g. VMWare) or a USB-to-Network tool.
  4. Try reinstalling the USB drivers for the USB debugger. VisualGDB can normally verify/repair the drivers automatically if you are using the "USB Devices" view on the Debug Settings page of VisualGDB Project Properties instead of the "Debug Methods" view.
  5. Try using a different USB controller (e.g. some USB 3.0 controller drivers might be incompatible with Libusb, so plugging the same device into a USB 2.0 controller will resolve the issue).
  6. Try using a different computer.

If nothing helps, the USB debug probe might be malfunctioning. To verify this, try using it with another software (e.g. ST-Link tool). If the other software doesn't work either, consider getting a new USB probe.