Commit Graph

8 Commits

Author SHA1 Message Date
Kai Vehmanen e14ab7088b tools: logger: fix parsing of -s argument
Fix logic for saving the snapshot file argument. getopt()
is called at least once after snapshot option is parsed and
getopt() will erase the optarg value when exiting the while
loop. Without this patch, argument is always NULL and snapshot
cannot be taken.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-04-15 16:25:39 +01:00
Marcin Maka ad0ff1f2e5 tools: logger: added less formatted output mode
Activated by '-r' option. Useful for intermediate log
processing when the output is used as an input for another
tool. No headers, tokens separated by single spaces,
component ids concatenated with component name to
still produce a single token if present.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-04-01 11:37:57 +02:00
Liam Girdwood 50685bfb42 logger: improve some error messages.
Make error messages more meaningful

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-02-01 16:17:07 +00:00
Bartosz Kokoszko e3cf1f2fed logger: use fopen binary mode
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-01-31 11:11:57 +01:00
Guennadi Liakhovetski 64bbee865b logger: support reading from a serial port
On some systems the DSP has no DMA interface to the host and is
using a serial port for sending its trace. This patch adds a "-u"
argument to specify a baudrate, that should be used with the serial
interface. The implementation takes care of spurious bytes,
sometimes seen in the beginning of the trace, produced by the port
initialisation by the DSP. The format is fixed to 8N1.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Guennadi Liakhovetski 28039d3024 logger: (cosmetic) fix the return value, use pointers
1. Programs shouldn't exit with negative return values, strictly
   speaking only EXIT_SUCCESS and EXIT_FAILURE should be used,
   however it is also valid to return 0 for success and any number
   from 1 to 125 for a failure.
2. Avoid passing complete structs as function parameters where an
   additional copy of one isn't needed, use const pointers instead.
3. Remove a left-over unused argument.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Marcin Maka 95a3d93bbd tools: logger: turn off colors if the output file is not a tty.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-12-04 13:37:16 +00:00
Curtis Malainey 5b5888ce07 Move SOFT into sub folder for SOF merge
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2018-11-24 23:27:24 -08:00