cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE 1.16.0 and STlink v3 - cannot find debugger

PHolt.1
Senior III

This sort of thing is a way of life with these ST tools (been using Cube IDE for 6 years on this project) but this one I am unable to fix. Is there some special setting needed under Debug (under project/properties)?

 

PHolt1_0-1721987017824.png

 

 

STMicroelectronics ST-LINK GDB server. Version 7.8.0

Copyright (c) 2024, STMicroelectronics. All rights reserved.

 

Starting server with the following options:

Persistent Mode : Disabled

Logging Level : 1

Listen Port Number : 61234

Status Refresh Delay : 15s

Verbose Mode : Disabled

SWD Debug : Enabled

 

ST-LINK device status: UNKNOWN

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

Encountered Error when opening C:\ST\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Shutting down...

Exit.

 

PHolt1_1-1721987204042.png

I've tried 2 x STLINK ISOL V3 and a STLINK ISOL v2. No success.

28 REPLIES 28

CubeProgrammer API is installed with CubeProgrammer (not CubeIDE).

However, as you've mentioned dependencies - it requires runtime DLLs of Qt,  encumbered by unclear licensing terms. 

PHolt.1
Senior III

Next time I find problems with the debugger I will try one of the old utilities to narrow it down.

However whenever I have an issue, it is fixed by

- unplugging and replugging the STLINK (V3 ISOL usually) USB cable (this is the most common fix)

- exiting and restarting Cube IDE

- in very rare cases, rebooting Windows

The above don't look like a cable issue!

But in the grand scheme of things these things do work. That EEVBLOG thread I posted shows that the "obvious" STLINK V3 ISOL cable (the 10-way one) does not work, but an adaptor from OLIMEX (Ebay, since they don't sell to the UK below €200) from the 25W conn to the 10W conn does work. I spent ages on discovering that.

Re running some jar file, I have no interest in that when I have work to do :) This is a joke:

PHolt1_0-1725818556169.png

 

 

The CLI version of CubeProgrammer is bundled with CubeIDE:

C:\ST\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\STM32_Programmer_CLI.exe

 

But not the GUI version (I did make a mistake there. I was thinking of the CubeMX GUI that comes bundled with CubeIDE. That GUI can be launched via jars).

 

@PHolt.1 

I expect CubeProgrammer_API is a dll/assembly used by the GUI. You can find threads addressing this error on the forum. Try running the CubeProgrammer GUI as an administrator.

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.
BarryWhit
Lead II

> However whenever I have an issue, it is fixed by

> - unplugging and replugging the STLINK (V3 ISOL usually) USB cable (this is the most common fix)

> [...]

>The above don't look like a cable issue!

 

???

Actually, I said motherboard/USB port/USB cable, and it does kinda look like these could be the issue. If you have unreliable electrical contacts then every time you touch the cable or the STLINK and move it slightly, you could be perturbing the electrical contacts slightly. This could explain why you're seeing intermittent errors.  

 

I found the CLI exe by searching for "Programmer" through the entire ST directory. all 18,000 files of it. It took about 20 seconds.

 

Best of luck to you. 

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.
PHolt.1
Senior III

Can you suggest which CLI commands I could try to find a "missing" STLINK?

Pavel A.
Evangelist III

Make sure that ST-LINK is not in use by other application. Only one program can open ST-LINK at any time (no offence please, but sometimes people forget).

PHolt.1
Senior III

Sure; I don't do that.

But incidentally what does this option do? I have tried it both ways; makes no difference to frequency of what looks like USB related issues

PHolt1_0-1725952747384.png

 

PHolt.1
Senior III

I cannot find any help in Cube on the meaning of Shared ST-LINK.

Does anyone know?

google tells :

For debugging purposes, it can be of some interest to run simultaneously one IDE and STM32CubeMonitor. This feature is named "Shared mode".

The Shared mode enables the use of STM32CubeMonitor in parallel with another application supporting Shared mode such as STM32CubeIDE, STM32CubeProgrammer or IAR Embedded Workbench.

 

https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_configure_shared_mode

If you feel a post has answered your question, please click "Accept as Solution".