OpenOCD error with ST-Link V2

Sysprogs forums Forums VisualGDB OpenOCD error with ST-Link V2

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #877
    tekati
    Participant

    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.

    #3307
    darksilence
    Participant

    I 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… =(

    #3308
    support
    Keymaster

    Hi,

    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?

    #3309
    darksilence
    Participant

    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
    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 👿

    #3302
    support
    Keymaster

    Hi,

    LIBUSB_ERROR_ACCESS looks like a permission problem. Does running Visual Studio as Administrator help?

    #3303
    darksilence
    Participant

    with 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’

    #3304
    support
    Keymaster

    Hi,

    Do you see the same behavior if you select the “LibUSB-WinUSB” driver via the Driver Tool?

    #3305
    darksilence
    Participant

    But it is lib-win driver

    #3306
    support
    Keymaster

    Hi,

    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?

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.