]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/config/trcConfig.h
Update trace recorder code.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-Trace / config / trcConfig.h
index 598072c651d97f074965e5fb4835a944e8eb1653..ba6ddd29947640ce613dcd36d6a5d74f377be279 100644 (file)
@@ -1,5 +1,5 @@
-/*******************************************************************************\r
- * Trace Recorder Library for Tracealyzer v3.1.2\r
+/*******************************************************************************\r
+ * Trace Recorder Library for Tracealyzer v4.1.1\r
  * Percepio AB, www.percepio.com\r
  *\r
  * trcConfig.h\r
@@ -10,7 +10,7 @@
  * Read more at http://percepio.com/2016/10/05/rtos-tracing/\r
  *\r
  * Terms of Use\r
- * This file is part of the trace recorder library (RECORDER), which is the \r
+ * This file is part of the trace recorder library (RECORDER), which is the\r
  * intellectual property of Percepio AB (PERCEPIO) and provided under a\r
  * license as follows.\r
  * The RECORDER may be used free of charge for the purpose of recording data\r
  * You may distribute the RECORDER in its original source code form, assuming\r
  * this text (terms of use, disclaimer, copyright notice) is unchanged. You are\r
  * allowed to distribute the RECORDER with minor modifications intended for\r
- * configuration or porting of the RECORDER, e.g., to allow using it on a \r
+ * configuration or porting of the RECORDER, e.g., to allow using it on a\r
  * specific processor, processor family or with a specific communication\r
  * interface. Any such modifications should be documented directly below\r
- * this comment block.  \r
+ * this comment block.\r
  *\r
  * Disclaimer\r
  * The RECORDER is being delivered to you AS IS and PERCEPIO makes no warranty\r
- * as to its use or performance. PERCEPIO does not and cannot warrant the \r
+ * as to its use or performance. PERCEPIO does not and cannot warrant the\r
  * performance or results you may obtain by using the RECORDER or documentation.\r
  * PERCEPIO make no warranties, express or implied, as to noninfringement of\r
  * third party rights, merchantability, or fitness for any particular purpose.\r
  *\r
  * Tabs are used for indent in this file (1 tab = 4 spaces)\r
  *\r
- * Copyright Percepio AB, 2016.\r
+ * Copyright Percepio AB, 2018.\r
  * www.percepio.com\r
  ******************************************************************************/\r
\r
+\r
 #ifndef TRC_CONFIG_H\r
 #define TRC_CONFIG_H\r
 \r
