]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/WIN32-MingW/Trace_Recorder_Configuration/trcConfig.h
Update stream buffer tests to try resetting a statically allocated stream buffer...
[freertos] / FreeRTOS / Demo / WIN32-MingW / Trace_Recorder_Configuration / trcConfig.h
index 7039112bfca16c76535a9c873f55f7abde3ccf34..37345d497d8cdcae3f4001aa7c8151bfcc52a594 100644 (file)
-/*******************************************************************************\r
- * Tracealyzer v2.7.0 Recorder Library\r
+/*******************************************************************************\r
+ * Trace Recorder Library for Tracealyzer v3.1.2\r
  * Percepio AB, www.percepio.com\r
  *\r
  * trcConfig.h\r
  *\r
- * Configuration parameters for the trace recorder library. Before using the\r
- * trace recorder library, please check that the default settings are\r
- * appropriate for your system, and if necessary adjust these. Most likely, you\r
- * will need to adjust the NTask, NISR, NQueue, NMutex and NSemaphore values to\r
- * reflect the number of such objects in your system. These may be\r
- * over-approximated, although larger values values implies more RAM usage.\r
+ * Main configuration parameters for the trace recorder library.\r
+ * More settings can be found in trcStreamingConfig.h and trcSnapshotConfig.h.\r
+ *\r
+ * Read more at http://percepio.com/2016/10/05/rtos-tracing/\r
  *\r
  * Terms of Use\r
- * This software is copyright Percepio AB. The recorder library is free for\r
- * use together with Percepio products. You may distribute the recorder library\r
- * in its original form, including modifications in trcHardwarePort.c/.h\r
- * given that these modification are clearly marked as your own modifications\r
- * and documented in the initial comment section of these source files.\r
- * This software is the intellectual property of Percepio AB and may not be\r
- * sold or in other ways commercially redistributed without explicit written\r
- * permission by Percepio AB.\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
+ * intended for analysis in PERCEPIO products. It may not be used or modified\r
+ * for other purposes without explicit permission from PERCEPIO.\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
+ * specific processor, processor family or with a specific communication\r
+ * interface. Any such modifications should be documented directly below\r
+ * this comment block.\r
  *\r
  * Disclaimer\r
- * The trace tool and recorder library is being delivered to you AS IS and\r
- * Percepio AB makes no warranty as to its use or performance. Percepio AB does\r
- * not and cannot warrant the performance or results you may obtain by using the\r
- * software or documentation. Percepio AB make no warranties, express or\r
- * implied, as to noninfringement of third party rights, merchantability, or\r
- * fitness for any particular purpose. In no event will Percepio AB, its\r
- * technology partners, or distributors be liable to you for any consequential,\r
- * incidental or special damages, including any lost profits or lost savings,\r
- * even if a representative of Percepio AB has been advised of the possibility\r
- * of such damages, or for any claim by any third party. Some jurisdictions do\r
- * not allow the exclusion or limitation of incidental, consequential or special\r
- * damages, or the exclusion of implied warranties or limitations on how long an\r
- * implied warranty may last, so the above limitations may not apply to you.\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
+ * 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
+ * In no event will PERCEPIO, its technology partners, or distributors be liable\r
+ * to you for any consequential, incidental or special damages, including any\r
+ * lost profits or lost savings, even if a representative of PERCEPIO has been\r
+ * advised of the possibility of such damages, or for any claim by any third\r
+ * party. Some jurisdictions do not allow the exclusion or limitation of\r
+ * incidental, consequential or special damages, or the exclusion of implied\r
+ * warranties or limitations on how long an implied warranty may last, so the\r
+ * above limitations may not apply to you.\r
  *\r
  * Tabs are used for indent in this file (1 tab = 4 spaces)\r
  *\r
- * Copyright Percepio AB, 2014.\r
+ * Copyright Percepio AB, 2016.\r
  * www.percepio.com\r
  ******************************************************************************/\r
 \r
