aboutsummaryrefslogtreecommitdiff
path: root/man/swodec.1
blob: d9e39c47d3a25a92a579511461caed91bf12e76c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
.TH swodec 1 "Mar 12, 2017"
.SH NAME
swodec \- decode SWO trace data

.SH SYNOPSIS
.B swodec [OPTIONS]

.SH DESCRIPTION
.B swodec
is a command-line utility to decode SWO trace data.

.SH OPTIONS
.TP
.B \-h, \-\-help
Show a help text and exit.

.TP
.B \-V, \-\-version
Show version information and exit.

.TP
.B \-l, \-\-log\-level
Set the log level of \fBswodec\fP and \fBlibswo\fP. The following log levels
are available:

.RS
.RS
.TP
.B none (0)
No messages
.TP
.B error (1)
Error messages
.TP
.B warn (2)
Warning messages
.TP
.B info (3)
Informational messages
.TP
.B debug (4)
Debug messages
.RE

The name or its correspoding number can be used to specify a log level.
.RE

.TP
.BR "\-i, \-\-input\-file " <filename>
Load trace data from a file instead of using standard input.

.TP
.BR "\-f, \-\-filter " <list>
A comma-separated list of packet types to filter for. The following packet types
are available:

.RS
.RS
.TP
.B sync
Synchronization
.TP
.B of
Overflow
.TP
.B lts
Local timestamp
.TP
.B gts
Global timestamp. This is a shortcut for \fBgts1\fP and \fBgts2\fP.
.TP
.B gts1
Global timestamp (GTS1)
.TP
.B gts2
Global timestamp (GTS2)
.TP
.B ext
Extension
.TP
.B inst
Instrumentation
.TP
.B hw
Hardware source. This is for hardware source packets which could not be decoded
as Data Watchpoint and Trace (DWT) packets.
.TP
.B dwt
Data Watchpoint and Trace (DWT). This is a shortcut for \fBevcnt\fP,
\fBexc\fP, \fBpc\fP, \fBdtpc\fP, \fBdtaddr\fP and \fBdtval\fP.
.TP
.B evcnt
Event counter
.TP
.B exc
Exception trace
.TP
.B pc
Periodic PC sample
.TP
.B dtpc
Data trace PC value
.TP
.B dtaddr
Data trace address offset
.TP
.B dtval
Data trace data value
.TP
.B unknown
Unknown data
.RE
.RE

.RS
If a tilde (~) precedes the list the machting sense is inverted.
.RE

.TP
.BR "\-\-filter-inst " <list>
A comma-separated list of instrumentation source addresses to filter for. If a
tilde (~) precedes the list the machting sense is inverted. Each address must be
in the range from \fB0\fP to \fB31\fP.

.TP
.B \-\-dump-inst
Dump the payload of instrumentation packets. All other packet types are filtered
out.

.SH EXAMPLES

In order to decode trace data from a file (e.g. trace.bin), run the following
command:

.RB " $ " "swodec \-\-input\-file trace.bin"

If you want to filter for instrumentation and hardware source packets only, use:

.RB " $ " "swodec \-\-input-file trace.bin \-\-filter inst,hw"

If you are interested in all packets except for unknown data and
synchronization, the simplest way is to invert the sense of matching:

.RB " $ " "swodec \-\-input-file trace.bin \-\-filter ~unknown,sync"