Installing ST-Link drivers on Discovery Board

Sysprogs forums Forums VisualGDB Installing ST-Link drivers on Discovery Board

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #28100
    carneytom1981
    Participant

    I am attempting to program a STM32VLDiscovery Board, using Visual Studio 2019, Visual GDB and STM32CubeMX. When I connect the board to the machine, it appears as ‘USB Mass Storage Device’. I am using a Windows 10 VM. The program builds fine, but when I attempt to begin remote board debugging, I get an error message stating:</div>
    <div class=”post-text”>

    USB Mass Storage Device” does not appear to have “ST-Link Driver” driver installed. The debugger may have problems finding your decvice. Try installing it now?

    If I click yes, then a bit of software called UsbDriverTool.exe starts and a progress bar appears with the message

    VisualGDB is installing the following USB driver: ST-Link Driver the following device: USB Mass Storage Device

    This then fails with the message

    Automatic driver installation gailed. Do you want to try installing it manually?

    Clicking ‘yes’ again gets the message

    USB driver installation failed with code -532462766

    And then finally

    open failed (no matching adapter found)

    Can anyone tell me please, how I go about getting the ST-Link driver on to the discovery board so that I can start debugging my code?

    (One other thing that may be relevant. I tried using the STM32 ST-Link Utility program to program the code on to the board. I find that it will only connect to the board if I am holding reset whilst I press the ‘connect’ button.)

    • This topic was modified 4 years, 5 months ago by carneytom1981.
    #28102
    support
    Keymaster

    Hi,

    Please try checking ST-Link in the Windows Device Manager (View->Show Devices by Connection). Does it show the ST-Link Debug driver as shown below? If not, please try installing it manually (the drivers are located inside the ST-Link Tool directory).

    If not, or you are not sure, please attach a screenshot of the Windows Device Manager showing ST-Link in the Devices By Connection mode.

    Attachments:
    You must be logged in to view attached files.
    #28108
    carneytom1981
    Participant

    Hi, Thanks for the response.

    Thanks for the response. The ST-Link debug driver does not appear as shown, but rather, as shown in the attachment, as a single ‘STM32’ nested under a ‘USB Mass Storage Device’.

    I have attempted uninstalling these devices through the device manager and reinstalling with the drivers I downloaded from the ST website but this results in the exact same situation.

    You state that “the drivers are located inside the ST-Link Tool directory” – where exactly is the ST-Link Tool directory?

    • This reply was modified 4 years, 5 months ago by carneytom1981.
    Attachments:
    You must be logged in to view attached files.
    #28114
    support
    Keymaster

    Thanks, it looks like the board has an older version of ST-Link that requires a manual driver installation.

    Please try right-clicking on the “USB Mass Storage Device” and selecting “Update Driver -> Browse my computer -> Let me pick a driver -> Have Disk” and point the driver installation GUI to the ST-Link drivers folder near the ST-Link utility folder. After the correct driver is installed, the device should appear as “STM32 ST-Link”.

    #28117
    carneytom1981
    Participant

    Thanks for your reply, I really appreciate your help with this.

    I tried what you suggested. I pointed the driver installation GUI to

    \\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK_USB_V2_1_Driver

    which contains the files ‘stlink_dbg_winusb.inf’ and ‘stlink_VCP.inf’.

    As soon as I click ‘OK’ in the driver installation GUI I get an error message as follows

    Select Device

    The folder you specified doesn’t contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with windows for x64-based systems

    I have also attempted the same process, using a driver package downloaded from the ST website – en.stsw-link009.zip. But the result is the same.

     

     

    #28118
    support
    Keymaster

    Strange. It looks like your ST-Link might be not supported by the latest drivers from ST (or needing a firmware upgrade). Please try checking if the ST’s Eclipse-based STM32 IDE (that also uses OpenOCD) can debug the board. If not, the only other thing to try would be a different ST-Link (or a different debug probe altogether).

    #28121
    carneytom1981
    Participant

    I seem to have fixed this particular problem. I used Zadig to switch USB driver over to libusb-win32 and it now appears as ST-Link Debug in the device manager.

    #28122
    support
    Keymaster

    Good to know it works. We used to recommend using the libusb-win32 driver with ST-Link previously, but the recent official ST-Link has superseded it, since it’s also based on libusb. It’s hard to say why it didn’t work with this specific ST-Link, but if the generic libusb works, it should be as good as the official ST-Link one.

    #31029
    Alonso_V
    Participant

    Hi, guys. I’ve experienced the same issue, tried all presented here ways to fix it, but nothing helps. After using Zadig board in device manager started looking like this(attached).
    Board I’m using is STM32F407VET6
    Does anybody have any ideas how to fix that?

    Attachments:
    You must be logged in to view attached files.
    #31031
    support
    Keymaster

    Hi,

    This looks like an issue specific to a particular ST board and not to VisualGDB. Please feel free to post it on the ST forum to see if anyone else has encountered it.

    #31033
    Alonso_V
    Participant

    Thanks for reply, will try.

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