cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE does not see any of my programmers. Programmer serial number - F.

ASeli.2
Associate II

Hello!

Three of my programmers ST-LINL V2 don't work in STM32CubeIDE! Everything used to be great, I was flashing my boards, doing debugging, but now some nonsense is happening (version of my IDE is 1.8.0). For debugging, I use the interface SWD, and the connection is exactly the same as before. But the most interesting thing is that the program does not see the serial number of the programmer, although everything was fine before. Now I will attach some screenshots.

0693W00000KakDwQAJ.png0693W00000KakB9QAJ.pngAs you can see, the program considers that my programmer (all three!) have a serial number - F. I absolutely do not understand how this is possible. Programmer firmware update did not work. Fun fact: when the program enters the DFU mode when working with the firmware utility, it sees its correct serial number, but I do not know how to get this number to be displayed in Cube IDE.

Please share your experience of solving the problem if anyone has come across it. Peace for everyone.

6 REPLIES 6
Pavel A.
Evangelist III

Have you recently updated from v 1.7.0 or 1.7.1?

Yes, I guess it is. The very first version I started working with is 1.5.1. Since then, I have updated to every new version, among which was 1.7.1. Sorry for duplication of my answer.

Pavel A.
Evangelist III

Users report problems in the debugger in v. 1.8. Try to go back to 1.7.1.

mattias norlander
ST Employee

If you click scan and use the drop-down menu, are you sure that you cannot see a bunch of ST-LINK serial numbers in the populated list?

Can you try to only rely on ST-LINK GDB server to return the ST-LINK serial number?

You can do this by:

cd C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin
ST-LINK_gdbserver.exe -q -cp C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin

Performing this first test will allow us to see if there is an error in ST-LINK GDB server or somewhere in Eclipse... This will probably return the correct number.

You can take this number manually and paste it into the debug config if you want to quickly fix your issue.

But from our point of view it would be interesting to narrow this down a bit further...

Can you provide us with a log-file from ST-LINK server ("ST-LINK server" is not the same thing as "ST-LINK GDB server")?

ST-LINK server log can be obtained by running ST-LINK server from command-line by:

cd "C:\Program Files (x86)\STMicroelectronics\stlink_server"
stlinkserver.exe -d 5 -l c:\Users\blabla\blabla\stlinkserver.log

Kind regards, Mattias

Hello Mattias!

I will answer in order.

1. In the drop-down list you are talking about, in addition to the number of the working programmer (I borrowed an isolated programmer from a friend, and it works correctly), there is also a "number" F, but it only appears when I connect a faulty device.

2. I tried to execute the commands you indicated on the command line (however, my paths are slightly different from those you gave), and I got the results that you can see in the screenshot. I can say that it did not bring success.

0693W00000Kb6m5QAB.png3. I connected a non-working programmer to the board, performed a debug attempt, and then created a log using the command you specified. I'm attaching the log to my answer.

4. I tried to cheat a little. I ran the firmware update utility of the programmer, and there I spied on its real serial number, after which I tried to enter the debug mode of my board. This is the message I received:

0693W00000Kb6pTQAR.pngTo be honest, I have no idea what to do, but I want to thank you for your advice.

mattias norlander
ST Employee

Hi,

Did you ever solve this one?

In the debug configuration of CubeIDE is "Shared ST-LINK" enabled or disabled?

  • When enabled the ST-LINK serial number is provided: ST-LINK server > ST-LINK GDB-server > CubeIDE.
  • When disabled the ST-LINK serial number is provided: ST-LINK GDB-server > CubeIDE.

Two different tools doing the same thing but different implementations.

If the "Shared ST-LINK" is disabled, then enable it to see if this works better? Or try the vice versa.

Do you have another computer to try this specific ST-LINK with?

Another thing to test is:

Open to command line windows. In the first window launch ST-LINK server and allow it to log:

cd "C:\Program Files (x86)\STMicroelectronics\stlink_server"
stlinkserver.exe -d 5 -l c:\Users\blabla\blabla\stlinkserver.log

In the second window let ST-LINK GDB server connect to target via the ST-LINK server to ask for the ST-LINK serial number by:

cd C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin
 
ST-LINK_gdbserver.exe -q -t -cp C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin

-q parameter lets ST-LINK GDB-server retrieve the serial number

-t parameter makes sure that the serial number is fetched by ST-LINK server.

You could also use WireShark to analyze the network traffic on tcp port 7184 while running the ST-LINK GDB server -q -t command.