cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE debugger not working

AlexCloned
Senior

I am using STM32CubeIDE V 1.9.0, with an Nucleo board with STM32F401, and STLink integrated. Debugger just stopped working.

I have spent hours trying to change debugging configurations, upgrading STLink firmware, but nothing.

When I press Debug I see a progress bar down in the right in the IDE, it launches debug perspective, but never starts, programs, runs, or enables debug buttons such as Step-into, step over, pause, etc.

I am missing something or It must be a known issue. Did someone experiment this issue recently?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

If the log file never even gets created then my guess is that it could be some sort of anti-virus or firewall that's blocking the ST-Link gdb server.

Could you try to start the ST-Link gdb server through command line to see if it still gets blocked? You can find the manual here where you can get information on how to launch it remotely.

View solution in original post

13 REPLIES 13
TDK
Guru

Should work. How are you generating your project? What is reported in the console log when it fails to start? A reboot sometimes fixes things.

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

I am generating the project the following way:

1) Project->Build Configuration->Set Active->1 Debug

2) Project -> Build All

Project builds and returns succcess in the CDT Build Console

3) Run -> Debug

Console does not update after build results.

Progress window shows "launching *** project..."

Debug perspective is launched.

Specific debug console shows "No console to display at this time".

Nothing moves. Program does not even download to target.

ST Link led is green and does not blink.

AlexCloned
Senior

Update.

If I launch STM32 Programmer program I can program the target and app runs ok.

But stil cannot debug.

TDK
Guru

I meant how did you generate the project itself. Did you do a new STM32 project, choose the chip, configure stuff, etc, and generate code? Or was it imported? Imported projects can act funny like that when trying to debug. Try a new, blank, project generated with CubeIDE.

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

Hey there,

Did you create a debug configuration for an "STM32 Cortex-M C/C++ Application" or some other type of debug configuration?

You could activate the gdbserver log in the debug configuration. Then if you could post the gdbserver log and the .launch file that's in the root of your project then I could probably get a more clear picture of what goes wrong.

0693W00000LzAIbQAN.png

AlexCloned
Senior

Thank you. Yes @Markus GIRDLAND​ y created a debug config and checked "log file". But log is not even created when trying to debug. Then I manually created the log file, browsed for it from the debug config. I started debug, but the log file never updates. It remains empty. It seems debug is aborting when trying to start.

Thankyou @TDK​ . Y created the project from an example project from the Board Selector tab in the New STM32 project window, selecting STM32 Nucleo board. The project is native targeted for STM32Cube.

Hmm, I'm not sure, sorry. Should be working. Maybe a bad cable or connection, but that seems like a stretch.

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

I attach .launch file. Just added.txt extension.