-#ifndef TRCCONFIG_H\r
-#define TRCCONFIG_H\r
-\r
-/******************************************************************************\r
- * SELECTED_PORT\r
- *\r
- * Macro that specifies what hardware port that should be used.\r
- * Available ports are:\r
- *\r
- * Port Name                                                   Code     Official       OS supported\r
- * PORT_APPLICATION_DEFINED                            -2              -                       -\r
- * PORT_NOT_SET                                                        -1              -                       -\r
- * PORT_HWIndependent                                  0               Yes                     Any\r
- * PORT_Win32                                                  1               Yes                     FreeRTOS on Win32\r
- * PORT_Atmel_AT91SAM7                                 2               No                      Any\r
- * PORT_Atmel_UC3A0                                            3               No                      Any\r
- * PORT_ARM_CortexM                                            4               Yes                     Any\r
- * PORT_Renesas_RX600                                  5               Yes                     Any\r
- * PORT_Microchip_dsPIC_AND_PIC24              6               Yes                     Any\r
- * PORT_TEXAS_INSTRUMENTS_TMS570               7               No                      Any\r
- * PORT_TEXAS_INSTRUMENTS_MSP430               8               No                      Any\r
- * PORT_MICROCHIP_PIC32MX                              9               Yes                     Any\r
- * PORT_XILINX_PPC405                                  10              No                      FreeRTOS\r
- * PORT_XILINX_PPC440                                  11              No                      FreeRTOS\r
- * PORT_XILINX_MICROBLAZE                              12              No                      Any\r
- * PORT_NXP_LPC210X                                            13              No                      Any\r
- * PORT_MICROCHIP_PIC32MZ                              14              Yes                     Any\r
- * PORT_ARM_CORTEX_A9                                  15              No                      Any\r
- *****************************************************************************/\r
-\r
-#ifndef WIN32\r
-       // Set the port setting here!\r
-       #define SELECTED_PORT PORT_NOT_SET\r
+#ifndef TRC_CONFIG_H\r
+#define TRC_CONFIG_H\r
 \r
