2024-07-26 02:47 AM - edited 2024-07-26 03:43 AM
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)?
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.
I've tried 2 x STLINK ISOL V3 and a STLINK ISOL v2. No success.
2024-09-08 10:02 AM - edited 2024-09-08 10:11 AM
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.
2024-09-08 11:00 AM - edited 2024-09-08 11:02 AM
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:
2024-09-08 08:32 PM - edited 2024-09-08 08:39 PM
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).
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.
2024-09-08 08:44 PM - edited 2024-09-08 08:54 PM
> 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.
2024-09-09 12:57 PM
Can you suggest which CLI commands I could try to find a "missing" STLINK?
2024-09-09 02:57 PM
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).
2024-09-10 12:19 AM
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
2024-09-12 12:54 AM
I cannot find any help in Cube on the meaning of Shared ST-LINK.
Does anyone know?
2024-09-12 01:03 AM
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