Skip to main content
Graduate
April 26, 2022
Solved

STM32CubeIDE debugger not working

  • April 26, 2022
  • 7 replies
  • 17121 views

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.

    This topic has been closed for replies.
    Best answer by Markus GIRDLAND

    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.

    7 replies

    Super User
    April 26, 2022

    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.

    Graduate
    April 26, 2022

    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.

    Graduate
    April 26, 2022

    Update.

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

    But stil cannot debug.

    Super User
    April 27, 2022

    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.

    Graduate
    April 27, 2022

    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.

    Super User
    April 27, 2022

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

    ST Employee
    April 27, 2022

    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

    Graduate
    April 27, 2022

    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.

    ST Employee
    April 28, 2022

    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.

    Graduate
    April 28, 2022

    I could not find ST-Link gdb server in my system. I searched for "ST-LINK_gdbserver.exe" through all the system.

    So my next step would be to try to find a download and install ST-Link gdb server manually. I will post an update.

    Some context information:

    I have to PC computers being affected by this issue. One with Win7 and the other running Win 10. Both of them present the same symptom of debugger not working.

    On Win7 machine we could never install ST-Link drivers propperly. It failed. This computer has a lot of software for programming different legacy micros. OS can not be updated.

    Then I installed STM32Cube PROGRAMMER wich has an ST link drivers pack included, and that worked fine on Win7 to program Nucleo 64 board, as an external tool.

    In the other hand. Originally integrated debugger used to run properly in Win10 pc with STM32Cube Ide 1.8.

    I installed STM32Cube Programmer program in Win 10 also. Just to have both systems updated and syncronized, and to have a quick external tool for programming. As it has a look and feel pretty similar to ST newest software I thought this was fine for programming while trying to solve the not-debugging issue in Win7.

    Later I would prove that integrated debugging in Win10 pc under STM32CubeIDE did not work anymore. Now I cannot find ST-LINK_gdbserver.exe my guess is STM32Cube Programmer installation might have originated the issue.

    Graduate
    April 27, 2022

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