cancel
Showing results for 
Search instead for 
Did you mean: 

No ST-LINK detected - only in CubeIDE

Thieny
Associate II

Hey guys,

I try to connect a NUCLEO-F429ZI board with STM32CubeIDE.

I have first installed the latest version of the IDE on an Windows 10 machine with the ST-LINK USB drivers that are required. When I know try to run or debug a simple example project the ST-LINK firmware verification opens instantly with the message:

No ST-LINK detected! Please connect ST-LINK and restart the debug session.

When I run the same project with exact the same settings on another Windows 10 machine, everything works fine and the onboard debugger conntects without any problem. So the hardware and jumper setup is correct. And I used the same USB cable.

I've already read the other tasks about this problem, so here comes what differs in my case:

With the ST-LINK Utility software I can connect the target device and flash binaries without any problem.

I have checked the Windows device manager, too: The ST-LINK debug probe instantly appears when I plug in the cable and runs with the dedicated ST driver as required.

I have also tried to reinstall the drivers manually but without any success.

Still the same result: The Board works well with the ST-LINK Utility software but it doesn't with the Cube IDE, nor after reinstallation. The firmware of the ST-LINK is up to date, the firmware-updater of both, the CubeIDE and the Utility Software can connect to the device and setting it into update mode.

I'm sure the issue is with the PC-system side or the IDE installation and nothing with the board's hardware but I'm running out of ideas.

The only thing that's different on the Windows machine where the IDE is not working ist that the Keil MDK is installed with its "own" USB driver instance. Could this cause my problem?

Or is it possible that there is any problem with the path the CubeIDE is serching for the driver? But why does the Utility connect to the device without any problem then?

I have installed all the components in the default directories.

I'm really glad for any suggestion on my issue.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
LaurentL
ST Employee

Ok, in version 1.3, If you check the "STLink shared" checkbox to use STLink Server for debug, can you also see the STLink Serial Number in the debug config window ?

I don't know if people having the usb hub issue could see the STLink SN in v1.3.0 if STLink server was installed.

You can patch the libusb dll in STlink server anyway to try.

Maybe kill stlink server via task manager first.

libusb-1.0.23.7z file to get there : https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/libusb-1.0.23.7z/download

Then, unzip and take the libusb-1.0.23.7z\MinGW32\dll\libusb-1.0.dll file.

Patch it in the C:\Program Files (x86)\STMicroelectronics\stlink_server folder.

If still not working, a few users had issue with usb driver of PC (dell I think).

Rgds,

Laurent

View solution in original post

9 REPLIES 9
LaurentL
ST Employee

Hi,

STM32CubeIde 1.4.0 uses STLinkServer to check STLink version so you need to install STM32CubeIde with installer (not with update) to have STLinkServer installed.

So first, check that STLinkServer is installed.

Then, if you look in other post about this issue, some had a usb hub issue that is fixed using latest libusb version 1.0.23.

You can patch the libusb dll if you tried all usb ports without success.

Rgds,

Laurent

Thieny
Associate II

Thank you for the fast reply.

I installed the STMCubeIDE with the installer executable from the ST website.

There is no choice given in the driver section about weather to install ST-LINK server or not like in the previous version of the IDE installer. Does this mean that the ST-LINK server is also installed since IDE version 1.4? So how exactly can i check if the ST-LINK server is installed and runs properly?

I also tried to install the ST-LINK server manually with the .msi installer in the dedicated download package. Unfortunately without any success. After giving my agreement to execute the installer, nothing happens nothing shows up, and connecting the device still doesn't work.

I now tried to install CubeIDE version 1.3 where i can yet select to install the ST-LINK server and so did I.

In Run/Debug configurations I made the same settings linke in the IDE version 1.4 and chose the ST-LINK (ST-LINK GDB server) as Debug probe and everything works perfectly fine.

So I assume that there is no problem with the USB port/hub.

