cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE 1.2.0 fails to start debug session for STM32L072 using STLINK v3 and ST GDB server

GGrec.1
Associate

Hi,

i'm using CubeIDE to debug a STM32L072 micro but debug session can't be started by IDE. In the same PC i'm able to run STLink utility and STMCubeProgrammer to access SWD port properly, both of them work with same micro. I made a try with STLINK v2 and the debug session inside the IDE works fine.

The CubeIDE and ST GDB server executables are both in the whitelist of Windows Firewall.

Any suggestions?

Best regards

Giuseppe Greco

6 REPLIES 6
GGrec.1
Associate

Sorry this is the error log:

STMicroelectronics ST-LINK GDB server. Version 5.4.0

Copyright (c) 2019, 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

    InitWhile         : Enabled

ST-LINK Failed to get target status

Error in initializing ST-LINK device.

Reason: Unknown. Please check power and cabling to target.

The PC runs Windows 10

Markus GIRDLAND
ST Employee

Generally that error indicates something basic that needs to be fixed. Do you get the same thing with another board? If not, it might be something specific to that board.

Also see if you can connect the board through STM32CubeProgrammer, as that might indicate where the problem is as well.

To get more of a clue you can also enable "Log to file" in the Debugger tab of your debug configuration and look more closely where the error happens.

Probably going to want to clock interface slower than 24 MHz to the L0​

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

Just had exactly the same issue.

First issue was the ST-LINK GDB server "Error in initializing ST-LINK device". As soon as I checked the option to connect to a particular ST-LINK S/N and did a scan, this resolved.

Second issue was the Interface Frequency was set to Auto. Changing this to 24000 also failed. 21000 and 8000 both worked.

HJone.2
Associate

​I had this issue. Turns out I was using the wrong USB cable on the G031K8. The micro USB I was using was for charging only.

I had the same issue with STM32L486 and CubeIDE. In other applications like ST-LINK or ST Programmer, everything is fine.

The problem is solved when I changed I/F freq. from Auto to 21000 kHz.