X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=doc%2Fopenocd.texi;h=f946bdf6c2d0f9310e7721ae563c64c3a97a168d;hb=e7b2958229c7e0d7e98e130764aa50d1ca9017d3;hp=0e57c1afeea80b5e8abac71b9df99d17110671c5;hpb=7682877c8ca59226f7131db5fe35253acf117bb4;p=openocd.git diff --git a/doc/openocd.texi b/doc/openocd.texi index 0e57c1afee..f946bdf6c2 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -574,7 +574,6 @@ bash$ openocd --help --debug | -d set debug level <0-3> --log_output | -l redirect log output to file --command | -c run ---pipe | -p use pipes when talking to gdb @end verbatim If you don't give any @option{-f} or @option{-c} options, @@ -1911,12 +1910,29 @@ use the command line @option{-pipe} option. @deffn {Command} gdb_port [number] @cindex GDB server -Specify or query the first port used for incoming GDB connections. -The GDB port for the -first target will be gdb_port, the second target will listen on gdb_port + 1, and so on. +Normally gdb listens to a TCP/IP port, but GDB can also +communicate via pipes(stdin/out or named pipes). The name +"gdb_port" stuck because it covers probably more than 90% of +the normal use cases. + +No arguments reports GDB port. "pipe" means listen to stdin +output to stdout, an integer is base port number, "disable" +disables the gdb server. + +When using "pipe", also use log_output to redirect the log +output to a file so as not to flood the stdin/out pipes. + +The -p/--pipe option is deprecated and a warning is printed +as it is equivalent to passing in -c "gdb_port pipe; log_output openocd.log". + +Any other string is interpreted as named pipe to listen to. +Output pipe is the same name as input pipe, but with 'o' appended, +e.g. /var/gdb, /var/gdbo. + +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 specified as zero, GDB remote access ports are not activated. @end deffn @deffn {Command} tcl_port [number] @@ -1926,7 +1942,7 @@ output from the Tcl engine. Intended as a machine interface. When not specified during the configuration stage, the port @var{number} defaults to 6666. -When specified as zero, this port is not activated. + @end deffn @deffn {Command} telnet_port [number] @@ -2259,11 +2275,11 @@ default values are used. Currently, only one @var{vid}, @var{pid} pair may be given, e.g. for Altera USB-Blaster (default): @example -ft2232_vid_pid 0x09FB 0x6001 +usb_blaster_vid_pid 0x09FB 0x6001 @end example The following VID/PID is for Kolja Waschk's USB JTAG: @example -ft2232_vid_pid 0x16C0 0x06AD +usb_blaster_vid_pid 0x16C0 0x06AD @end example @end deffn @@ -5430,9 +5446,10 @@ file (which is normally the server's standard output). @xref{Running}. @end deffn -@deffn Command echo message +@deffn Command echo [-n] message Logs a message at "user" priority. Output @var{message} to stdout. +Option "-n" suppresses trailing newline. @example echo "Downloading kernel -- please wait" @end example @@ -6390,6 +6407,15 @@ the @code{xscale debug_handler} command. The allowed locations for the debug handler are either (0x800 - 0x1fef800) or (0xfe000800 - 0xfffff800). The default value is 0xfe000800. +XScale has resources to support two hardware breakpoints and two +watchpoints. However, the following restrictions on watchpoint +functionality apply: (1) the value and mask arguments to the @code{wp} +command are not supported, (2) the watchpoint length must be a +power of two and not less than four, and can not be greater than the +watchpoint address, and (3) a watchpoint with a length greater than +four consumes all the watchpoint hardware resources. This means that +at any one time, you can have enabled either two watchpoints with a +length of four, or one watchpoint with a length greater than four. These commands are available to XScale based CPUs, which are implementations of the ARMv5TE architecture. @@ -6592,6 +6618,21 @@ must also be explicitly enabled. This finishes by listing the current vector catch configuration. @end deffn +@deffn Command {cortex_m3 reset_config} (@option{srst}|@option{sysresetreq}|@option{vectreset}) +Control reset handling. The default @option{srst} is to use srst if fitted, +otherwise fallback to @option{vectreset}. +@itemize @minus +@item @option{srst} use hardware srst if fitted otherwise fallback to @option{vectreset}. +@item @option{sysresetreq} use NVIC SYSRESETREQ to reset system. +@item @option{vectreset} use NVIC VECTRESET to reset system. +@end itemize +Using @option{vectreset} is a safe option for all current Cortex-M3 cores. +This however has the disadvantage of only resetting the core, all peripherals +are uneffected. A solution would be to use a @code{reset-init} event handler to manually reset +the peripherals. +@xref{Target Events}. +@end deffn + @anchor{Software Debug Messages and Tracing} @section Software Debug Messages and Tracing @cindex Linux-ARM DCC support @@ -7028,11 +7069,12 @@ This would cause GDB to connect to the gdbserver on the local pc using port 3333 @item A pipe connection is typically started as follows: @example -target remote | openocd --pipe +target remote | openocd -c "gdb_port pipe; log_output openocd.log" @end example This would cause GDB to run OpenOCD and communicate using pipes (stdin/stdout). Using this method has the advantage of GDB starting/stopping OpenOCD for the debug -session. +session. log_output sends the log output to a file to ensure that the pipe is +not saturated when using higher debug level outputs. @end enumerate To list the available OpenOCD commands type @command{monitor help} on the @@ -7209,10 +7251,10 @@ Low-level commands are (should be) prefixed with "ocd_", e.g. is the low level API upon which @command{flash banks} is implemented. @itemize @bullet -@item @b{ocd_mem2array} <@var{varname}> <@var{width}> <@var{addr}> <@var{nelems}> +@item @b{mem2array} <@var{varname}> <@var{width}> <@var{addr}> <@var{nelems}> Read memory and return as a Tcl array for script processing -@item @b{ocd_array2mem} <@var{varname}> <@var{width}> <@var{addr}> <@var{nelems}> +@item @b{array2mem} <@var{varname}> <@var{width}> <@var{addr}> <@var{nelems}> Convert a Tcl array to memory locations and write the values @item @b{ocd_flash_banks} <@var{driver}> <@var{base}> <@var{size}> <@var{chip_width}> <@var{bus_width}> <@var{target}> [@option{driver options} ...]