@@ -56,8 +56,8 @@ extern "C" {
 \r
 /******************************************************************************\r
  * Include of processor header file\r
- * \r
- * Here you may need to include the header file for your processor. This is \r
+ *\r
+ * Here you may need to include the header file for your processor. This is\r
  * required at least for the ARM Cortex-M port, that uses the ARM CMSIS API.\r
  * Try that in case of build problems. Otherwise, remove the #error line below.\r
  *****************************************************************************/\r
@@ -71,14 +71,14 @@ extern "C" {
  * All ARM Cortex-M MCUs are supported by "TRC_HARDWARE_PORT_ARM_Cortex_M".\r
  * This port uses the DWT cycle counter for Cortex-M3/M4/M7 devices, which is\r
  * available on most such devices. In case your device don't have DWT support,\r
- * you will get an error message opening the trace. In that case, you may \r
+ * you will get an error message opening the trace. In that case, you may\r
  * force the recorder to use SysTick timestamping instead, using this define:\r
  *\r
  * #define TRC_CFG_ARM_CM_USE_SYSTICK\r
  *\r
  * For ARM Cortex-M0/M0+ devices, SysTick mode is used automatically.\r
  *\r
- * See trcHardwarePort.h for available ports and information on how to \r
+ * See trcHardwarePort.h for available ports and information on how to\r
  * define your own port, if not already present.\r
  ******************************************************************************/\r
 #define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_NOT_SET\r
@@ -88,7 +88,7 @@ extern "C" {
  *\r
  * Specify what recording mode to use. Snapshot means that the data is saved in\r
  * an internal RAM buffer, for later upload. Streaming means that the data is\r
- * transferred continuously to the host PC. \r
+ * transferred continuously to the host PC.\r
  *\r
  * For more information, see http://percepio.com/2016/10/05/rtos-tracing/\r
  * and the Tracealyzer User Manual.\r
@@ -99,6 +99,161 @@ extern "C" {
  ******************************************************************************/\r
 #define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT\r
 \r
+/******************************************************************************\r
+ * TRC_CFG_FREERTOS_VERSION\r
+ *\r
+ * Specify what version of FreeRTOS that is used (don't change unless using the\r
+ * trace recorder library with an older version of FreeRTOS).\r
+ *\r
+ * TRC_FREERTOS_VERSION_7_3                                            If using FreeRTOS v7.3.x\r
+ * TRC_FREERTOS_VERSION_7_4                                            If using FreeRTOS v7.4.x \r
+ * TRC_FREERTOS_VERSION_7_5_OR_7_6                             If using FreeRTOS v7.5.0 - v7.6.0\r
+ * TRC_FREERTOS_VERSION_8_X                                            If using FreeRTOS v8.X.X\r
+ * TRC_FREERTOS_VERSION_9_0_0                                  If using FreeRTOS v9.0.0\r
+ * TRC_FREERTOS_VERSION_9_0_1                                  If using FreeRTOS v9.0.1\r
+ * TRC_FREERTOS_VERSION_9_0_2                                  If using FreeRTOS v9.0.2\r
+ * TRC_FREERTOS_VERSION_10_0_0                                 If using FreeRTOS v10.0.0 or later\r
+ *****************************************************************************/\r
+#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_0_0\r
+\r
+/*******************************************************************************\r
+ * TRC_CFG_SCHEDULING_ONLY\r
+ *\r
+ * Macro which should be defined as an integer value.\r
+ *\r
+ * If this setting is enabled (= 1), only scheduling events are recorded.\r
+ * If disabled (= 0), all events are recorded (unless filtered in other ways).\r
+ *\r
+ * Default value is 0 (= include additional events).\r
+ ******************************************************************************/\r
+#define TRC_CFG_SCHEDULING_ONLY 0\r
+\r
+ /******************************************************************************\r
+ * TRC_CFG_INCLUDE_MEMMANG_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * This controls if malloc and free calls should be traced. Set this to zero (0)\r
+ * to exclude malloc/free calls, or one (1) to include such events in the trace.\r
+ *\r
+ * Default value is 1.\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_MEMMANG_EVENTS 1\r
+\r
+ /******************************************************************************\r
+ * TRC_CFG_INCLUDE_USER_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), all code related to User Events is excluded in order \r
+ * to reduce code size. Any attempts of storing User Events are then silently\r
+ * ignored.\r
+ *\r
+ * User Events are application-generated events, like "printf" but for the \r
+ * trace log, generated using vTracePrint and vTracePrintF. \r
+ * The formatting is done on host-side, by Tracealyzer. User Events are \r
+ * therefore much faster than a console printf and can often be used\r
+ * in timing critical code without problems.\r
+ *\r
+ * Note: In streaming mode, User Events are used to provide error messages\r
+ * and warnings from the recorder (in case of incorrect configuration) for\r
+ * display in Tracealyzer. Disabling user events will also disable these\r
+ * warnings. You can however still catch them by calling xTraceGetLastError\r
+ * or by putting breakpoints in prvTraceError and prvTraceWarning.\r
+ *\r
+ * Default value is 1.\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_USER_EVENTS 1\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_ISR_TRACING\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), the code for recording Interrupt Service Routines is\r
+ * excluded, in order to reduce code size.\r
+ *\r
+ * Default value is 1.\r
+ *\r
+ * Note: tracing ISRs requires that you insert calls to vTraceStoreISRBegin\r
+ * and vTraceStoreISREnd in your interrupt handlers.\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_ISR_TRACING 1\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_READY_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If one (1), events are recorded when tasks enter scheduling state "ready".\r
+ * This allows Tracealyzer to show the initial pending time before tasks enter\r
+ * the execution state, and present accurate response times.\r
+ * If zero (0), "ready events" are not created, which allows for recording\r
+ * longer traces in the same amount of RAM.\r
+ *\r
+ * Default value is 1.\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_READY_EVENTS 1\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_OSTICK_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is one (1), events will be generated whenever the OS clock is\r
+ * increased. If zero (0), OS tick events are not generated, which allows for\r
+ * recording longer traces in the same amount of RAM.\r
+ *\r
+ * Default value is 1.\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_OSTICK_EVENTS 1\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), the trace will exclude any "event group" events.\r
+ *\r
+ * Default value is 0 (excluded) since dependent on event_groups.c\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS 0\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_TIMER_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), the trace will exclude any Timer events.\r
+ *\r
+ * Default value is 0 since dependent on timers.c\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_TIMER_EVENTS 0\r
+\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), the trace will exclude any "pending function call" \r
+ * events, such as xTimerPendFunctionCall().\r
+ *\r
+ * Default value is 0 since dependent on timers.c\r
+ *****************************************************************************/\r
+#define TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS 0\r
+\r
+/*******************************************************************************\r
+ * Configuration Macro: TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS\r
+ *\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ *\r
+ * If this is zero (0), the trace will exclude any stream buffer or message\r
+ * buffer events.\r
+ *\r
+ * Default value is 0 since dependent on stream_buffer.c (new in FreeRTOS v10)\r
+ ******************************************************************************/\r
+#define TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS 0\r
+\r
 /*******************************************************************************\r
  * Configuration Macro: TRC_CFG_RECORDER_BUFFER_ALLOCATION\r
  *\r
@@ -110,37 +265,24 @@ extern "C" {
  * TRC_RECORDER_BUFFER_ALLOCATION_DYNAMIC - Malloc in vTraceEnable\r
  * TRC_RECORDER_BUFFER_ALLOCATION_CUSTOM  - Use vTraceSetRecorderDataBuffer\r
  *\r
- * Static and dynamic mode does the allocation for you, either in compile time \r
- * (static) or in runtime (malloc). \r
- * The custom mode allows you to control how and where the allocation is made, \r
+ * Static and dynamic mode does the allocation for you, either in compile time\r
+ * (static) or in runtime (malloc).\r
+ * The custom mode allows you to control how and where the allocation is made,\r
  * for details see TRC_ALLOC_CUSTOM_BUFFER and vTraceSetRecorderDataBuffer().\r
  ******************************************************************************/\r
 #define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC\r
 \r
-/******************************************************************************\r
- * TRC_CFG_FREERTOS_VERSION\r
- * \r
- * Specify what version of FreeRTOS that is used (don't change unless using the\r
- * trace recorder library with an older version of FreeRTOS).\r
- * \r
- * TRC_FREERTOS_VERSION_7_3_OR_7_4                             If using FreeRTOS v7.3.0 - v7.4.2\r
- * TRC_FREERTOS_VERSION_7_5_OR_7_6                             If using FreeRTOS v7.5.0 - v7.6.0\r
- * TRC_FREERTOS_VERSION_8_X                                            If using FreeRTOS v8.X.X\r
- * TRC_FREERTOS_VERSION_9_X                                            If using FreeRTOS v9.X.X\r
- *****************************************************************************/\r
-#define TRC_CFG_FREERTOS_VERSION       TRC_FREERTOS_VERSION_9_X\r
-\r
 /******************************************************************************\r
  * TRC_CFG_MAX_ISR_NESTING\r
- * \r
+ *\r
  * Defines how many levels of interrupt nesting the recorder can handle, in\r
  * case multiple ISRs are traced and ISR nesting is possible. If this\r
- * is exceeded, the particular ISR will not be traced and the recorder then \r
+ * is exceeded, the particular ISR will not be traced and the recorder then\r
  * logs an error message. This setting is used to allocate an internal stack\r
- * for keeping track of the previous execution context (4 byte per entry). \r
+ * for keeping track of the previous execution context (4 byte per entry).\r
  *\r
  * This value must be a non-zero positive constant, at least 1.\r
- * \r
+ *\r
  * Default value: 8\r
  *****************************************************************************/\r
 #define TRC_CFG_MAX_ISR_NESTING 8\r