Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux: target remote :3333 "Connection timed out"; needs IP address #267

Open
michd opened this issue Oct 2, 2020 · 1 comment
Open

Comments

@michd
Copy link
Contributor

michd commented Oct 2, 2020

In 2.2 Hardware, the following gdb command is listend to connect to openocd:

(gdb) target remote :3333

When I ran this on my machine, it consistently timed out:

:3333: Connection timed out.

The command I'm invoking for the gbd console is:

arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/examples/hello

For some more version info, here's the output of arm-non-eabi-gdb --version:

GNU gdb (GDB) 9.2
<snip>

And openocd --version:

Open On-Chip Debugger 0.10.0
<snip>

Openocd is indeed running and listening on the correct port, as per netstat -tulpn | grep LISTEN:

tcp        0      0 0.0.0.0:3333            0.0.0.0:*               LISTEN      13303/openocd

Fix/workaround:

Seeing the 0.0.0.0 in there gave me the idea to try the following:

(gdp) target remote 0.0.0.0:3333

This results in the output described in the book, and allows me to continue.

Perhaps it would help some if this solution was added as a note in the book.

A further note, the same applies to the gdb script openocd.gdb, changing the first line from target extended-remote :3333 to target extended-remote 0.0.0.0:3333 fixes the later part that hit the same issue.

@eldruin
Copy link
Member

eldruin commented Jul 26, 2023

Thank you for finding a fix for this. I would welcome a PR with it for a broader benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants