Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

build against libusb 1.0 with usbdk support? #39

Closed
akohlsmith opened this issue Apr 16, 2019 · 10 comments
Closed

build against libusb 1.0 with usbdk support? #39

akohlsmith opened this issue Apr 16, 2019 · 10 comments
Assignees

Comments

@akohlsmith
Copy link
Contributor

The binaries work great as long as you are using devices with the winusb/libusb driver installed against them; for some devices (such as FTDI devices) you can use Zadig to switch over to the winusb driver, but then anything that is using that FTDI device with the native drivers will no longer work.

It looks like libusb 1.0.21 and later support usbdk, which brings some sanity to the Windows world of USB; with usbdk support, libusb can request that Windows detach the driver so that it can be used with libusb directly, neatly solving the issue.

Is there any possibility of a binary build of openocd linked against libusb 1.0.21+ so we can take advantage of this ability?

@ilg-ul
Copy link
Contributor

ilg-ul commented Apr 16, 2019

I don't know if the OpenOCD configure script supports it.

Is there any OpenOCD binary for Windows that uses this library? Could you try building OpenOCD from sources and, if it works, share the configuration?

@ilg-ul ilg-ul self-assigned this Apr 16, 2019
@ilg-ul
Copy link
Contributor

ilg-ul commented Apr 16, 2019

I'm a bit confused by libusb distributions. For now I'm using the one from SourceForge (the next release planned soon uses https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.22/).

However I also noticed https://github.com/libusb/libusb, which seems more recent.

Do you know the differences? Which one do you recommend, considering the distribution should include binaries for all platforms?

@ilg-ul
Copy link
Contributor

ilg-ul commented Apr 16, 2019

Arch Linux also uses the SourceForge library for the mingw libusb package:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mingw-w64-libusb

@ilg-ul
Copy link
Contributor

ilg-ul commented Apr 22, 2019

Could you try the 0.10.0-12 pre-release and confirm if the new libusb fixes the problem?

@akohlsmith
Copy link
Contributor Author

Thank you I will check this ASAP; that was incredibly fast, thank you!

@ilg-ul
Copy link
Contributor

ilg-ul commented Apr 29, 2019

I just released 0.10.0-12, with the latest upstream master.

Please check if the problem was solved. If not, reopen the ticket.

@ilg-ul ilg-ul closed this as completed Apr 29, 2019
@ilg-ul
Copy link
Contributor

ilg-ul commented May 24, 2019

Any update?

@ivankravets
Copy link

We received some reports that openOCD has stopped to work with ST-Link probe on Windows. The previous version works without any issues. Is this problem linked with this issue?

@ilg-ul
Copy link
Contributor

ilg-ul commented May 24, 2019

my test include a debug session with ST-Link with a STM32F4DISCOVERY, and in my setup it was ok.

can you be more specific? also please note that I do not know the details of the windows usb drivers.

@ivankravets
Copy link

can you be more specific?

I will try to get more details from a user.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants