stlink-org / stlink

Open source STM32 MCU programming toolset
BSD 3-Clause "New" or "Revised" License
4.33k stars 1.23k forks source link

Inappropriate driver is taken on using v1.3.0 #846

Closed dhineshkumarmcci closed 4 years ago

dhineshkumarmcci commented 4 years ago

On using "st-util" of v1.3.0, we face issue on connecting with GDB tool. We see an inappropriate driver is considered instead of ST-Link driver. The driver information has been viewed using "st-info --serial".

Output: GDB error

warning: while parsing target memory map (at line 1): Can't convert length="0xzx" to an integer

STLink driver issue

C:\stlink\bin>st-info.exe --serial
libusb: info [windows_get_device_list] The following device has no driver: '\\.\
USB#VID_147E&PID_2016#6&32FEB3AB&0&3'
libusb: info [windows_get_device_list] libusb will not be able to access it.
493f72063f7853533956193f

Attached the screenshot of driver highlighted with red rectangle.

Later we cloned the source of v1.5.1 and build them, the st-util here works as expected and proper driver is seen.

Thank you, Dhinesh

Nightwalker-87 commented 4 years ago

Let me finally address this issue with a comprehensive solution:

1) GDB error: This is a bug in the stlink toolset when using the MinGW development toolset. It has been fixed in PR #578. 2) Driver issue: A short web search reveals that this seems to be a common driver issue on windows where \Driver\WUDFRd fails to load. As the cited error also appears with several other usb devices, it is obviously not related to the stlink toolset. Should it be related to libusb, this bug may have been fixed in a later version of this external library:

Hence this topic is now fully resolved, I am closing this issue now.