Sysprogs forums › Forums › VisualGDB › Segger J-Link: No emulators connected via USB after configuring for OpenOCD
Tagged: J-Link, JTAG, Segger, USB Drivers, visualgdb
- This topic has 3 replies, 2 voices, and was last updated 7 years, 9 months ago by support.
-
AuthorPosts
-
March 19, 2017 at 19:43 #10713gojimmypiParticipant
I recently discovered that after using VisualGDB to connect to my STM32 – that none of the Segger utilities worked any more. Just a message: “No emulators connected via USB” (despite other software seeing the J-Link)
Upon testing OpenOCD in Visual Studio w/VisualGDB, this message will pop up, wanting to change the USB drivers:
:
Once changed, none of the Segger J-Link utilities will work any more (not a surprise). Making it work again? Not so easy.
I’ve posted some information on my experience and detailed instructions on how I fixed it:
http://gojimmypi.blogspot.com/2017/03/Segger-J-Link-STM32-with-VisualGDB.html
In short: delete Segger USB and software from control panel, re-install fresh, then manually update USB drivers with the code in your install directory, in my case:
<span style=”font-family: ‘courier new’ , ‘courier’ , monospace;”>C:\PROGRAM FILES (X86)\SEGGER\JLINK_V614B\USBDRIVER\</span>
I am cross posting this to both the st.com and sysprogs.com forums in the hopes that both companies will contact each other and come up with a more graceful solution to switching between tools.
March 19, 2017 at 22:09 #10715supportKeymasterHi,
This is a known limitation. OpenOCD requires the WinUSB-based driver, while Segger J-Link software uses their own proprietary driver.
This can be fixed permanently if Segger either shares their driver specification with the OpenOCD community (and someone adds support for this to OpenOCD), or J-Link software itself is modified to recognize the WinUSB driver. Both options are fairly complex, so we would not expect either of them to become available in the near future.
That said, you can switch the driver back very easily. Simply run UsbDriverTool by clicking the corresponding link in OpenOCD Settings -> Manual mode, right-click on Segger J-Link and select “restore default driver”.
March 20, 2017 at 21:26 #10724gojimmypiParticipantAha! Thanks for that information. I did not know you folks even had such a tool. Apparently it is a separate download / install from the VisualGDB add-in:
http://visualgdb.com/UsbDriverTool/
As a feature request, perhaps you could put that information in the “Try installing it now?” dialog box. Having instructions on how to then roll back after the drivers are changed would be really helpful. (and in my case, would have saved hours of frustration trying to get the Segger utilities working again)
Additionally, just for completeness of this topic and the benefit of other that may come looking: the folks at Segger pointed out to me that there’s yet another cool Sysprogs Tutorial that uses the Segger GDB Server rather than needing to change the OpenOCD USB drivers:
https://visualgdb.com/tutorials/arm/stm32/
This is not just an STM32 device tutorial… as it also shows using the J-Link JTAG as a debug method rather than OpenOCD (see steps 9 and 10) thus no need to change the drivers for OpenOCD.
I had instead used this tutorial when first taking my J-Link for a test drive:
https://visualgdb.com/tutorials/arm/st-link/
It is unfortunate that so much really great information is somewhat “lost” in the tutorials. I would have never thought to look at that STM32 tutorial for alternate debug methods. Are there any plans for a wiki or other “all you ever wanted to know about VisualGDB” documentation? (or where: perhaps I’ve simply not found it)
In any case I added a supplementatory blog page on this topic:
http://gojimmypi.blogspot.com/2017/03/more-on-segger-j-link-and-visualgdb.html
Hopefully that might help others that encounter a similar problem. 🙂
Thanks again for your reply.
March 21, 2017 at 04:43 #10727supportKeymasterHi,
The UsbDriverTool is actually included in our OpenOCD package and can be launched using the “Start driver tool” link shown if you switch OpenOCD to custom mode.
Regarding the documentation, we usually try to organize it in the format of tutorials, but if you believe a user-edited wiki could be more helpful, we could certainly host it.
-
AuthorPosts
- You must be logged in to reply to this topic.