Select one of the symbols to view example projects that use it.
 
Outline
#define SEGGER_SYSVIEW_H
#include "SEGGER.h"
#include "SEGGER_SYSVIEW_ConfDefaults.h"
#define SEGGER_SYSVIEW_MAJOR
#define SEGGER_SYSVIEW_MINOR
#define SEGGER_SYSVIEW_REV
#define SEGGER_SYSVIEW_VERSION
#define SEGGER_SYSVIEW_INFO_SIZE
#define SEGGER_SYSVIEW_QUANTA_U32
#define SEGGER_SYSVIEW_LOG
#define SEGGER_SYSVIEW_WARNING
#define SEGGER_SYSVIEW_ERROR
#define SEGGER_SYSVIEW_FLAG_APPEND
#define SEGGER_SYSVIEW_PREPARE_PACKET
#define SYSVIEW_EVTID_NOP
#define SYSVIEW_EVTID_OVERFLOW
#define SYSVIEW_EVTID_ISR_ENTER
#define SYSVIEW_EVTID_ISR_EXIT
#define SYSVIEW_EVTID_TASK_START_EXEC
#define SYSVIEW_EVTID_TASK_STOP_EXEC
#define SYSVIEW_EVTID_TASK_START_READY
#define SYSVIEW_EVTID_TASK_STOP_READY
#define SYSVIEW_EVTID_TASK_CREATE
#define SYSVIEW_EVTID_TASK_INFO
#define SYSVIEW_EVTID_TRACE_START
#define SYSVIEW_EVTID_TRACE_STOP
#define SYSVIEW_EVTID_SYSTIME_CYCLES
#define SYSVIEW_EVTID_SYSTIME_US
#define SYSVIEW_EVTID_SYSDESC
#define SYSVIEW_EVTID_MARK_START
#define SYSVIEW_EVTID_MARK_STOP
#define SYSVIEW_EVTID_IDLE
#define SYSVIEW_EVTID_ISR_TO_SCHEDULER
#define SYSVIEW_EVTID_TIMER_ENTER
#define SYSVIEW_EVTID_TIMER_EXIT
#define SYSVIEW_EVTID_STACK_INFO
#define SYSVIEW_EVTID_MODULEDESC
#define SYSVIEW_EVTID_INIT
#define SYSVIEW_EVTID_NAME_RESOURCE
#define SYSVIEW_EVTID_PRINT_FORMATTED
#define SYSVIEW_EVTID_NUMMODULES
#define SYSVIEW_EVTID_END_CALL
#define SYSVIEW_EVTID_TASK_TERMINATE
#define SYSVIEW_EVTID_EX
#define SYSVIEW_EVTID_EX_MARK
#define SYSVIEW_EVTID_EX_NAME_MARKER
#define SYSVIEW_EVTID_EX_HEAP_DEFINE
#define SYSVIEW_EVTID_EX_HEAP_ALLOC
#define SYSVIEW_EVTID_EX_HEAP_ALLOC_EX
#define SYSVIEW_EVTID_EX_HEAP_FREE
#define SYSVIEW_EVTMASK_NOP
#define SYSVIEW_EVTMASK_OVERFLOW
#define SYSVIEW_EVTMASK_ISR_ENTER
#define SYSVIEW_EVTMASK_ISR_EXIT
#define SYSVIEW_EVTMASK_TASK_START_EXEC
#define SYSVIEW_EVTMASK_TASK_STOP_EXEC
#define SYSVIEW_EVTMASK_TASK_START_READY
#define SYSVIEW_EVTMASK_TASK_STOP_READY
#define SYSVIEW_EVTMASK_TASK_CREATE
#define SYSVIEW_EVTMASK_TASK_INFO
#define SYSVIEW_EVTMASK_TRACE_START
#define SYSVIEW_EVTMASK_TRACE_STOP
#define SYSVIEW_EVTMASK_SYSTIME_CYCLES
#define SYSVIEW_EVTMASK_SYSTIME_US
#define SYSVIEW_EVTMASK_SYSDESC
#define SYSVIEW_EVTMASK_USER_START
#define SYSVIEW_EVTMASK_USER_STOP
#define SYSVIEW_EVTMASK_IDLE
#define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER
#define SYSVIEW_EVTMASK_TIMER_ENTER
#define SYSVIEW_EVTMASK_TIMER_EXIT
#define SYSVIEW_EVTMASK_STACK_INFO
#define SYSVIEW_EVTMASK_MODULEDESC
#define SYSVIEW_EVTMASK_INIT
#define SYSVIEW_EVTMASK_NAME_RESOURCE
#define SYSVIEW_EVTMASK_PRINT_FORMATTED
#define SYSVIEW_EVTMASK_NUMMODULES
#define SYSVIEW_EVTMASK_END_CALL
#define SYSVIEW_EVTMASK_TASK_TERMINATE
#define SYSVIEW_EVTMASK_EX
SEGGER_SYSVIEW_TASKINFO
SEGGER_SYSVIEW_MODULE_STRUCT
SEGGER_SYSVIEW_MODULE_STRUCT
SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC
#define EXTERN
#define EXTERN
SEGGER_SYSVIEW_TickCnt;
SEGGER_SYSVIEW_InterruptId;
SEGGER_SYSVIEW_OS_API
SEGGER_SYSVIEW_Init(unsigned long, unsigned long, const SEGGER_SYSVIEW_OS_API *, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC *);
SEGGER_SYSVIEW_SetRAMBase(unsigned long);
SEGGER_SYSVIEW_Start();
SEGGER_SYSVIEW_Stop();
SEGGER_SYSVIEW_GetSysDesc();
SEGGER_SYSVIEW_SendTaskList();
SEGGER_SYSVIEW_SendTaskInfo(const SEGGER_SYSVIEW_TASKINFO *);
SEGGER_SYSVIEW_SendSysDesc(const char *);
SEGGER_SYSVIEW_IsStarted();
SEGGER_SYSVIEW_GetChannelID();
SEGGER_SYSVIEW_Started();
SEGGER_SYSVIEW_RecordVoid(unsigned int);
SEGGER_SYSVIEW_RecordU32(unsigned int, unsigned long);
SEGGER_SYSVIEW_RecordU32x2(unsigned int, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x3(unsigned int, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x4(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x5(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x6(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x7(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x8(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x9(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordU32x10(unsigned int, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
SEGGER_SYSVIEW_RecordString(unsigned int, const char *);
SEGGER_SYSVIEW_RecordSystime();
SEGGER_SYSVIEW_RecordEnterISR(unsigned long);
SEGGER_SYSVIEW_RecordExitISR();
SEGGER_SYSVIEW_RecordExitISRToScheduler();
SEGGER_SYSVIEW_RecordEnterTimer(unsigned long);
SEGGER_SYSVIEW_RecordExitTimer();
SEGGER_SYSVIEW_RecordEndCall(unsigned int);
SEGGER_SYSVIEW_RecordEndCallU32(unsigned int, unsigned long);
SEGGER_SYSVIEW_OnIdle();
SEGGER_SYSVIEW_OnTaskCreate(unsigned long);
SEGGER_SYSVIEW_OnTaskTerminate(unsigned long);
SEGGER_SYSVIEW_OnTaskStartExec(unsigned long);
SEGGER_SYSVIEW_OnTaskStopExec();
SEGGER_SYSVIEW_OnTaskStartReady(unsigned long);
SEGGER_SYSVIEW_OnTaskStopReady(unsigned long, unsigned int);
SEGGER_SYSVIEW_MarkStart(unsigned int);
SEGGER_SYSVIEW_MarkStop(unsigned int);
SEGGER_SYSVIEW_Mark(unsigned int);
SEGGER_SYSVIEW_NameMarker(unsigned int, const char *);
SEGGER_SYSVIEW_HeapDefine(void *, void *, unsigned int, unsigned int);
SEGGER_SYSVIEW_HeapAlloc(void *, void *, unsigned int);
SEGGER_SYSVIEW_HeapAllocEx(void *, void *, unsigned int, unsigned int);
SEGGER_SYSVIEW_HeapFree(void *, void *);
SEGGER_SYSVIEW_NameResource(unsigned long, const char *);
SEGGER_SYSVIEW_SendPacket(unsigned char *, unsigned char *, unsigned int);
SEGGER_SYSVIEW_EncodeU32(unsigned char *, unsigned long);
SEGGER_SYSVIEW_EncodeData(unsigned char *, const char *, unsigned int);
SEGGER_SYSVIEW_EncodeString(unsigned char *, const char *, unsigned int);
SEGGER_SYSVIEW_EncodeId(unsigned char *, unsigned long);
SEGGER_SYSVIEW_ShrinkId(unsigned long);
SEGGER_SYSVIEW_RegisterModule(SEGGER_SYSVIEW_MODULE *);
SEGGER_SYSVIEW_RecordModuleDescription(const SEGGER_SYSVIEW_MODULE *, const char *);
SEGGER_SYSVIEW_SendModule(unsigned char);
SEGGER_SYSVIEW_SendModuleDescription();
SEGGER_SYSVIEW_SendNumModules();
SEGGER_SYSVIEW_PrintfHostEx(const char *, unsigned long, ...);
SEGGER_SYSVIEW_PrintfTargetEx(const char *, unsigned long, ...);
SEGGER_SYSVIEW_PrintfHost(const char *, ...);
SEGGER_SYSVIEW_PrintfTarget(const char *, ...);
SEGGER_SYSVIEW_WarnfHost(const char *, ...);
SEGGER_SYSVIEW_WarnfTarget(const char *, ...);
SEGGER_SYSVIEW_ErrorfHost(const char *, ...);
SEGGER_SYSVIEW_ErrorfTarget(const char *, ...);
SEGGER_SYSVIEW_Print(const char *);
SEGGER_SYSVIEW_Warn(const char *);
SEGGER_SYSVIEW_Error(const char *);
SEGGER_SYSVIEW_EnableEvents(unsigned long);
SEGGER_SYSVIEW_DisableEvents(unsigned long);
SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_X_GetTimestamp();
SEGGER_SYSVIEW_X_GetInterruptId();
SEGGER_SYSVIEW_X_StartComm();
SEGGER_SYSVIEW_X_OnEventRecorded(unsigned int);
#define SEGGER_SYSVIEW_OnUserStart
#define SEGGER_SYSVIEW_OnUserStop
Files
loading (4/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/app_trace/sys_view/SEGGER/SEGGER_SYSVIEW.h
 
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH * * SPDX-License-Identifier: BSD-1-Clause * * SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD *//* ... */ /********************************************************************* * SEGGER Microcontroller GmbH * * The Embedded Experts * ********************************************************************** * * * (c) 1995 - 2021 SEGGER Microcontroller GmbH * * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * * SEGGER SystemView * Real-time application analysis * * * ********************************************************************** * * * All rights reserved. * * * * SEGGER strongly recommends to not make any changes * * to or modify the source code of this software in order to stay * * compatible with the SystemView and RTT protocol, and J-Link. * * * * Redistribution and use in source and binary forms, with or * * without modification, are permitted provided that the following * * condition is met: * * * * o Redistributions of source code must retain the above copyright * * notice, this condition and the following disclaimer. * * * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * * DAMAGE. * * * ********************************************************************** * * * SystemView version: 3.42 * * * ********************************************************************** -------------------------- END-OF-HEADER ----------------------------- File : SEGGER_SYSVIEW.h Purpose : System visualization API. Revision: $Rev: 28237 $ *//* ... */ #ifndef SEGGER_SYSVIEW_H #define SEGGER_SYSVIEW_H /********************************************************************* * * #include Section * ********************************************************************** *//* ... */ #include "SEGGER.h" #include "SEGGER_SYSVIEW_ConfDefaults.h" #ifdef __cplusplus extern "C" { #endif /********************************************************************* * * Defines, fixed * ********************************************************************** *//* ... */ #define SEGGER_SYSVIEW_MAJOR 3 #define SEGGER_SYSVIEW_MINOR 32 #define SEGGER_SYSVIEW_REV 0 #define SEGGER_SYSVIEW_VERSION ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV) #define SEGGER_SYSVIEW_INFO_SIZE 9 // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2 byte of payload length, 1-5 bytes of timestamp. #define SEGGER_SYSVIEW_QUANTA_U32 5 // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet. #define SEGGER_SYSVIEW_LOG (0u) #define SEGGER_SYSVIEW_WARNING (1u) #define SEGGER_SYSVIEW_ERROR (2u) #define SEGGER_SYSVIEW_FLAG_APPEND (1u << 6) #define SEGGER_SYSVIEW_PREPARE_PACKET(p) (p) + 4 // // SystemView events. First 32 IDs from 0 .. 31 are reserved for these // #define SYSVIEW_EVTID_NOP 0 // Dummy packet. #define SYSVIEW_EVTID_OVERFLOW 1 #define SYSVIEW_EVTID_ISR_ENTER 2 #define SYSVIEW_EVTID_ISR_EXIT 3 #define SYSVIEW_EVTID_TASK_START_EXEC 4 #define SYSVIEW_EVTID_TASK_STOP_EXEC 5 #define SYSVIEW_EVTID_TASK_START_READY 6 #define SYSVIEW_EVTID_TASK_STOP_READY 7 #define SYSVIEW_EVTID_TASK_CREATE 8 #define SYSVIEW_EVTID_TASK_INFO 9 #define SYSVIEW_EVTID_TRACE_START 10 #define SYSVIEW_EVTID_TRACE_STOP 11 #define SYSVIEW_EVTID_SYSTIME_CYCLES 12 #define SYSVIEW_EVTID_SYSTIME_US 13 #define SYSVIEW_EVTID_SYSDESC 14 #define SYSVIEW_EVTID_MARK_START 15 #define SYSVIEW_EVTID_MARK_STOP 16 #define SYSVIEW_EVTID_IDLE 17 #define SYSVIEW_EVTID_ISR_TO_SCHEDULER 18 #define SYSVIEW_EVTID_TIMER_ENTER 19 #define SYSVIEW_EVTID_TIMER_EXIT 20 #define SYSVIEW_EVTID_STACK_INFO 21 #define SYSVIEW_EVTID_MODULEDESC 22 #define SYSVIEW_EVTID_INIT 24 #define SYSVIEW_EVTID_NAME_RESOURCE 25 #define SYSVIEW_EVTID_PRINT_FORMATTED 26 #define SYSVIEW_EVTID_NUMMODULES 27 #define SYSVIEW_EVTID_END_CALL 28 #define SYSVIEW_EVTID_TASK_TERMINATE 29 #define SYSVIEW_EVTID_EX 31 // // SystemView extended events. Sent with ID 31. // #define SYSVIEW_EVTID_EX_MARK 0 #define SYSVIEW_EVTID_EX_NAME_MARKER 1 #define SYSVIEW_EVTID_EX_HEAP_DEFINE 2 #define SYSVIEW_EVTID_EX_HEAP_ALLOC 3 #define SYSVIEW_EVTID_EX_HEAP_ALLOC_EX 4 #define SYSVIEW_EVTID_EX_HEAP_FREE 5 // // Event masks to disable/enable events // #define SYSVIEW_EVTMASK_NOP (1 << SYSVIEW_EVTID_NOP) #define SYSVIEW_EVTMASK_OVERFLOW (1 << SYSVIEW_EVTID_OVERFLOW) #define SYSVIEW_EVTMASK_ISR_ENTER (1 << SYSVIEW_EVTID_ISR_ENTER) #define SYSVIEW_EVTMASK_ISR_EXIT (1 << SYSVIEW_EVTID_ISR_EXIT) #define SYSVIEW_EVTMASK_TASK_START_EXEC (1 << SYSVIEW_EVTID_TASK_START_EXEC) #define SYSVIEW_EVTMASK_TASK_STOP_EXEC (1 << SYSVIEW_EVTID_TASK_STOP_EXEC) #define SYSVIEW_EVTMASK_TASK_START_READY (1 << SYSVIEW_EVTID_TASK_START_READY) #define SYSVIEW_EVTMASK_TASK_STOP_READY (1 << SYSVIEW_EVTID_TASK_STOP_READY) #define SYSVIEW_EVTMASK_TASK_CREATE (1 << SYSVIEW_EVTID_TASK_CREATE) #define SYSVIEW_EVTMASK_TASK_INFO (1 << SYSVIEW_EVTID_TASK_INFO) #define SYSVIEW_EVTMASK_TRACE_START (1 << SYSVIEW_EVTID_TRACE_START) #define SYSVIEW_EVTMASK_TRACE_STOP (1 << SYSVIEW_EVTID_TRACE_STOP) #define SYSVIEW_EVTMASK_SYSTIME_CYCLES (1 << SYSVIEW_EVTID_SYSTIME_CYCLES) #define SYSVIEW_EVTMASK_SYSTIME_US (1 << SYSVIEW_EVTID_SYSTIME_US) #define SYSVIEW_EVTMASK_SYSDESC (1 << SYSVIEW_EVTID_SYSDESC) #define SYSVIEW_EVTMASK_USER_START (1 << SYSVIEW_EVTID_USER_START) #define SYSVIEW_EVTMASK_USER_STOP (1 << SYSVIEW_EVTID_USER_STOP) #define SYSVIEW_EVTMASK_IDLE (1 << SYSVIEW_EVTID_IDLE) #define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER) #define SYSVIEW_EVTMASK_TIMER_ENTER (1 << SYSVIEW_EVTID_TIMER_ENTER) #define SYSVIEW_EVTMASK_TIMER_EXIT (1 << SYSVIEW_EVTID_TIMER_EXIT) #define SYSVIEW_EVTMASK_STACK_INFO (1 << SYSVIEW_EVTID_STACK_INFO) #define SYSVIEW_EVTMASK_MODULEDESC (1 << SYSVIEW_EVTID_MODULEDESC) #define SYSVIEW_EVTMASK_INIT (1 << SYSVIEW_EVTID_INIT) #define SYSVIEW_EVTMASK_NAME_RESOURCE (1 << SYSVIEW_EVTID_NAME_RESOURCE) #define SYSVIEW_EVTMASK_PRINT_FORMATTED (1 << SYSVIEW_EVTID_PRINT_FORMATTED) #define SYSVIEW_EVTMASK_NUMMODULES (1 << SYSVIEW_EVTID_NUMMODULES) #define SYSVIEW_EVTMASK_END_CALL (1 << SYSVIEW_EVTID_END_CALL) #define SYSVIEW_EVTMASK_TASK_TERMINATE (1 << SYSVIEW_EVTID_TASK_TERMINATE) #define SYSVIEW_EVTMASK_EX (1 << SYSVIEW_EVTID_EX) #define SYSVIEW_EVTMASK_ALL_INTERRUPTS ( SYSVIEW_EVTMASK_ISR_ENTER \ | SYSVIEW_EVTMASK_ISR_EXIT \ | SYSVIEW_EVTMASK_ISR_TO_SCHEDULER)... #define SYSVIEW_EVTMASK_ALL_TASKS ( SYSVIEW_EVTMASK_TASK_START_EXEC \ | SYSVIEW_EVTMASK_TASK_STOP_EXEC \ | SYSVIEW_EVTMASK_TASK_START_READY \ | SYSVIEW_EVTMASK_TASK_STOP_READY \ | SYSVIEW_EVTMASK_TASK_CREATE \ | SYSVIEW_EVTMASK_TASK_INFO \ | SYSVIEW_EVTMASK_STACK_INFO \ | SYSVIEW_EVTMASK_TASK_TERMINATE)... 79 defines /********************************************************************* * * Structures * ********************************************************************** *//* ... */ typedef struct { U32 TaskID; const char* sName; U32 Prio; U32 StackBase; U32 StackSize; }{ ... } SEGGER_SYSVIEW_TASKINFO; typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE; struct SEGGER_SYSVIEW_MODULE_STRUCT { const char* sModule; U32 NumEvents; U32 EventOffset; void (*pfSendModuleDesc)(void); SEGGER_SYSVIEW_MODULE* pNext; }{ ... }; typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void); /********************************************************************* * * Global data * ********************************************************************** *//* ... */ #ifdef EXTERN #undef EXTERN #endif #ifndef SEGGER_SYSVIEW_C // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files #define EXTERN extern #else #define EXTERN #endif EXTERN unsigned int SEGGER_SYSVIEW_TickCnt; EXTERN unsigned int SEGGER_SYSVIEW_InterruptId; #undef EXTERN /********************************************************************* * * API functions * ********************************************************************** *//* ... */ typedef struct { U64 (*pfGetTime) (void); void (*pfSendTaskList) (void); }{ ... } SEGGER_SYSVIEW_OS_API; /********************************************************************* * * Control and initialization functions *//* ... */ void SEGGER_SYSVIEW_Init (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc); void SEGGER_SYSVIEW_SetRAMBase (U32 RAMBaseAddress); void SEGGER_SYSVIEW_Start (void); void SEGGER_SYSVIEW_Stop (void); void SEGGER_SYSVIEW_GetSysDesc (void); void SEGGER_SYSVIEW_SendTaskList (void); void SEGGER_SYSVIEW_SendTaskInfo (const SEGGER_SYSVIEW_TASKINFO* pInfo); void SEGGER_SYSVIEW_SendSysDesc (const char* sSysDesc); int SEGGER_SYSVIEW_IsStarted (void); int SEGGER_SYSVIEW_GetChannelID (void); // Checks whether tracing has been started U8 SEGGER_SYSVIEW_Started(void); /********************************************************************* * * Event recording functions *//* ... */ void SEGGER_SYSVIEW_RecordVoid (unsigned int EventId); void SEGGER_SYSVIEW_RecordU32 (unsigned int EventId, U32 Para0); void SEGGER_SYSVIEW_RecordU32x2 (unsigned int EventId, U32 Para0, U32 Para1); void SEGGER_SYSVIEW_RecordU32x3 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2); void SEGGER_SYSVIEW_RecordU32x4 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3); void SEGGER_SYSVIEW_RecordU32x5 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); void SEGGER_SYSVIEW_RecordU32x6 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5); void SEGGER_SYSVIEW_RecordU32x7 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6); void SEGGER_SYSVIEW_RecordU32x8 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7); void SEGGER_SYSVIEW_RecordU32x9 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8); void SEGGER_SYSVIEW_RecordU32x10 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9); void SEGGER_SYSVIEW_RecordString (unsigned int EventId, const char* pString); void SEGGER_SYSVIEW_RecordSystime (void); void SEGGER_SYSVIEW_RecordEnterISR (U32 IrqId); void SEGGER_SYSVIEW_RecordExitISR (void); void SEGGER_SYSVIEW_RecordExitISRToScheduler (void); void SEGGER_SYSVIEW_RecordEnterTimer (U32 TimerId); void SEGGER_SYSVIEW_RecordExitTimer (void); void SEGGER_SYSVIEW_RecordEndCall (unsigned int EventID); void SEGGER_SYSVIEW_RecordEndCallU32 (unsigned int EventID, U32 Para0); void SEGGER_SYSVIEW_OnIdle (void); void SEGGER_SYSVIEW_OnTaskCreate (U32 TaskId); void SEGGER_SYSVIEW_OnTaskTerminate (U32 TaskId); void SEGGER_SYSVIEW_OnTaskStartExec (U32 TaskId); void SEGGER_SYSVIEW_OnTaskStopExec (void); void SEGGER_SYSVIEW_OnTaskStartReady (U32 TaskId); void SEGGER_SYSVIEW_OnTaskStopReady (U32 TaskId, unsigned int Cause); void SEGGER_SYSVIEW_MarkStart (unsigned int MarkerId); void SEGGER_SYSVIEW_MarkStop (unsigned int MarkerId); void SEGGER_SYSVIEW_Mark (unsigned int MarkerId); void SEGGER_SYSVIEW_NameMarker (unsigned int MarkerId, const char* sName); void SEGGER_SYSVIEW_HeapDefine (void* pHeap, void* pBase, unsigned int HeapSize, unsigned int MetadataSize); void SEGGER_SYSVIEW_HeapAlloc (void* pHeap, void* pUserData, unsigned int UserDataLen); void SEGGER_SYSVIEW_HeapAllocEx (void* pHeap, void* pUserData, unsigned int UserDataLen, unsigned int Tag); void SEGGER_SYSVIEW_HeapFree (void* pHeap, void* pUserData); void SEGGER_SYSVIEW_NameResource (U32 ResourceId, const char* sName); int SEGGER_SYSVIEW_SendPacket (U8* pPacket, U8* pPayloadEnd, unsigned int EventId); /********************************************************************* * * Event parameter encoding functions *//* ... */ U8* SEGGER_SYSVIEW_EncodeU32 (U8* pPayload, U32 Value); U8* SEGGER_SYSVIEW_EncodeData (U8* pPayload, const char* pSrc, unsigned int Len); U8* SEGGER_SYSVIEW_EncodeString (U8* pPayload, const char* s, unsigned int MaxLen); U8* SEGGER_SYSVIEW_EncodeId (U8* pPayload, U32 Id); U32 SEGGER_SYSVIEW_ShrinkId (U32 Id); /********************************************************************* * * Middleware module registration *//* ... */ void SEGGER_SYSVIEW_RegisterModule (SEGGER_SYSVIEW_MODULE* pModule); void SEGGER_SYSVIEW_RecordModuleDescription (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription); void SEGGER_SYSVIEW_SendModule (U8 ModuleId); void SEGGER_SYSVIEW_SendModuleDescription (void); void SEGGER_SYSVIEW_SendNumModules (void); /********************************************************************* * * printf-Style functions *//* ... */ #ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...); void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...); void SEGGER_SYSVIEW_PrintfHost (const char* s, ...); void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...); void SEGGER_SYSVIEW_WarnfHost (const char* s, ...); void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...); void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...); void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...);/* ... */ #endif void SEGGER_SYSVIEW_Print (const char* s); void SEGGER_SYSVIEW_Warn (const char* s); void SEGGER_SYSVIEW_Error (const char* s); /********************************************************************* * * Run-time configuration functions *//* ... */ void SEGGER_SYSVIEW_EnableEvents (U32 EnableMask); void SEGGER_SYSVIEW_DisableEvents (U32 DisableMask); /********************************************************************* * * Application-provided functions *//* ... */ void SEGGER_SYSVIEW_Conf (void); U32 SEGGER_SYSVIEW_X_GetTimestamp (void); U32 SEGGER_SYSVIEW_X_GetInterruptId (void); void SEGGER_SYSVIEW_X_StartComm (void); void SEGGER_SYSVIEW_X_OnEventRecorded (unsigned NumBytes); #ifdef __cplusplus }{...} #endif /********************************************************************* * * Compatibility API defines *//* ... */ #define SEGGER_SYSVIEW_OnUserStart SEGGER_SYSVIEW_MarkStart #define SEGGER_SYSVIEW_OnUserStop SEGGER_SYSVIEW_MarkStop /* ... */ #endif /*************************** End of file ****************************/
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.