cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Works Manually, But Not from STM32CubeIDE (ST-Link GDB Server Issue)

Bouzid-s
Associate II

 

Hi everyone,

I'm facing an issue with debugging STM32 projects in STM32CubeIDE. I'm using a MacBook Pro with an M3 ARM CPU and debugging an STM32 project using the ST-Link GDB server. When I manually run the ST-Link GDB server from the terminal with the appropriate command, everything works fine. However, when I attempt to start the debugging session directly from the Debug button in STM32CubeIDE, it doesn't work.

Detailed Issue:

  • STM32CubeIDE Version: ( STM32CubeIDE 1.16.1)
  • Target Microcontroller: ( STM32 Nucleo_G431KB )
  • Debugger: ST-Link (i tried openOCD and GDB) and J-link (Segger)
  • Host System: macbook pro  M3 ARM CPU)

Manual Debugging Command:

When I run the following command in the external terminal, the GDB server starts properly, and I'm able to debug the application. I use then remote GDB server (localhost with default port)

 
/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.macos64_2.1.400.202404281720/tools/bin/ST-LINK_gdbserver -cp /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI /Users/bouzid-s/STM32CubeIDE/workspace_1.16.1/Blink_Led/Debug/Blink_Led.elf

This starts the GDB server and loads my application without any issues.

Problem with STM32CubeIDE Debugging:

However, when I click the Debug button in STM32CubeIDE to launch the debugging session, it fails to work. The exact behavior is that the IDE either does not start the GDB server correctly or there’s a mismatch in the way the debugger is configured internally. I've tried the following approaches:

What I Need Help With:

  • Is there a known issue with the ST-Link GDB server integration in STM32CubeIDE on macOS that could cause this behavior?
  • Is there a specific configuration or workaround that allows the IDE to launch the GDB server correctly without requiring manual intervention?

Any advice on how to resolve this issue so I can debug directly from STM32CubeIDE would be greatly appreciated!

Thanks in advance for your help.

Best regards,

1 ACCEPTED SOLUTION
4 REPLIES 4
Semer CHERNI
ST Employee

Hello @Bouzid-s 

First thanks for posting.

As @Andrew Neil asked, are you using the macOS 15?

Also could you provide the complete debug log?

BR,
Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Yes. Thanks ! Runing CubeIDE as sudoer should solve my problem for now.

pdmazariegos
Associate II

Try what emrys57 did on this link:

https://stackoverflow.com/questions/78996974/stm32cubeide-debugger-no-longer-works-in-macos-15-0-sequoia 

and it seems to work the debug session, so check it out!

Kind regards