aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2018-05-21 16:14:33 +0200
committerMatthias Welwarsky <matthias@welwarsky.de>2018-09-07 08:18:22 +0100
commitab858febb6ca6e5dada1492e96c00d8b12c575c0 (patch)
tree6474d3e3a0861d717ce77baf53f4ebd797eec714 /doc
parent11019a824d0273012e9b253fd63ddda6a2468c83 (diff)
downloadriscv-openocd-ab858febb6ca6e5dada1492e96c00d8b12c575c0.zip
riscv-openocd-ab858febb6ca6e5dada1492e96c00d8b12c575c0.tar.gz
riscv-openocd-ab858febb6ca6e5dada1492e96c00d8b12c575c0.tar.bz2
gdb_server: add per target option "-gdb-port"
The argument passed to global config command "gdb_port" is usually, but not always, a TCP port number. In case of multiple targets, this numeric value is used as the first port of a set of consecutive TCP ports assigned one per target. If the argument is not a numeric value (e.g. "pipe", "disabled", ...) then incrementing it for the next target has no sense. Add the option "-gdb-port number" to the commands "target create" and "$target_name configure" to override, for the specific target, the general global configuration. This permits to use a per target "-gdb-port disabled", when no gdb port is required for that specific target. It also makes possible to choose a custom TCP port number for each target, overriding the usual sequence of consecutive port numbers. Change-Id: I3b9a1910b28ab4bc757e839d0e5d08ffc29f7ab4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4530 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'doc')
-rw-r--r--doc/openocd.texi14
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index c0d065d..3eb6309 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -2114,6 +2114,7 @@ In such cases, just specify the relevant port number as "disabled".
If you disable all access through TCP/IP, you will need to
use the command line @option{-pipe} option.
+@anchor{gdb_port}
@deffn {Command} gdb_port [number]
@cindex GDB server
Normally gdb listens to a TCP/IP port, but GDB can also
@@ -2139,11 +2140,15 @@ The GDB port for the first target will be the base port, the
second target will listen on gdb_port + 1, and so on.
When not specified during the configuration stage,
the port @var{number} defaults to 3333.
+When @var{number} is not a numeric value, incrementing it to compute
+the next port number does not work. In this case, specify the proper
+@var{number} for each target by using the option @code{-gdb-port} of the
+commands @command{target create} or @command{$target_name configure}.
+@xref{gdbportoverride,,option -gdb-port}.
Note: when using "gdb_port pipe", increasing the default remote timeout in
gdb (with 'set remotetimeout') is recommended. An insufficient timeout may
cause initialization to fail with "Unknown remote qXfer reply: OK".
-
@end deffn
@deffn {Command} tcl_port [number]
@@ -4458,6 +4463,13 @@ to the target. Currently, only the @code{aarch64} target makes use of this optio
where it is a mandatory configuration for the target run control.
@xref{armcrosstrigger,,ARM Cross-Trigger Interface},
for instruction on how to declare and control a CTI instance.
+
+@anchor{gdbportoverride}
+@item @code{-gdb-port} @var{number} -- see command @command{gdb_port} for the
+possible values of the parameter @var{number}, which are not only numeric values.
+Use this option to override, for this target only, the global parameter set with
+command @command{gdb_port}.
+@xref{gdb_port,,command gdb_port}.
@end itemize
@end deffn