Sysprogs forums › Forums › VisualGDB › OpenOCD error with ST-Link V2
- This topic has 8 replies, 3 voices, and was last updated 10 years, 4 months ago by darksilence.
-
AuthorPosts
-
July 26, 2014 at 22:23 #877tekatiParticipant
I am getting an error setting up OpenOCD with my STM32F4Discovery board. I am pretty sure it has to do with the WinUSB drivers. I can install the STLink utility from STM and it works until I install the WinUSB drivers when trying to setup the settings for VisualGDB in Visual Studio. Once that installs the WinUSB drivers and it fails I can no longer use the STLink Utility until I uninstall the WinUSB drivers.
When I hit the detect button it does find the STLink-V2. But once it prompts to install the WinUSB drivers this is the error I get.
July 30, 2014 at 15:32 #3307darksilenceParticipantI have the same, since I upgraded Debug Package. So I started to use SEGGER J-Link. It’s very annoying …
I tryed to find previous version of OpenOcd, but I failed… =(July 30, 2014 at 22:19 #3308supportKeymasterHi,
Can you try starting the Driver tool (select ‘manual mode’ in OpenOCD settings) and trying to manually install the WinUSB-LibUSB driver for the ST-Link device?
July 31, 2014 at 08:22 #3309darksilenceParticipantC:Usersv.maslovAppDataLocalVisualGDBEmbeddedDebugPackagescom.sysprogs.arm.openocdbinopenocd.exe -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c “reset init”
Open On-Chip Debugger 0.8.0 (2014-05-02-12:11)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn’t support configurable speed
Warn : libusb_open() failed with LIBUSB_ERROR_ACCESS. Skipping…
Error: open failed
in procedure ‘transport’
in procedure ‘init’but it works! Test is failed, but at least I can work with it.
Just every time it download program to FALSH, no metter what, even if did’n change anything 👿August 3, 2014 at 16:51 #3302supportKeymasterHi,
LIBUSB_ERROR_ACCESS looks like a permission problem. Does running Visual Studio as Administrator help?
August 4, 2014 at 12:39 #3303darksilenceParticipantwith Admin mode
C:Usersv.maslovAppDataLocalVisualGDBEmbeddedDebugPackagescom.sysprogs.arm.openocdbinopenocd.exe -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c “reset init”
Open On-Chip Debugger 0.8.0 (2014-05-02-12:11)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn’t support configurable speed
Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.256021
Error: init mode failed
in procedure ‘transport’
in procedure ‘init’August 5, 2014 at 03:04 #3304supportKeymasterHi,
Do you see the same behavior if you select the “LibUSB-WinUSB” driver via the Driver Tool?
August 5, 2014 at 15:14 #3305darksilenceParticipantBut it is lib-win driver
August 7, 2014 at 19:05 #3306supportKeymasterHi,
The “init mode failed” message is shown by OpenOCD when it has opened a handle to the ST-Link device, but the device refused the initialization command. This can be an indication of an old firmware used on your ST-Link. Can you try updating the firmware using the ST firmware update tool? If this does not help, please share the current state of the problem:
Does the settings testing always fail or just sometimes?
Does debugging work (always/sometimes/never)?
What exact problems are you experiencing with FLASH loading? -
AuthorPosts
- You must be logged in to reply to this topic.