book icon indicating copy to clipboard operation
book copied to clipboard

OpenOCD does not work on USB3.0 ports on Windows

Open hlavaatch opened this issue 6 years ago • 5 comments
trafficstars

I had a hard time trying to follow the hardware setup chapter on Windows 10.

OpenOCD would just not see the STM32F3DISCOVERY board even though it shows up fine on device manager and works fine with the ST software.

It turns out USB 3.0 capable ports do not work with OpenOCD, it fails with "Error: open failed".

Please add a note in the book to use USB 2.0 USB port (which works) as a workaround until the issue with OpenOCD is (hopefully) resolved.

hlavaatch avatar Aug 10 '19 11:08 hlavaatch

Can you add issue link here?

burrbull avatar Aug 10 '19 16:08 burrbull

I don't have a proper issue link, OpenOCD guys don't take this seriously ;( There are several reports of this in their bug database over the years, and they don't care... It may do with them using prehistoric version of libusb and not willing to update.

I will post a link if I pursue this in the future, meanwhile I'm more interested in writing embedded Rust than fixing openocd, obviously :)

hlavaatch avatar Aug 12 '19 22:08 hlavaatch

Here is one https://sourceforge.net/p/openocd/tickets/249/

hlavaatch avatar Aug 22 '19 12:08 hlavaatch

I just hit this today :(

steveklabnik avatar Jun 22 '20 22:06 steveklabnik

ooof, frustrating, and definitely something we should note or perhaps, move away from OpenOCD for this section.

As other alternatives, for ST boards (and the STM32F3DISCOVERY) you may also be able to use stlink-org/stlink or the official ST utils to interact with the existing debugger firmware or flash the debugger with jlink firmware and use the JLink tools, either of which should be usable without OpenOCD. There's a little more information about other approaches here

ryankurte avatar Jun 23 '20 02:06 ryankurte

I am happy to report that the latest version of openocd I got from https://xpack.github.io/blog/2023/01/30/openocd-v0-12-0-1-released/ seems to be working fine with USB3 port on Windows 11! I guess this issue can be closed now

hlavaatch avatar Aug 11 '23 20:08 hlavaatch