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

Conversation

richardxia
Copy link
Collaborator

Hi @timsifive, I am hoping that this will be the last of the changes I need to make in order to make it safe to run multiple gdbserver.py processes on the same machine. We're still occasionally getting port conflict errors, even with my last set of changes. Looking at openocd.log more carefully, I realized that it wasn't actually a conflict with the gdb server, but instead the tcl server that OpenOCD starts up:

Error: 482 29163 server.c:265 add_service(): couldn't bind tcl to socket: Address already in use

I realized that by default, OpenOCD starts up both a tcl server and a telnet server which allow you to issue tcl commands to OpenOCD, and which bind to ports 6666 and 4444 respectively. The problem is that if you have multiple processes running OpenOCD, you get conflicts on these ports, even though they're not really being used.

In this PR, I've updated the OpenOCD wrapper class with a couple more commands to disable both the tcl and telnet servers, and I checked that this still runs correctly with the local tests that use this script.

…numbers might conflict with other processes.
@timsifive timsifive merged commit f8910f9 into riscv-software-src:master Dec 13, 2016
@richardxia richardxia deleted the disable_tcl_and_telnet_servers branch December 13, 2016 01:10
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

Successfully merging this pull request may close these issues.

2 participants