Skip to main content
Associate
April 4, 2026
Question

StmCube IDE Remote debugging issue

  • April 4, 2026
  • 2 replies
  • 181 views

I have an stm32 board connected to a raspberry pi.

I am trying to start a remote debug session from StmCube IDE Installed on my computer and I get this error.

I haven't encountered this problem before and I don't quite understand its cause because I have configured everything correctly :

- in Cube IDE Debug Configuration I selected connect to remote GDB Server with correct host name and port 3333.

- in the pi side I created an openocd.cfg file which includes "bindto 0.0.0.0" command in order to allow connections from any ip.

Cube IDE.png

Pi.png

2 replies

Technical Moderator
April 6, 2026

Hello @retroBoy69, and Welcome to ST Community!

Are you using ST-Link or OpenOCD on STM32CubeIDE? If STM32CubeIDE expects an ST-Link GDB server but receives different responses, it may fail to verify the ST device and close the connection.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
Associate
April 6, 2026

Hello @STackPointer64, thanks for your reply.

Here is my full Debug Configuration :

Debug Config.png

Any help will be appreciated.

Technical Moderator
April 6, 2026

Try launching a debug session from your PC terminal by opening a command prompt and entering the following commands:

arm-none-eabi-gdb your_firmware.elf
(gdb) target remote <pi-ip>:3333
(gdb) monitor reset halt
(gdb) monitor init
(gdb) load

If this works, your OpenOCD setup is correct, and we can proceed to replicate it in STM32CubeIDE.

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
Technical Moderator
April 21, 2026

Hello @retroBoy69, have you managed to resolve the issue?

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.