cancel
Showing results for 
Search instead for 
Did you mean: 

All of my ST-LINKs stopped working in CubeIDE today.

Brian H
Associate III

It's the strangest, most frustrating thing I've encountered.  I have three ST-LINK programmers; two /V2 and one /V3.  All have been working fine for a good long time.

Today, CubeIDE won't program my device anymore, through any of the three programmers.  Invariably, the debug console contains the following messages:

STMicroelectronics ST-LINK GDB server. Version 7.5.0
Copyright (c) 2023, 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
InitWhile : Enabled

Failed to bind to port 61235, error code -1: No error
Failure starting SWV server on TCP port: 61235
Failed to bind to port 61234, error code -1: No error
Failure starting GDB server: TCP port 61234 not available.
Shutting down...
Exit.

The "Problem Occurred" dialog appears, and the following is visible upon clicking "Details >>"

Error in final launch sequence:

Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (0) Unknown. Please check power and cabling to target.

Bizarrely, CubeProgrammer can communicate with the target just fine, aside from this warning that appears in the log:

11:27:02 : Warning: Connection to AP 0 requested and Failed, Connection established with AP 1

I have Segger's software suite installed as well, and they all claim "no probes connected via USB".

Notably, if the JTAG cable is disconnected, the Console text changes to:

STMicroelectronics ST-LINK GDB server. Version 7.5.0
Copyright (c) 2023, 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
InitWhile : Enabled

Target unknown MCU target

Error in initializing ST-LINK device.
Reason: Unknown MCU found on target.

...and the Problem Occurred Details changes to this:

Error in final launch sequence:

Failed to execute MI command:
target remote localhost:61234

Error message from debugger back end:
localhost:61234: Connection timed out.
Failed to execute MI command:
target remote localhost:61234

Error message from debugger back end:
localhost:61234: Connection timed out.
localhost:61234: Connection timed out.

J-Link just keeps saying no probes connected via USB.

This has happened across two prototypes of my project involving an STM32H563ZI microcontroller, and is a new issue as of this morning.

What's going on?  More importantly, how do I fix it?  I'm dead in the water if I can't debug my code.

8 REPLIES 8
Andrew Neil
Evangelist III

Do the ST-Links appear in Device Manager?

Yes:

BrianH_0-1713801219854.png

and I'll mention again that CubeProgrammer is able to communicate successfully with the target through all three ST-Links.

>>I'm dead in the water if I can't debug my code.

More than one way to sink a boat..

Per Andrew, can you see the ST-LINK in Device Manage. If you can attach via STM32 Cube Programmer. Confirm VTarget voltage, confirm you can connect to STM32 part.

Any chance you locked out the STM32H5? Or reconfigured or disabled PA13/PA14 pins?

Does connectivity change if you pull BOOT0 pin HIGH?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Can you Mass Erase the part in Cube Programmer?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Brian H
Associate III

Thank you everyone who has responded so far.  Since it's kinda buried in the middle of the post and has been universally missed by all readers, I'll emphasize again:

CubeProgrammer can communicate with the target just fine.

Yes, the target voltage is in range.  I can Mass Erase the chip.  I can also read it, program it, and use all of the other features within CubeProgrammer.  It's definitely just CubeIDE that's having a problem.

I've been ignoring a prompt to update within CubeIDE for a while, due to the general tendency of updates to break things that were working...I pulled the trigger and started the update, which is taking a long time.  I'll be back with word on whether that fixed anything.

It's just so strange that this started today, after everything had been working fine.

Brian H
Associate III

Update:

I applied all the software updates.  No change.

After blindly unplugging and replugging lots of things lots of times, eventually I've found my way back to being able to debug in the IDE.

However...

On each[1] launch, I'm prompted to update the firmware in the ST-Link.  If I choose to go ahead with the update, first I have to cycle power on the ST-Link to get it into "DFU Mode"...then another click of "Open in update mode" results in the following error displayed at the bottom of the STLinkUpgrade window:

"Unexpected flash size for ST-Link micro.  Don't know how to upgrade."

Once again, CubeProgrammer has no such issue although I guess it didn't get updated, because it only offers an older version of the ST-Link firmware (V2J39S7 vs V2J49S7).

What in the wide world of almost-sports is going on here?  Why does CubeIDE's STLinkUpgrade think my ST-Link has an unexpected flash size?

 

[1] - because I don't clear the "Always check for latest version" box.

Sorry not an active user of CubeIDE, #TeamKeil

Various releases of Cube Programmer have different versions of firmware for the ST-LINK's and it's usually possible to go back and forth a few versions.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
PGump.1
Senior

It looks like someone at ST has broken the ST-Link. see

https://community.st.com/t5/stm32cubeide-mcus/stm32cubeide-v1-15-st-link-upgrade-problem/m-p/661212#M26232

I had to roll back the Cube to version 1.14 to get it to work, and find some sanity...

I haven't heard anything from ST if they are going to address it...

Kind regards
Pedro