Skip to content

OpenOCDDriver: disable default server ports - #1958

Open
ozan956 wants to merge 1 commit into
labgrid-project:masterfrom
analogdevicesinc:openocd-close-ports
Open

OpenOCDDriver: disable default server ports#1958
ozan956 wants to merge 1 commit into
labgrid-project:masterfrom
analogdevicesinc:openocd-close-ports

Conversation

@ozan956

@ozan956 ozan956 commented Aug 16, 2026

Copy link
Copy Markdown

Description

OpenOCD starts GDB, telnet, and TCL servers on fixed default ports. When
multiple boards on the same exporter bootstrap concurrently, the second
OpenOCD instance fails to bind these ports.

Disable the server ports before loading OpenOCD configuration files.
OpenOCDDriver does not provide a lifecycle for using or stopping these
servers, while disabling them allows parallel bootstrap operations.

Configurations that intentionally require a server interface can re-enable
the required port before init.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

Tested with:

pytest -q tests/test_openocd.py
ruff check labgrid/driver/openocddriver.py
ruff format --check labgrid/driver/openocddriver.py

OpenOCD starts GDB, telnet, and TCL servers on fixed default ports.
When multiple boards on the same exporter bootstrap concurrently, the
second OpenOCD instance fails to bind these ports.

Disable the server ports before loading OpenOCD configuration files.
OpenOCDDriver does not provide a lifecycle for using or stopping these
servers, while disabling them allows parallel bootstrap operations.

Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>

@Emantor Emantor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change makes sense to me, a different option would be to rewrite the exporter to control the openOCD invocation similar to how we handle serial ports with ser2net.

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