Sysprogs forums › Forums › VisualGDB › Installing ST-Link drivers on Discovery Board
- This topic has 10 replies, 3 voices, and was last updated 3 years, 3 months ago by Alonso_V.
-
AuthorPosts
-
May 11, 2020 at 15:00 #28100carneytom1981Participant
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.
May 11, 2020 at 20:06 #28102supportKeymasterHi,
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.May 12, 2020 at 08:39 #28108carneytom1981ParticipantHi, 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.May 12, 2020 at 16:15 #28114supportKeymasterThanks, 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”.
May 13, 2020 at 14:42 #28117carneytom1981ParticipantThanks 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.
May 13, 2020 at 16:01 #28118supportKeymasterStrange. 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).
May 13, 2020 at 17:26 #28121carneytom1981ParticipantI 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.
May 13, 2020 at 17:31 #28122supportKeymasterGood 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.
August 1, 2021 at 05:57 #31029Alonso_VParticipantHi, 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.August 1, 2021 at 08:18 #31031supportKeymasterHi,
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.
August 1, 2021 at 10:34 #31033Alonso_VParticipantThanks for reply, will try.
-
AuthorPosts
- You must be logged in to reply to this topic.