X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Fopenocd.texi;h=aa0bb5d3773b53d7ba156426d9e18449a0243d46;hb=b5d7889f5146515b33a01ac11ab7786eedf08b10;hp=4caefb8c899e3b6d4812d084eb06ee39655b02d2;hpb=6e40c5203a7696967fa0706c305e5b441dd7cfa9;p=fw%2Fopenocd diff --git a/doc/openocd.texi b/doc/openocd.texi index 4caefb8c8..aa0bb5d37 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -79,6 +79,7 @@ Free Documentation License''. * Architecture and Core Commands:: Architecture and Core Commands * JTAG Commands:: JTAG Commands * Boundary Scan Commands:: Boundary Scan Commands +* Utility Commands:: Utility Commands * TFTP:: TFTP * GDB and OpenOCD:: Using GDB and OpenOCD * Tcl Scripting API:: Tcl Scripting API @@ -3044,11 +3045,11 @@ The vendor ID and product ID of the device. Manually sets the stlink api used, valid options are 1 or 2. (@b{STLINK Only}). @end deffn -@deffn {Config Command} {trace} output_file_path source_clock_hz -Enable SWO tracing (if supported), trace data is appended to the specified -output file and the file is created if it does not exist. The source clock -rate for the trace port must be specified, this is typically the CPU clock -rate. +@deffn {Config Command} {trace} source_clock_hz [output_file_path] +Enable SWO tracing (if supported). The source clock rate for the +trace port must be specified, this is typically the CPU clock rate. If +the optional output file is specified then raw trace data is appended +to the file, and the file is created if it does not exist. @end deffn @end deffn @@ -4179,6 +4180,17 @@ There are several variants defined: @code{pxa26x} ... instruction register length is 5 bits @item @code{pxa3xx} ... instruction register length is 11 bits @end itemize +@item @code{openrisc} -- this is an OpenRISC 1000 core. +The current implementation supports two JTAG TAP cores: +@itemize @minus +@item @code{OpenCores TAP} (See: @emph{http://opencores.org/project,jtag}) +@item @code{Altera Virtual JTAG TAP} (See: @emph{http://www.altera.com/literature/ug/ug_virtualjtag.pdf}) +@end itemize +And two debug interfaces cores: +@itemize @minus +@item @code{Advanced debug interface} (See: @emph{http://opencores.org/project,adv_debug_sys}) +@item @code{SoC Debug Interface} (See: @emph{http://opencores.org/project,dbg_interface}) +@end itemize @end itemize @end deffn @@ -4851,6 +4863,12 @@ specifies "to the end of the flash bank". The @var{num} parameter is a value shown by @command{flash banks}. @end deffn +@deffn Command {flash padded_value} num value +Sets the default value used for padding any image sections, This should +normally match the flash bank erased value. If not specified by this +comamnd or the flash driver then it defaults to 0xff. +@end deffn + @anchor{program} @deffn Command {program} filename [verify] [reset] [offset] This is a helper script that simplifies using OpenOCD as a standalone @@ -7493,6 +7511,51 @@ the peripherals. @xref{targetevents,,Target Events}. @end deffn +@section OpenRISC Architecture + +The OpenRISC CPU is a soft core. It is used in a programmable SoC which can be +configured with any of the TAP / Debug Unit available. + +@subsection TAP and Debug Unit selection commands +@deffn Command {tap_select} (@option{vjtag}|@option{mohor}) +Select between the Altera Virtual JTAG and Mohor TAP. +@end deffn +@deffn Command {du_select} (@option{adv}|@option{mohor}) [option] +Select between the Advanced Debug Interface and the classic one. + +An option can be passed as a second argument to the debug unit. + +When using the Advanced Debug Interface, option = 1 means the RTL core is +configured with ADBG_USE_HISPEED = 1. This configuration skips status checking +between bytes while doing read or write bursts. +@end deffn + +@subsection Registers commands +@deffn Command {addreg} [name] [address] [feature] [reg_group] +Add a new register in the cpu register list. This register will be +included in the generated target descriptor file. + +@strong{[feature]} must be "org.gnu.gdb.or1k.group[0..10]". + +@strong{[reg_group]} can be anything. The default register list defines "system", + "dmmu", "immu", "dcache", "icache", "mac", "debug", "perf", "power", "pic" + and "timer" groups. + +@emph{example:} +@example +addreg rtest 0x1234 org.gnu.gdb.or1k.group0 system +@end example + + +@end deffn +@deffn Command {readgroup} (@option{group}) +Display all registers in @emph{group}. + +@emph{group} can be "system", + "dmmu", "immu", "dcache", "icache", "mac", "debug", "perf", "power", "pic", + "timer" or any new group created with addreg command. +@end deffn + @anchor{softwaredebugmessagesandtracing} @section Software Debug Messages and Tracing @cindex Linux-ARM DCC support @@ -7864,6 +7927,53 @@ If @emph{xsvfdump} shows a file is using those opcodes, it probably will not be usable with other XSVF tools. +@node Utility Commands +@chapter Utility Commands +@cindex Utility Commands + +@section RAM testing +@cindex RAM testing + +There is often a need to stress-test random access memory (RAM) for +errors. OpenOCD comes with a Tcl implementation of well-known memory +testing procedures allowing to detect all sorts of issues with +electrical wiring, defective chips, PCB layout and other common +hardware problems. + +To use them you usually need to initialise your RAM controller first, +consult your SoC's documentation to get the recommended list of +register operations and translate them to the corresponding +@command{mww}/@command{mwb} commands. + +Load the memory testing functions with + +@example +source [find tools/memtest.tcl] +@end example + +to get access to the following facilities: + +@deffn Command {memTestDataBus} address +Test the data bus wiring in a memory region by performing a walking +1's test at a fixed address within that region. +@end deffn + +@deffn Command {memTestAddressBus} baseaddress size +Perform a walking 1's test on the relevant bits of the address and +check for aliasing. This test will find single-bit address failures +such as stuck-high, stuck-low, and shorted pins. +@end deffn + +@deffn Command {memTestDevice} baseaddress size +Test the integrity of a physical memory device by performing an +increment/decrement test over the entire region. In the process every +storage bit in the device is tested as zero and as one. +@end deffn + +@deffn Command {runAllMemTests} baseaddress size +Run all of the above tests over a specified memory region. +@end deffn + @node TFTP @chapter TFTP @cindex TFTP