]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/trcConfig.h
Added +TCP code to main repo.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / trcConfig.h
1 /*******************************************************************************\r
2  * Trace Recorder Library for Tracealyzer v3.1.2\r
3  * Percepio AB, www.percepio.com\r
4  *\r
5  * trcConfig.h\r
6  *\r
7  * Main configuration parameters for the trace recorder library.\r
8  * More settings can be found in trcStreamingConfig.h and trcSnapshotConfig.h.\r
9  *\r
10  * Read more at http://percepio.com/2016/10/05/rtos-tracing/\r
11  *\r
12  * Terms of Use\r
13  * This file is part of the trace recorder library (RECORDER), which is the\r
14  * intellectual property of Percepio AB (PERCEPIO) and provided under a\r
15  * license as follows.\r
16  * The RECORDER may be used free of charge for the purpose of recording data\r
17  * intended for analysis in PERCEPIO products. It may not be used or modified\r
18  * for other purposes without explicit permission from PERCEPIO.\r
19  * You may distribute the RECORDER in its original source code form, assuming\r
20  * this text (terms of use, disclaimer, copyright notice) is unchanged. You are\r
21  * allowed to distribute the RECORDER with minor modifications intended for\r
22  * configuration or porting of the RECORDER, e.g., to allow using it on a\r
23  * specific processor, processor family or with a specific communication\r
24  * interface. Any such modifications should be documented directly below\r
25  * this comment block.\r
26  *\r
27  * Disclaimer\r
28  * The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty\r
29  * as to its use or performance. PERCEPIO does not and cannot warrant the\r
30  * performance or results you may obtain by using the RECORDER or documentation.\r
31  * PERCEPIO make no warranties, express or implied, as to noninfringement of\r
32  * third party rights, merchantability, or fitness for any particular purpose.\r
33  * In no event will PERCEPIO, its technology partners, or distributors be liable\r
34  * to you for any consequential, incidental or special damages, including any\r
35  * lost profits or lost savings, even if a representative of PERCEPIO has been\r
36  * advised of the possibility of such damages, or for any claim by any third\r
37  * party. Some jurisdictions do not allow the exclusion or limitation of\r
38  * incidental, consequential or special damages, or the exclusion of implied\r
39  * warranties or limitations on how long an implied warranty may last, so the\r
40  * above limitations may not apply to you.\r
41  *\r
42  * Tabs are used for indent in this file (1 tab = 4 spaces)\r
43  *\r
44  * Copyright Percepio AB, 2016.\r
45  * www.percepio.com\r
46  ******************************************************************************/\r
47 \r
48 #ifndef TRC_CONFIG_H\r
49 #define TRC_CONFIG_H\r
50 \r
51 #ifdef __cplusplus\r
52 extern "C" {\r
53 #endif\r
54 \r
55 #include "trcPortDefines.h"\r
56 \r
57 /******************************************************************************\r
58  * Include of processor header file\r
59  *\r
60  * Here you may need to include the header file for your processor. This is\r
61  * required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.\r
62  * Try that in case of build problems. Otherwise, remove the #error line below.\r
63  *****************************************************************************/\r
64 //#error "Trace Recorder: Please include your processor's header file here and remove this line."\r
65 #include "lpc18xx.h"\r
66 \r
67 /*******************************************************************************\r
68  * Configuration Macro: TRC_CFG_HARDWARE_PORT\r
69  *\r
70  * Specify what hardware port to use (i.e., the "timestamping driver").\r
71  *\r
72  * All ARM Cortex-M MCUs are supported by "TRC_HARDWARE_PORT_ARM_Cortex_M".\r
73  * This port uses the DWT cycle counter for Cortex-M3/M4/M7 devices, which is\r
74  * available on most such devices. In case your device don't have DWT support,\r
75  * you will get an error message opening the trace. In that case, you may\r
76  * force the recorder to use SysTick timestamping instead, using this define:\r
77  *\r
78  * #define TRC_CFG_ARM_CM_USE_SYSTICK\r
79  *\r
80  * For ARM Cortex-M0/M0+ devices, SysTick mode is used automatically.\r
81  *\r
82  * See trcHardwarePort.h for available ports and information on how to\r
83  * define your own port, if not already present.\r
84  ******************************************************************************/\r
85 #define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_ARM_Cortex_M\r
86 \r
87 /*******************************************************************************\r
88  * Configuration Macro: TRC_CFG_RECORDER_MODE\r
89  *\r
90  * Specify what recording mode to use. Snapshot means that the data is saved in\r
91  * an internal RAM buffer, for later upload. Streaming means that the data is\r
92  * transferred continuously to the host PC.\r
93  *\r
94  * For more information, see http://percepio.com/2016/10/05/rtos-tracing/\r
95  * and the Tracealyzer User Manual.\r
96  *\r
97  * Values:\r
98  * TRC_RECORDER_MODE_SNAPSHOT\r
99  * TRC_RECORDER_MODE_STREAMING\r
100  ******************************************************************************/\r
101 #define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT\r
102 \r
103 /*******************************************************************************\r
104  * Configuration Macro: TRC_CFG_RECORDER_BUFFER_ALLOCATION\r
105  *\r
106  * Specifies how the recorder buffer is allocated (also in case of streaming, in\r
107  * port using the recorder's internal temporary buffer)\r
108  *\r
109  * Values:\r
110  * TRC_RECORDER_BUFFER_ALLOCATION_STATIC  - Static allocation (internal)\r
111  * TRC_RECORDER_BUFFER_ALLOCATION_DYNAMIC - Malloc in vTraceEnable\r
112  * TRC_RECORDER_BUFFER_ALLOCATION_CUSTOM  - Use vTraceSetRecorderDataBuffer\r
113  *\r
114  * Static and dynamic mode does the allocation for you, either in compile time\r
115  * (static) or in runtime (malloc).\r
116  * The custom mode allows you to control how and where the allocation is made,\r
117  * for details see TRC_ALLOC_CUSTOM_BUFFER and vTraceSetRecorderDataBuffer().\r
118  ******************************************************************************/\r
119 #define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC\r
120 \r
121 /******************************************************************************\r
122  * TRC_CFG_FREERTOS_VERSION\r
123  *\r
124  * Specify what version of FreeRTOS that is used (don't change unless using the\r
125  * trace recorder library with an older version of FreeRTOS).\r
126  *\r
127  * TRC_FREERTOS_VERSION_7_3_OR_7_4                              If using FreeRTOS v7.3.0 - v7.4.2\r
128  * TRC_FREERTOS_VERSION_7_5_OR_7_6                              If using FreeRTOS v7.5.0 - v7.6.0\r
129  * TRC_FREERTOS_VERSION_8_X                                             If using FreeRTOS v8.X.X\r
130  * TRC_FREERTOS_VERSION_9_X                                             If using FreeRTOS v9.X.X\r
131  *****************************************************************************/\r
132 #define TRC_CFG_FREERTOS_VERSION        TRC_FREERTOS_VERSION_9_X\r
133 \r
134 /******************************************************************************\r
135  * TRC_CFG_MAX_ISR_NESTING\r
136  *\r
137  * Defines how many levels of interrupt nesting the recorder can handle, in\r
138  * case multiple ISRs are traced and ISR nesting is possible. If this\r
139  * is exceeded, the particular ISR will not be traced and the recorder then\r
140  * logs an error message. This setting is used to allocate an internal stack\r
141  * for keeping track of the previous execution context (4 byte per entry).\r
142  *\r
143  * This value must be a non-zero positive constant, at least 1.\r
144  *\r
145  * Default value: 8\r
146  *****************************************************************************/\r
147 #define TRC_CFG_MAX_ISR_NESTING 8\r
148 \r
149 /* Specific configuration, depending on Streaming/Snapshot mode */\r
150 #if (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_SNAPSHOT)\r
151 #include "trcSnapshotConfig.h"\r
152 #elif (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING)\r
153 #include "trcStreamingConfig.h"\r
154 #endif\r
155 \r
156 #ifdef __cplusplus\r
157 }\r
158 #endif\r
159 \r
160 #endif /* _TRC_CONFIG_H */\r