cancel
Showing results for 
Search instead for 
Did you mean: 

StmCube IDE Remote debugging issue

retroBoy69
Associate

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

4 REPLIES 4
STackPointer64
ST Employee

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.

Hello @STackPointer64, thanks for your reply.

Here is my full Debug Configuration :

Debug Config.png

Any help will be appreciated.

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.
STackPointer64
ST Employee

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.