GDB Connection Timeout

7.6k views Asked by At

I used to the St-write to burn .bin to the STM32F4 and saw the message which I expected. Now, I hope to understand how GPIO init. Hence, I use OpenOCD and arm-none-eabi-gdb to do that. Here, it is my process.

$ minicom 

$ openocd -f /opt/openocd/share/openocd/scripts/board/stm32f4discovery.cfg 

$ arm-none-eabi-gdb main.elf
(gdb) target remote localhost:3333
(gdb) localhost:3333: Connection timed out.

How do I check the port of OpenOCD? Why does it occur timeout?

2

There are 2 answers

0
oren zvi On

Are you running a virtual linux machine on a windows host? If so, you probably need to replace localhost with 10.0.0.2 (or whatever your windows IP is). A good way to know, is to telnet to the openOCD address and port 4444 and see if you get the openOCD prompt, and can type a few commands.

0
Fabien R On

That certainly means that openocd did not start or that the port is busy.

Usually, you use :

openocd -f board/stm32f4discovery.cfg

You should check that your session is running.