But why is it still not working with IDE version 1.4?

Thieny
Associate II

Edit:

I checked the Task Manager and the ST Link server is installed and running ...

LaurentL
ST Employee

Ok, in version 1.3, If you check the "STLink shared" checkbox to use STLink Server for debug, can you also see the STLink Serial Number in the debug config window ?

I don't know if people having the usb hub issue could see the STLink SN in v1.3.0 if STLink server was installed.

You can patch the libusb dll in STlink server anyway to try.

Maybe kill stlink server via task manager first.

libusb-1.0.23.7z file to get there : https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/libusb-1.0.23.7z/download

Then, unzip and take the libusb-1.0.23.7z\MinGW32\dll\libusb-1.0.dll file.

Patch it in the C:\Program Files (x86)\STMicroelectronics\stlink_server folder.

If still not working, a few users had issue with usb driver of PC (dell I think).

Rgds,

Laurent

Thieny
Associate II

Indeed the patch oft the libusb dll solved the problem!

Thank you very much for your help!

MJean.3
Associate III

Hi laurent,

I suppose you are french and i wrote a translation underneath

I am new to STM32 and not a specialist of Windows. English is not my natural language. I have bought a STM32F7508-dk board and I can't connect it to my PC. The ST Link Utility gives me an error : No ST Link Detected.

Reading your answers above I could see that there was a ST Link server Process running. It is the first time I can see something of ST Link !

I downloaded the file 'libusb-1.0.23.7z file to get there : https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/libusb-1.0.23.7z/download.

But before going further, I would like to be sure :

Expanding the zip file gives 4 directories : MinGW32, MinGW64, MS32 and MS64. Why did you say to take the one in Mingw32. I thought that Mingw was a sort of Linux emulator. What is to do when you work with W7 64 bits ? The date of the downloaded dll is the same that the one I have.

What does 'patch' means ? Is it a simple copy or is there something more to do ?

Bonjour Laurent,

habitant Grenoble, mon père étant né à Crolles, je me suis dit il faut absolument me mettre au STM32. L'apprentissage en est extrémement compliqué. On a énormément de docs spécialisées dans tous les coins mais rien qui indique la logique générale de tout cela. Avec Keil MDK, j'ai réussi à faire une toute petite application. Mais depuis plus d'une semaine, impossible de connecter le STM32F7508-dk au PC. ST Link Utility me dit : No ST Link detected. J'admire la précision de ce diagnostic ! J'ai posé des questions dans cette communauté mais je n'ai pas eu de réponse efficace.

J'ai lu dans votre réponse ci-dessus une éventuelle solution à mon problème. Mais avant d'aller plus loin, je voudrai être sûr de ne pas créer plus de problèmes qu'actuellement.

Il me semblait que Mingw était un émulateur Linux sous Windows mais peut-être que je me trompe. Vous confirmez que c'est dans le répertoire MinGW32 qu'il faut prendre la DLL même si je travaille avec W7 en 64 bits ?

Cela veut dire quoi 'patcher' ?

Bien cordialement,

J. MAURICE

LaurentL
ST Employee

Hi,

This ticket was for STM32 CubeIde 1.4.0, in 1.5.0 version, if you install via the installer, you will have the new libusb installed directly.

No more need to patch (copy) it.

For STLink utility, it is no more updated and it is preferable to use STM32 Cube Programmer, more up to date.

Check the usb cable is on the right usb port (STLink) on the board (if there are other usb user port).

Check that STLink usb drivers are installed (need admin rights on the PC), they will be installed with STM32CubeIde installer.

Then, when you plug the board to the PC, It should enumerate as a STLink debug probe in device manager.

Rgds,

Laurent

MJean.3
Associate III

Hi Laurent,

it works ! 🙂

Thanks you very much.

I am very busy for now (I teach C to ST people via Teams !) so I'll go further only in few days ...

Jean

I did everything you say here, but it does not enumerate in the device manager