hla/stlink: Re-order trace parameters to allow trace output file to be optional
commit0ebf1eb94d06f892d8699bb35a8af65c721b5f5f
authorJames G. Smith <jsmith@ecoscentric.com>
Thu, 26 Sep 2013 11:08:05 +0000 (26 12:08 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 29 Oct 2013 22:54:34 +0000 (29 22:54 +0000)
tree31e8e021615f2e21ccd39e2246fd3479edb09e67
parente3229bdfbbedeff548902c42bed31a23b99cc1d1
hla/stlink: Re-order trace parameters to allow trace output file to be optional

Re-order the "trace" parameters to allow the raw capture (log) file to
be an optional feature. The clock frequency for calculating the "Async
Clock Prescalar" is always required when enabling trace processing and
is now the first "required" parameter.

The ST-Link driver is updated to use the (required parameter)
"trace_source_hz" non-zero value as the indicator of trace being
required, rather than the now optional output file descriptor being
non-NULL.

Background: This patch is groundwork for extending the OpenOCD SWO
capture to implement other (OpenOCD built-in) ITM/DWT processing where
the core trace support is required, but there is no requirement to
store raw trace data to a configured host file. By itself this patch
is almost a functional NOP, since without the other processing in
place there is no reason NOT to specify a capture file.

Change-Id: Ibc385dd0a7adaf9bd652bceded27262fef35fd59
Signed-off-by: James G. Smith <jsmith@ecoscentric.com>
Reviewed-on: http://openocd.zylin.com/1660
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
doc/openocd.texi
src/jtag/drivers/stlink_usb.c
src/jtag/hla/hla_interface.c