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

Disable tcl and telnet servers when running OpenOCD #38

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disable tcl and telnet servers when running OpenOCD because the port …
…numbers might conflict with other processes.
  • Loading branch information
richardxia committed Dec 12, 2016
commit 9cf2b5516384c47a1e26a9e87738e1ca2050a48e
14 changes: 12 additions & 2 deletions debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,18 @@ def __init__(self, cmd=None, config=None, debug=False):

# This command needs to come before any config scripts on the command
# line, since they are executed in order.
# Tell OpenOCD to bind to an unused port.
cmd[1:1] = ["--command", "gdb_port %d" % 0]
cmd[1:1] = [
# Tell OpenOCD to bind gdb to an unused, ephemeral port.
"--command",
"gdb_port 0",
# Disable tcl and telnet servers, since they are unused and because
# the port numbers will conflict if multiple OpenOCD processes are
# running on the same server.
"--command",
"tcl_port disabled",
"--command",
"telnet_port disabled",
]

logfile = open(Openocd.logname, "w")
logfile.write("+ %s\n" % " ".join(cmd))
Expand Down