Debugging Works Manually, But Not from STM32CubeIDE (ST-Link GDB Server Issue)
- September 20, 2024
- 3 replies
- 3554 views
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)
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,
