]> git.sur5r.net Git - freertos/blob - FreeRTOS-Labs/Source/FreeRTOS-Plus-Trace/config/trcStreamingConfig.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Source / FreeRTOS-Plus-Trace / config / trcStreamingConfig.h
1 /*******************************************************************************\r
2  * Trace Recorder Library for Tracealyzer v4.1.4\r
3  * Percepio AB, www.percepio.com\r
4  *\r
5  * trcStreamingConfig.h\r
6  *\r
7  * Configuration parameters for the trace recorder library in streaming mode.\r
8  * Read more at http://percepio.com/2016/10/05/rtos-tracing/\r
9  *\r
10  * Terms of Use\r
11  * This file is part of the trace recorder library (RECORDER), which is the \r
12  * intellectual property of Percepio AB (PERCEPIO) and provided under a\r
13  * license as follows.\r
14  * The RECORDER may be used free of charge for the purpose of recording data\r
15  * intended for analysis in PERCEPIO products. It may not be used or modified\r
16  * for other purposes without explicit permission from PERCEPIO.\r
17  * You may distribute the RECORDER in its original source code form, assuming\r
18  * this text (terms of use, disclaimer, copyright notice) is unchanged. You are\r
19  * allowed to distribute the RECORDER with minor modifications intended for\r
20  * configuration or porting of the RECORDER, e.g., to allow using it on a \r
21  * specific processor, processor family or with a specific communication\r
22  * interface. Any such modifications should be documented directly below\r
23  * this comment block.  \r
24  *\r
25  * Disclaimer\r
26  * The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty\r
27  * as to its use or performance. PERCEPIO does not and cannot warrant the \r
28  * performance or results you may obtain by using the RECORDER or documentation.\r
29  * PERCEPIO make no warranties, express or implied, as to noninfringement of\r
30  * third party rights, merchantability, or fitness for any particular purpose.\r
31  * In no event will PERCEPIO, its technology partners, or distributors be liable\r
32  * to you for any consequential, incidental or special damages, including any\r
33  * lost profits or lost savings, even if a representative of PERCEPIO has been\r
34  * advised of the possibility of such damages, or for any claim by any third\r
35  * party. Some jurisdictions do not allow the exclusion or limitation of\r
36  * incidental, consequential or special damages, or the exclusion of implied\r
37  * warranties or limitations on how long an implied warranty may last, so the\r
38  * above limitations may not apply to you.\r
39  *\r
40  * Tabs are used for indent in this file (1 tab = 4 spaces)\r
41  *\r
42  * Copyright Percepio AB, 2018.\r
43  * www.percepio.com\r
44  ******************************************************************************/\r
45 \r
46 #ifndef TRC_STREAMING_CONFIG_H\r
47 #define TRC_STREAMING_CONFIG_H\r
48 \r
49 #ifdef __cplusplus\r
50 extern "C" {\r
51 #endif\r
52 \r
53 /*******************************************************************************\r
54  * Configuration Macro: TRC_CFG_SYMBOL_TABLE_SLOTS\r
55  *\r
56  * The maximum number of symbols names that can be stored. This includes:\r
57  * - Task names\r
58  * - Named ISRs (vTraceSetISRProperties)\r
59  * - Named kernel objects (vTraceStoreKernelObjectName)\r
60  * - User event channels (xTraceRegisterString)\r
61  *\r
62  * If this value is too small, not all symbol names will be stored and the\r
63  * trace display will be affected. In that case, there will be warnings\r
64  * (as User Events) from TzCtrl task, that monitors this.\r
65  ******************************************************************************/\r
66 #define TRC_CFG_SYMBOL_TABLE_SLOTS 40\r
67 \r
68 /*******************************************************************************\r
69  * Configuration Macro: TRC_CFG_SYMBOL_MAX_LENGTH\r
70  *\r
71  * The maximum length of symbol names, including:\r
72  * - Task names\r
73  * - Named ISRs (vTraceSetISRProperties)\r
74  * - Named kernel objects (vTraceStoreKernelObjectName)\r
75  * - User event channel names (xTraceRegisterString)\r
76  *\r
77  * If longer symbol names are used, they will be truncated by the recorder,\r
78  * which will affect the trace display. In that case, there will be warnings\r
79  * (as User Events) from TzCtrl task, that monitors this.\r
80  ******************************************************************************/\r
81 #define TRC_CFG_SYMBOL_MAX_LENGTH 25\r
82 \r
83 /*******************************************************************************\r
84  * Configuration Macro: TRC_CFG_OBJECT_DATA_SLOTS\r
85  *\r
86  * The maximum number of object data entries (used for task priorities) that can\r
87  * be stored at the same time. Must be sufficient for all tasks, otherwise there\r
88  * will be warnings (as User Events) from TzCtrl task, that monitors this.\r
89  ******************************************************************************/\r
90 #define TRC_CFG_OBJECT_DATA_SLOTS 40\r
91 \r
92 /*******************************************************************************\r
93  * Configuration Macro: TRC_CFG_CTRL_TASK_STACK_SIZE\r
94  *\r
95  * The stack size of the TzCtrl task, that receive commands.\r
96  * We are aiming to remove this extra task in future versions.\r
97  ******************************************************************************/\r
98 #define TRC_CFG_CTRL_TASK_STACK_SIZE (configMINIMAL_STACK_SIZE * 2)\r
99 \r
100 /*******************************************************************************\r
101  * Configuration Macro: TRC_CFG_CTRL_TASK_PRIORITY\r
102  *\r
103  * The priority of the TzCtrl task, that receive commands from Tracealyzer.\r
104  * Most stream ports also rely on the TzCtrl task to transmit the data from the\r
105  * internal buffer to the stream interface (all except for the J-Link port).\r
106  * For such ports, make sure the TzCtrl priority is high enough to ensure\r
107  * reliable periodic execution and transfer of the data.\r
108  ******************************************************************************/\r
109 #define TRC_CFG_CTRL_TASK_PRIORITY 1\r
110 \r
111 /*******************************************************************************\r
112  * Configuration Macro: TRC_CFG_CTRL_TASK_DELAY\r
113  *\r
114  * The delay between every loop of the TzCtrl task. A high delay will reduce the\r
115  * CPU load, but may cause missed events if the TzCtrl task is performing the \r
116  * trace transfer.\r
117  ******************************************************************************/\r
118 #define TRC_CFG_CTRL_TASK_DELAY ((10 * configTICK_RATE_HZ) / 1000)\r
119 \r
120 /*******************************************************************************\r
121  * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT\r
122  *\r
123  * Specifies the number of pages used by the paged event buffer.\r
124  * This may need to be increased if there are a lot of missed events.\r
125  *\r
126  * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead)\r
127  ******************************************************************************/\r
128 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT 2\r
129 \r
130 /*******************************************************************************\r
131  * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE\r
132  *\r
133  * Specifies the size of each page in the paged event buffer. This can be tuned \r
134  * to match any internal low-level buffers used by the streaming interface, like\r
135  * the Ethernet MTU (Maximum Transmission Unit).\r
136  *\r
137  * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead)\r
138  ******************************************************************************/\r
139 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE 2500\r
140 \r
141 /*******************************************************************************\r
142  * TRC_CFG_ISR_TAILCHAINING_THRESHOLD\r
143  *\r
144  * Macro which should be defined as an integer value.\r
145  *\r
146  * If tracing multiple ISRs, this setting allows for accurate display of the \r
147  * context-switching also in cases when the ISRs execute in direct sequence.\r
148  * \r
149  * vTraceStoreISREnd normally assumes that the ISR returns to the previous\r
150  * context, i.e., a task or a preempted ISR. But if another traced ISR \r
151  * executes in direct sequence, Tracealyzer may incorrectly display a minimal\r
152  * fragment of the previous context in between the ISRs.\r
153  *\r
154  * By using TRC_CFG_ISR_TAILCHAINING_THRESHOLD you can avoid this. This is \r
155  * however a threshold value that must be measured for your specific setup.\r
156  * See http://percepio.com/2014/03/21/isr_tailchaining_threshold/\r
157  *\r
158  * The default setting is 0, meaning "disabled" and that you may get an \r
159  * extra fragments of the previous context in between tail-chained ISRs.\r
160  *\r
161  * Note: This setting has separate definitions in trcSnapshotConfig.h and \r
162  * trcStreamingConfig.h, since it is affected by the recorder mode.\r
163  ******************************************************************************/\r
164 #define TRC_CFG_ISR_TAILCHAINING_THRESHOLD 0\r
165 \r
166 #ifdef __cplusplus\r
167 }\r
168 #endif\r
169 \r
170 #endif /* TRC_STREAMING_CONFIG_H */\r