Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,12 @@ OpenOCDDriver
An :any:`OpenOCDDriver` controls *OpenOCD* to bootstrap a target with a
bootloader.

The driver disables OpenOCD's GDB, telnet and TCL server ports. It does not
provide a lifecycle to expose or stop these server interfaces, and disabling
them allows multiple bootstrap operations to run concurrently on one exporter.
Configurations which require a server interface can re-enable it with an
appropriate command before ``init``.

Note that OpenOCD supports specifying USB paths since
`a1b308ab <https://sourceforge.net/p/openocd/code/ci/a1b308ab/>`_ which was released with v0.11.
The OpenOCDDriver passes the resource's USB path.
Expand Down
11 changes: 10 additions & 1 deletion labgrid/driver/openocddriver.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from itertools import chain

import attr

from ..factory import target_factory
from ..protocol import BootstrapProtocol
from ..step import step
from ..util.managedfile import ManagedFile
from ..util.helper import processwrapper
from ..util.managedfile import ManagedFile
from .common import Driver


Expand Down Expand Up @@ -55,6 +56,14 @@ def _run_commands(self, commands: list):
cmd = [self.tool]
cmd += chain.from_iterable(("--search", path) for path in self.search)
cmd += self._get_usb_path_cmd()
cmd += [
"--command",
"gdb port disabled",
"--command",
"telnet port disabled",
"--command",
"tcl port disabled",
]

managed_configs = []
for config in self.config:
Expand Down
Loading