3
\$\begingroup\$

Using the STM32CubeIDE with an STM32F3DISCOVERY board I was able to use the Run menu option to download and start running a program. After a Windows Update which involved updating USB drivers, the Run command no longer works.

After updating my Dell Windows 10 Desktop PC, I am now seeing a popup dialog that says "No ST-LINK detected! Please connect ST-LINK and restart the debug session." The update included two USB device drivers which I'm pretty sure were named (1) Alcor Micro and (2) ASMedia. I do have a card reader installed in this PC.

How can I get back to being able to use the STMCubeIDE to download and run and debug my STM32F3DISCOVERY programs?

ST resources

ST-LINK, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 USB driver signed for Windows7, Windows8, Windows10. Perhaps just using this driver will correct the problem?

AN4989 Application note: STM32 microcontroller debug toolbox

UM2576 User manual: STM32CubeIDE ST-LINK GDB server which describes in Appendix B a configuration file for starting the ST-LINK GDB server. The GDB Server start-up options are described in section 1.1 on page 2.

Research into the problem

After reading the answers to the posted question stm32 - is there a factory reset? I downloaded and installed STM32CubeProgrammer.

I can modify and build my application using STM32CubeIDE however in order to run it, I have to program the STM32F3DISCOVERY board using STM32CubeProgrammer and use the Erasing & Programming tool to download the .elf file that resulted from the build. In the past I was able to do everything in STM32CubeIDE.

screen shot of STM32CubeProgrammer download screen

Looking in Device Manager it looks like the ST-LINK device description has changed.

From what I remember it was some kind of a mass storage device and now it is a Serial port. It looks like I have an "Unknown device" which is new.

screen shot of Device Manager UI

Additional info

When I right click on the "Unknown device" entry and select "Update driver" I see a list of Common hardware types after I click first "Browse my computer for drivers" and then "Let me pick from a list of available drivers on my computer".

If I scroll down the list to "Universal Serial Bus devices" I see an entry for STMicroelectronics which looks like this:

list of device drivers for STMicroelectronics

\$\endgroup\$
4
  • \$\begingroup\$ Check the launch profiles in stm32cubeide, you can choose which programmer to use there. \$\endgroup\$
    – Jeroen3
    Commented Oct 18, 2021 at 6:39
  • \$\begingroup\$ @Jeroen3 It's not just the programmer part that I'm concerned about as I can just use the STM32CubeProgrammer for that. It's having the ability to use the STM32CubeIDE and its Debugger to test and develop programs and being able to use the Debugger to step through code, examine variables, etc. \$\endgroup\$ Commented Oct 18, 2021 at 22:22
  • \$\begingroup\$ Yes, you can choose what to use in the profiles. i.imgur.com/JQUO4eg.png \$\endgroup\$
    – Jeroen3
    Commented Oct 19, 2021 at 5:43
  • \$\begingroup\$ if you are using the linux/ubuntu just type cmnd in terminal: sudo apt install stlink-tools \$\endgroup\$ Commented Aug 22, 2023 at 12:12

1 Answer 1

2
\$\begingroup\$

Finally I have got a solution. Hope this will be helpful for you as well..

I have also encountered the same No st-link detected issue. I have tried installing older versions of cube ide, updating drivers, updating firmware etc. but didn't succeed by anything.

Then I have replaced the libusb-1.0.dll in the stlink server directory. The first time it didn't work. But I kept trying different versions of the libusb-1.0.dll file and finally the issue got solved after installing the latest version of the dll file..

Follow these instructions mentioned by Elope 2 in this forum :

https://community.st.com/s/question/0D53W00000nbFQUSA2/no-stlink-detected-stm32cubeide-161-win7-solvedcubeprogrammer-can-see-and-program-the-board-fine-cubeide-wont-see-the-stlink-probe?t=1641458767545

I went out and downloaded the latest libusb 1.0.24 from https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.7z/download and copied the libusb-1.0.dll from the MinGW32\dll folder into the st-link-server folder "C:\Program Files (x86)\STMicroelectronics\stlink_server", kill the stlinkserver.exe process in task manager, and that did the trick!

Here is the link for the latest version of the dll files as of 6th Jan 2022.: https://webwerks.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.24/libusb-1.0.24.7z

Depending on your computer settings the required file may differ. If you are not sure about how to decide the correct file, just keep trying every dll file one by one.

I hope that this will be helpful. There is always a solution for anything. Just don't give up and keep trying again and again.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.