Disable tcl and telnet servers when running OpenOCD #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 atopenocd.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: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.