1 /*
2  * Trace Recorder for Tracealyzer v4.5.1
3  * Copyright 2021 Percepio AB
4  * www.percepio.com
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Configuration parameters for the trace recorder library in streaming mode.
9  * Read more at http://percepio.com/2016/10/05/rtos-tracing/
10  */
11 
12 #ifndef TRC_STREAMING_CONFIG_H
13 #define TRC_STREAMING_CONFIG_H
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /*******************************************************************************
20  * Configuration Macro: TRC_CFG_SYMBOL_TABLE_SLOTS
21  *
22  * The maximum number of symbols names that can be stored. This includes:
23  * - Task names
24  * - Named ISRs (vTraceSetISRProperties)
25  * - Named kernel objects (vTraceStoreKernelObjectName)
26  * - User event channels (xTraceRegisterString)
27  *
28  * If this value is too small, not all symbol names will be stored and the
29  * trace display will be affected. In that case, there will be warnings
30  * (as User Events) from TzCtrl task, that monitors this.
31  ******************************************************************************/
32 #define TRC_CFG_SYMBOL_TABLE_SLOTS 30
33 
34 /*******************************************************************************
35  * Configuration Macro: TRC_CFG_SYMBOL_MAX_LENGTH
36  *
37  * The maximum length of symbol names, including:
38  * - Task names
39  * - Named ISRs (vTraceSetISRProperties)
40  * - Named kernel objects (vTraceStoreKernelObjectName)
41  * - User event channel names (xTraceRegisterString)
42  *
43  * If longer symbol names are used, they will be truncated by the recorder,
44  * which will affect the trace display. In that case, there will be warnings
45  * (as User Events) from TzCtrl task, that monitors this.
46  ******************************************************************************/
47 #define TRC_CFG_SYMBOL_MAX_LENGTH 25
48 
49 /*******************************************************************************
50  * Configuration Macro: TRC_CFG_OBJECT_DATA_SLOTS
51  *
52  * The maximum number of object data entries (used for task priorities) that can
53  * be stored at the same time. Must be sufficient for all tasks, otherwise there
54  * will be warnings (as User Events) from TzCtrl task, that monitors this.
55  ******************************************************************************/
56 #define TRC_CFG_OBJECT_DATA_SLOTS 20
57 
58 /*******************************************************************************
59  * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT
60  *
61  * Specifies the number of pages used by the paged event buffer.
62  * This may need to be increased if there are a lot of missed events.
63  *
64  * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead)
65  ******************************************************************************/
66 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT 12
67 
68 /*******************************************************************************
69  * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE
70  *
71  * Specifies the size of each page in the paged event buffer. This can be tuned
72  * to match any internal low-level buffers used by the streaming interface, like
73  * the Ethernet MTU (Maximum Transmission Unit).
74  *
75  * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead)
76  ******************************************************************************/
77 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE 2500
78 
79 /*******************************************************************************
80  * TRC_CFG_ISR_TAILCHAINING_THRESHOLD
81  *
82  * Macro which should be defined as an integer value.
83  *
84  * If tracing multiple ISRs, this setting allows for accurate display of the
85  * context-switching also in cases when the ISRs execute in direct sequence.
86  *
87  * vTraceStoreISREnd normally assumes that the ISR returns to the previous
88  * context, i.e., a task or a preempted ISR. But if another traced ISR
89  * executes in direct sequence, Tracealyzer may incorrectly display a minimal
90  * fragment of the previous context in between the ISRs.
91  *
92  * By using TRC_CFG_ISR_TAILCHAINING_THRESHOLD you can avoid this. This is
93  * however a threshold value that must be measured for your specific setup.
94  * See http://percepio.com/2014/03/21/isr_tailchaining_threshold/
95  *
96  * The default setting is 0, meaning "disabled" and that you may get an
97  * extra fragments of the previous context in between tail-chained ISRs.
98  *
99  * Note: This setting has separate definitions in trcSnapshotConfig.h and
100  * trcStreamingConfig.h, since it is affected by the recorder mode.
101  ******************************************************************************/
102 #define TRC_CFG_ISR_TAILCHAINING_THRESHOLD 0
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* TRC_STREAMING_CONFIG_H */
109