armv7m_trace: get rid of the old tpiu code

Remove all the old tpiu code and replace it with a wrapper that
uses the new commands, prints-out the new commands and informs
about the deprecation.

All the code that handles the deprecated tpiu commands is enclosed
between the comments
	/* START_DEPRECATED_TPIU */
and
	/* END_DEPRECATED_TPIU */
so will be easy to remove it in the future.

Change-Id: I70b0486770128203b923346382d9a90b8ec08439
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6030
Tested-by: jenkins
Reviewed-by: Adrian M Negreanu <adrian.negreanu@nxp.com>
This commit is contained in:
Antonio Borneo
2020-11-13 23:36:24 +01:00
parent c945d6e616
commit dc7b32ea4a
9 changed files with 223 additions and 432 deletions

View File

@@ -9642,54 +9642,6 @@ Disable the TPIU or the SWO, terminating the receiving of the trace data.
@end deffn
TODO: remove the old tpiu commands
@deffn Command {tpiu config} (@option{disable} | ((@option{external} | @option{internal (@var{filename} | @var{:port} | -)}) @
(@option{sync @var{port_width}} | ((@option{manchester} | @option{uart}) @var{formatter_enable})) @
@var{TRACECLKIN_freq} [@var{trace_freq}]))
ARMv7-M architecture provides several modules to generate debugging
information internally (ITM, DWT and ETM). Their output is directed
through TPIU to be captured externally either on an SWO pin (this
configuration is called SWV) or on a synchronous parallel trace port.
This command configures the TPIU module of the target and, if internal
capture mode is selected, starts to capture trace output by using the
debugger adapter features.
Some targets require additional actions to be performed in the
@b{trace-config} handler for trace port to be activated.
Command options:
@itemize @minus
@item @option{disable} disable TPIU handling;
@item @option{external} configure TPIU to let user capture trace
output externally (with an additional UART or logic analyzer hardware).
@item @option{internal (@var{filename} | @var{:port} | -)} configure TPIU and debug adapter to
gather trace data then:
@itemize @minus
@item append it to a regular file or a named pipe if @var{filename} is specified.
@item listen to a TCP/IP port if @var{:port} is specified, then broadcast the trace data over this port.
@item if '-' is specified, OpenOCD will forward trace data to @command{tcl_trace} command.
@*@b{Note:} while broadcasting to file or TCP, the forwarding to @command{tcl_trace} will remain active.
@end itemize
@item @option{sync @var{port_width}} use synchronous parallel trace output
mode, and set port width to @var{port_width}.
@item @option{manchester} use asynchronous SWO mode with Manchester
coding.
@item @option{uart} use asynchronous SWO mode with NRZ (same as
regular UART 8N1) coding.
@item @var{formatter_enable} is @option{on} or @option{off} to enable
or disable TPIU formatter which needs to be used when both ITM and ETM
data is to be output via SWO.
@item @var{TRACECLKIN_freq} this should be specified to match target's
current TRACECLKIN frequency (usually the same as HCLK).
@item @var{trace_freq} trace port frequency. Can be omitted in
internal mode to let the adapter driver select the maximum supported
rate automatically.
@end itemize
Example usage:
@enumerate
@@ -9725,7 +9677,6 @@ openocd -f interface/stlink.cfg \
-c "stm32l1.tpiu enable"
@end example
@end enumerate
@end deffn
@subsection ARMv7-M specific commands
@cindex tracing