-       #if (SELECTED_PORT == PORT_NOT_SET)\r
-               #error "You need to define SELECTED_PORT here!"\r
-       #endif\r
-#else\r
-       // For Win32 demo projects this is set automatically\r
-       #define SELECTED_PORT PORT_Win32\r
+#ifdef __cplusplus\r
+extern "C" {\r
 #endif\r
 \r
-/******************************************************************************\r
- * FREERTOS_VERSION\r
- *\r
- * Specify what version of FreeRTOS that is used. This is necessary compensate\r
- * for renamed symbols in the FreeRTOS kernel (does not build if incorrect).\r
- *\r
- * FREERTOS_VERSION_7_3_OR_7_4 (= 1)           If using FreeRTOS v7.3.0 - v7.4.2\r
- * FREERTOS_VERSION_7_5_OR_7_6 (= 2)           If using FreeRTOS v7.5.0 - v7.6.0\r
- * FREERTOS_VERSION_8_0_OR_LATER (= 3)         If using FreeRTOS v8.0.0 or later\r
- *****************************************************************************/\r
-#define FREERTOS_VERSION       FREERTOS_VERSION_8_0_OR_LATER\r
+#include "trcPortDefines.h"\r
 \r
 /******************************************************************************\r
- * TRACE_RECORDER_STORE_MODE\r
- *\r
- * Macro which should be defined as one of:\r
- * - TRACE_STORE_MODE_RING_BUFFER\r
- * - TRACE_STORE_MODE_STOP_WHEN_FULL\r
- * Default is TRACE_STORE_MODE_RING_BUFFER.\r
- *\r
- * With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the\r
- * events are stored in a ring buffer, i.e., where the oldest events are\r
- * overwritten when the buffer becomes full. This allows you to get the last\r
- * events leading up to an interesting state, e.g., an error, without having\r
- * to store the whole run since startup.\r
- *\r
- * When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the\r
- * recording is stopped when the buffer becomes full. This is useful for\r
- * recording events following a specific state, e.g., the startup sequence.\r
+ * Include of processor header file\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
-#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\r
+//#error "Trace Recorder: Please include your processor's header file here and remove this line."\r
 \r
 /*******************************************************************************\r
- * TRACE_SCHEDULING_ONLY\r
+ * Configuration Macro: TRC_CFG_HARDWARE_PORT\r
  *\r
- * Macro which should be defined as an integer value.\r
+ * Specify what hardware port to use (i.e., the "timestamping driver").\r
  *\r
- * If this setting is enabled (= 1), only scheduling events are recorded.\r
- * If disabled (= 0), all events are recorded.\r
+ * 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
+ * force the recorder to use SysTick timestamping instead, using this define:\r
  *\r
- * Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this\r
- * option can be used to avoid storing unsupported events.\r
+ * #define TRC_CFG_ARM_CM_USE_SYSTICK\r
  *\r
- * Default value is 0 (store all enabled events).\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
+ * define your own port, if not already present.\r
  ******************************************************************************/\r
-#define TRACE_SCHEDULING_ONLY 0\r
+#define TRC_CFG_HARDWARE_PORT TRC_HARDWARE_PORT_Win32\r
 \r
 /*******************************************************************************\r
- * EVENT_BUFFER_SIZE\r
+ * Configuration Macro: TRC_CFG_RECORDER_MODE\r
  *\r
- * Macro which should be defined as an integer value.\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
  *\r
- * This defines the capacity of the event buffer, i.e., the number of records\r
- * it may store. Most events use one record (4 byte), although some events\r
- * require multiple 4-byte records. You should adjust this to the amount of RAM\r
- * available in the target system.\r
+ * For more information, see http://percepio.com/2016/10/05/rtos-tracing/\r
+ * and the Tracealyzer User Manual.\r
  *\r
- * Default value is 1000, which means that 4000 bytes is allocated for the\r
- * event buffer.\r
+ * Values:\r
+ * TRC_RECORDER_MODE_SNAPSHOT\r
+ * TRC_RECORDER_MODE_STREAMING\r
  ******************************************************************************/\r
-#define EVENT_BUFFER_SIZE 15000\r
+#define TRC_CFG_RECORDER_MODE TRC_RECORDER_MODE_SNAPSHOT\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
- * NTask, NISR, NQueue, NSemaphore, NMutex\r
- *\r
- * A group of macros which should be defined as integer values, zero or larger.\r
- *\r
- * These define the capacity of the Object Property Table, i.e., the maximum\r
- * number of objects active at any given point, within each object class (e.g.,\r
- * task, queue, semaphore, ...).\r
+ * TRC_CFG_SCHEDULING_ONLY\r
  *\r
- * If tasks or other other objects are deleted in your system, this\r
- * setting does not limit the total amount of objects created, only the number\r
- * of objects that have been successfully created but not yet deleted.\r
+ * Macro which should be defined as an integer value.\r
  *\r
- * Using too small values will cause vTraceError to be called, which stores an\r
- * error message in the trace that is shown when opening the trace file.\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
- * It can be wise to start with large values for these constants,\r
- * unless you are very confident on these numbers. Then do a recording and\r
- * check the actual usage by selecting View menu -> Trace Details ->\r
- * Resource Usage -> Object Table.\r
+ * Default value is 0 (= include additional events).\r
  ******************************************************************************/\r
-#define NTask                  100\r
-#define NISR                   60\r
-#define NQueue                 60\r
-#define NSemaphore             60\r
-#define NMutex                 60\r
-#define NTimer                 200\r
-#define NEventGroup            60\r
+#define TRC_CFG_SCHEDULING_ONLY 0\r
 \r
-/******************************************************************************\r
- * INCLUDE_MEMMANG_EVENTS\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 to\r
- * exclude malloc/free calls, or one (1) to include such events in the trace.\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 INCLUDE_MEMMANG_EVENTS 1\r
+#define TRC_CFG_INCLUDE_MEMMANG_EVENTS 1\r
 \r
-/******************************************************************************\r
- * INCLUDE_USER_EVENTS\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) the code for creating User Events is excluded to\r
- * reduce code size. User Events are application-generated events, like\r
- * "printf" but for the trace log instead of console output. User Events are\r
- * much faster than a printf and can therefore be used in timing critical code.\r
- * See vTraceUserEvent() and vTracePrintF() in trcUser.h\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
- * Default value is 1.\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 that User Events are only displayed in Professional Edition.\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 INCLUDE_USER_EVENTS 1\r
+#define TRC_CFG_INCLUDE_USER_EVENTS 1\r
 \r
-/*****************************************************************************\r
- * INCLUDE_ISR_TRACING\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 to reduce code size.\r
+ * excluded, in order to reduce code size.\r
  *\r
  * Default value is 1.\r
  *\r
- * Note, if the kernel has no central interrupt dispatcher, recording ISRs\r
- * require that you insert calls to vTraceStoreISRBegin and vTraceStoreISREnd\r
- * in your interrupt handlers.\r
+ * Note: tracing ISRs requires that you insert calls to vTraceStoreISRBegin\r
+ * and vTraceStoreISREnd in your interrupt handlers.\r
  *****************************************************************************/\r
-#define INCLUDE_ISR_TRACING 1\r
+#define TRC_CFG_INCLUDE_ISR_TRACING 1\r
 \r
-/*****************************************************************************\r
- * INCLUDE_READY_EVENTS\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 uses a lot of space in the event buffer, so excluding "ready events"\r
- * will allow for longer traces. Including ready events however allows for\r
- * showing the initial pending time before tasks enter the execution state, and\r
- * for presenting accurate response times.\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 INCLUDE_READY_EVENTS 1\r
-\r
-/*****************************************************************************\r
- * INCLUDE_NEW_TIME_EVENTS\r
- *\r
- * Macro which should be defined as either zero (0) or one (1).\r
- *\r
- * If this is zero (1), events will be generated whenever the OS clock is\r
- * increased.\r
- *\r
- * Default value is 0.\r
- *****************************************************************************/\r
-#define INCLUDE_NEW_TIME_EVENTS 1\r
+#define TRC_CFG_INCLUDE_READY_EVENTS 1\r
 \r
-/******************************************************************************\r
- * INCLUDE_FLOAT_SUPPORT\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 zero (0), all references to floating point values are removed,\r
- * in case floating point values are not supported by the platform used.\r
- * Floating point values are only used in vTracePrintF and its subroutines, to\r
- * store float (%f) or double (%lf) arguments.\r
- *\r
- * vTracePrintF can be used with integer and string arguments in either case.\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 INCLUDE_FLOAT_SUPPORT 0\r
+#define TRC_CFG_INCLUDE_OSTICK_EVENTS 1\r
 \r
-/******************************************************************************\r
- * INCLUDE_OBJECT_DELETE\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS\r
  *\r
  * Macro which should be defined as either zero (0) or one (1).\r
  *\r
- * This must be enabled (1) if tasks, queues or other\r
- * traced kernel objects are deleted at runtime. If no deletes are made, this\r
- * can be set to 0 in order to exclude the delete-handling code.\r
+ * If this is zero (0), the trace will exclude any "event group" events.\r
  *\r
- * Default value is 1.\r
+ * Default value is 0 (excluded) since dependent on event_groups.c\r
  *****************************************************************************/\r
-#define INCLUDE_OBJECT_DELETE 1\r
+#define TRC_CFG_INCLUDE_EVENT_GROUP_EVENTS 1\r
 \r
-/*******************************************************************************\r
- * SYMBOL_TABLE_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the capacity of the symbol table, in bytes. This symbol table\r
- * stores User Events labels and names of deleted tasks, queues, or other kernel\r
- * objects. If you don't use User Events or delete any kernel\r
- * objects you set this to a very low value. The minimum recommended value is 4.\r
- * A size of zero (0) is not allowed since a zero-sized array may result in a\r
- * 32-bit pointer, i.e., using 4 bytes rather than 0.\r
- *\r
- * Default value is 800.\r
- ******************************************************************************/\r
-#define SYMBOL_TABLE_SIZE 5000\r
-\r
-#if (SYMBOL_TABLE_SIZE == 0)\r
-#error "SYMBOL_TABLE_SIZE may not be zero!"\r
-#endif\r
-\r
-/******************************************************************************\r
- * NameLenTask, NameLenQueue, ...\r
- *\r
- * Macros that specify the maximum lengths (number of characters) for names of\r
- * kernel objects, such as tasks and queues. If longer names are used, they will\r
- * be truncated when stored in the recorder.\r
- *****************************************************************************/\r
-#define NameLenTask                    15\r
-#define NameLenISR                     15\r
-#define NameLenQueue           15\r
-#define NameLenSemaphore       15\r
-#define NameLenMutex           15\r
-#define NameLenTimer           15\r
-#define NameLenEventGroup      15\r
-\r
-/******************************************************************************\r
- * TRACE_DATA_ALLOCATION\r
- *\r
- * This defines how to allocate the recorder data structure, i.e., using a\r
- * static declaration or using a dynamic allocation in runtime (malloc).\r
- *\r
- * Should be one of these two options:\r
- * - TRACE_DATA_ALLOCATION_STATIC (default)\r
- * - TRACE_DATA_ALLOCATION_DYNAMIC\r
- *\r
- * Using static allocation has the benefits of compile-time errors if the buffer\r
- * is too large (too large constants in trcConfig.h) and no need to call the\r
- * initialization routine (xTraceInitTraceData).\r
- *\r
- * Using dynamic allocation may give more flexibility in some cases.\r
- *****************************************************************************/\r
-#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC\r
-\r
-\r
-\r
-/******************************************************************************\r
- *** ADVANCED SETTINGS ********************************************************\r
- ******************************************************************************\r
- * The remaining settings are not necessary to modify but allows for optimizing\r
- * the recorder setup for your specific needs, e.g., to exclude events that you\r
- * are not interested in, in order to get longer traces.\r
- *****************************************************************************/\r
-\r
-/******************************************************************************\r
-* HEAP_SIZE_BELOW_16M\r
-*\r
-* An integer constant that can be used to reduce the buffer usage of memory\r
-* allocation events (malloc/free). This value should be 1 if the heap size is\r
-* below 16 MB (2^24 byte), and you can live with reported addresses showing the\r
-* lower 24 bits only. If 0, you get the full 32-bit addresses.\r
-*\r
-* Default value is 0.\r
-******************************************************************************/\r
-#define HEAP_SIZE_BELOW_16M 0\r
-\r
-/******************************************************************************\r
- * USE_LINKER_PRAGMA\r
- *\r
- * Macro which should be defined as an integer value, default is 0.\r
- *\r
- * If this is 1, the header file "recorderdata_linker_pragma.h" is included just\r
- * before the declaration of RecorderData (in trcBase.c), i.e., the trace data\r
- * structure. This allows the user to specify a pragma with linker options.\r
- *\r
- * Example (for IAR Embedded Workbench and NXP LPC17xx):\r
- * #pragma location="AHB_RAM_MEMORY"\r
- *\r
- * This example instructs the IAR linker to place RecorderData in another RAM\r
- * bank, the AHB RAM. This can also be used for other compilers with a similar\r
- * pragmas for linker options.\r
- *\r
- * Note that this only applies if using static allocation, see below.\r
- ******************************************************************************/\r
-#define USE_LINKER_PRAGMA 0\r
-\r
-/******************************************************************************\r
- * USE_IMPLICIT_IFE_RULES\r
+ /*****************************************************************************\r
+ * TRC_CFG_INCLUDE_TIMER_EVENTS\r
  *\r
  * Macro which should be defined as either zero (0) or one (1).\r
- * Default is 1.\r
- *\r
- * Tracealyzer groups the events into actor instances, based on context-switches\r
- * and a definition of "Instance Finish Events", or IFEs. These are kernel calls\r
- * considered to be the last event in a task instance. Some kernel calls are\r
- * considered IFEs by default (e.g., delay functions), but it is also possible\r
- * to specify this individually for each task (see vTraceTaskInstanceFinish).\r
  *\r
- * If USE_IMPLICIT_IFE_RULES is one (1), the default IFEs will be enabled, which\r
- * gives a "typical" grouping of events into instances. You can combine this\r
- * with calls to vTraceTaskInstanceFinish for specific tasks.\r
+ * If this is zero (0), the trace will exclude any Timer events.\r
  *\r
- * If USE_IMPLICIT_IFE_RULES is zero (0), the implicit IFEs are disabled and all\r
- * events withing each task is then shown as a single instance, unless  you call\r
- * vTraceTaskInstanceFinish() at suitable locations to mark the IFEs.\r
+ * Default value is 0 since dependent on timers.c\r
  *****************************************************************************/\r
-#define USE_IMPLICIT_IFE_RULES 1\r
+#define TRC_CFG_INCLUDE_TIMER_EVENTS 1\r
 \r
-/******************************************************************************\r
- * USE_16BIT_OBJECT_HANDLES\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 set to 0 (zero), the recorder uses 8-bit handles to identify kernel\r
- * objects such as tasks and queues. This limits the supported number of\r
- * concurrently active objects to 255 of each type (object class).\r
- *\r
- * If set to 1 (one), the recorder uses 16-bit handles to identify kernel\r
- * objects such as tasks and queues. This limits the supported number of\r
- * concurrent objects to 65535 of each type (object class). However, since the\r
- * object property table is limited to 64 KB, the practical limit is about\r
- * 3000 objects in total.\r
- *\r
- * Default is 0.\r
- *\r
- * NOTE: An object with handle above 255 will use an extra 4-byte record in\r
- * the event buffer whenever referenced. Moreover, some internal tables in the\r
- * recorder gets larger when using 16-bit handles. The additional RAM usage is\r
- * 5-10 byte plus 1 byte per kernel object i.e., task, queue, mutex, etc.\r
- *****************************************************************************/\r
-#define USE_16BIT_OBJECT_HANDLES 0\r
-\r
-/******************************************************************************\r
- * USE_TRACE_ASSERT\r
- *\r
- * Macro which should be defined as either zero (0) or one (1).\r
- * Default is 1.\r
+ * If this is zero (0), the trace will exclude any "pending function call" \r
+ * events, such as xTimerPendFunctionCall().\r
  *\r
- * If this is one (1), the TRACE_ASSERT macro will verify that a condition is\r
- * true. If the condition is false, vTraceError() will be called.\r
- * This is used on several places in the recorder code for sanity checks on\r
- * parameters. Can be switched off to reduce CPU usage of the tracing.\r
+ * Default value is 0 since dependent on timers.c\r
  *****************************************************************************/\r
-#define USE_TRACE_ASSERT 1\r
+#define TRC_CFG_INCLUDE_PEND_FUNC_CALL_EVENTS 1\r
 \r
 /*******************************************************************************\r
- * USE_SEPARATE_USER_EVENT_BUFFER\r
+ * Configuration Macro: TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS\r
  *\r
- * Macro which should be defined as an integer value.\r
- * Default is zero (0).\r
+ * Macro which should be defined as either zero (0) or one (1).\r
  *\r
- * This enables and disables the use of the separate user event buffer. Using\r
- * this separate buffer has the benefit of not overwriting the user events with\r
- * kernel events (usually generated at a much higher rate), i.e., when using\r
- * ring-buffer mode.\r
+ * If this is zero (0), the trace will exclude any stream buffer or message\r
+ * buffer events.\r
  *\r
- * Note: When using the separate user event buffer, you may get an artificial\r
- * task instance named "Unknown actor". This is added as a placeholder when the\r
- * user event history is longer than the task scheduling history.\r
+ * Default value is 0 since dependent on stream_buffer.c (new in FreeRTOS v10)\r
  ******************************************************************************/\r
-#define USE_SEPARATE_USER_EVENT_BUFFER 0\r
+#define TRC_CFG_INCLUDE_STREAM_BUFFER_EVENTS 1\r
 \r
 /*******************************************************************************\r
- * USER_EVENT_BUFFER_SIZE\r
+ * Configuration Macro: TRC_CFG_RECORDER_BUFFER_ALLOCATION\r
  *\r
- * Macro which should be defined as an integer value.\r
+ * Specifies how the recorder buffer is allocated (also in case of streaming, in\r
+ * port using the recorder's internal temporary buffer)\r
  *\r
- * This defines the capacity of the user event buffer, in number of slots.\r
- * A single user event can use between 1 and X slots, depending on the data.\r
+ * Values:\r
+ * TRC_RECORDER_BUFFER_ALLOCATION_STATIC  - Static allocation (internal)\r
+ * TRC_RECORDER_BUFFER_ALLOCATION_DYNAMIC - Malloc in vTraceEnable\r
+ * TRC_RECORDER_BUFFER_ALLOCATION_CUSTOM  - Use vTraceSetRecorderDataBuffer\r
  *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\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 USER_EVENT_BUFFER_SIZE 10\r
+#define TRC_CFG_RECORDER_BUFFER_ALLOCATION TRC_RECORDER_BUFFER_ALLOCATION_STATIC\r
 \r
-/*******************************************************************************\r
- * USER_EVENT_CHANNELS\r
+/******************************************************************************\r
+ * TRC_CFG_MAX_ISR_NESTING\r
  *\r
- * Macro which should be defined as an integer value.\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
+ * 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
  *\r
- * This defines the number of allowed user event channels.\r
+ * This value must be a non-zero positive constant, at least 1.\r
  *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
- ******************************************************************************/\r
-#define CHANNEL_FORMAT_PAIRS 32\r
+ * Default value: 8\r
+ *****************************************************************************/\r
+#define TRC_CFG_MAX_ISR_NESTING 8\r
+\r
+/* Specific configuration, depending on Streaming/Snapshot mode */\r
+#if (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_SNAPSHOT)\r
+#include "trcSnapshotConfig.h"\r
+#elif (TRC_CFG_RECORDER_MODE == TRC_RECORDER_MODE_STREAMING)\r
+#include "trcStreamingConfig.h"\r
+#endif\r
 \r
+#ifdef __cplusplus\r
+}\r
 #endif\r
 \r
+#endif /* _TRC_CONFIG_H */\r