]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/ConfigurationTemplate/trcConfig.h
Update to the latest trace recorder library.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-Trace / ConfigurationTemplate / trcConfig.h
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/ConfigurationTemplate/trcConfig.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/ConfigurationTemplate/trcConfig.h
deleted file mode 100644 (file)
index a7ec05b..0000000
+++ /dev/null
@@ -1,477 +0,0 @@
-/*******************************************************************************\r
- * Tracealyzer v3.0.2 Recorder Library\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
- *\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
- *\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
- *\r
- * Tabs are used for indent in this file (1 tab = 4 spaces)\r
- *\r
- * Copyright Percepio AB, 2014.\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
- * PORT_ARM_CORTEX_M0                                  16              Yes                     Any\r
- *****************************************************************************/\r
-\r
-// Set the port setting here!\r
-#define SELECTED_PORT PORT_NOT_SET\r
-\r
-#if (SELECTED_PORT == PORT_ARM_CortexM)\r
-       /* For ARM Cortex-M: make sure ARM's CMSIS library is included here, which\r
-       is used for accessing the PRIMASK register. e.g. #include "board.h" */\r
-#endif\r
-\r
-\r
-#if (SELECTED_PORT == PORT_NOT_SET)\r
-       #error "You need to define SELECTED_PORT here!"\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
-\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
- *****************************************************************************/\r
-#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\r
-\r
-/*******************************************************************************\r
- * TRACE_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.\r
- *\r
- * For users of "Free Edition", that only  displays scheduling events, this\r
- * option can be used to avoid storing other events.\r
- *\r
- * Default value is 0 (store all enabled events).\r
- *\r
- ******************************************************************************/\r
-#define TRACE_SCHEDULING_ONLY 0\r
-\r
-/*******************************************************************************\r
- * EVENT_BUFFER_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\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
- * \r
- * Default value is 1000, which means that 4000 bytes is allocated for the\r
- * event buffer.\r
- ******************************************************************************/\r
-#define EVENT_BUFFER_SIZE 1000\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
- * \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
- *\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
- *\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
- ******************************************************************************/\r
-#define NTask                  15\r
-#define NISR                   5\r
-#define NQueue                 10\r
-#define NSemaphore             10\r
-#define NMutex                 10\r
-#define NTimer                 2\r
-#define NEventGroup            2\r
-\r
-/******************************************************************************\r
- * 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
- *\r
- * Default value is 1.\r
- *****************************************************************************/\r
-#define INCLUDE_MEMMANG_EVENTS 1\r
-\r
-/******************************************************************************\r
- * 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
- * \r
- * Default value is 1.\r
- *\r
- * Note that User Events are only displayed in Professional Edition.\r
- *****************************************************************************/\r
-#define INCLUDE_USER_EVENTS 1\r
-\r
-/*****************************************************************************\r
- * 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
- *\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
- *****************************************************************************/\r
-#define INCLUDE_ISR_TRACING 1\r
-\r
-/*****************************************************************************\r
- * 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
- *\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 0\r
-\r
-/******************************************************************************\r
- * INCLUDE_FLOAT_SUPPORT\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
- *\r
- * Default value is 1.\r
- *****************************************************************************/\r
-#define INCLUDE_FLOAT_SUPPORT 1\r
-\r
-/******************************************************************************\r
- * INCLUDE_OBJECT_DELETE\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
- *\r
- * Default value is 1.\r
- *****************************************************************************/\r
-#define INCLUDE_OBJECT_DELETE 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 800\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
- * 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
- *\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
- *****************************************************************************/\r
-#define USE_IMPLICIT_IFE_RULES 1\r
-\r
-/******************************************************************************\r
- * USE_16BIT_OBJECT_HANDLES\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
- *\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
- *****************************************************************************/\r
-#define USE_TRACE_ASSERT 1\r
\r
-/*******************************************************************************\r
- * USE_SEPARATE_USER_EVENT_BUFFER\r
- *\r
- * Macro which should be defined as an integer value.\r
- * Default is zero (0).\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
- *\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
- ******************************************************************************/\r
-#define USE_SEPARATE_USER_EVENT_BUFFER 0\r
-\r
-/*******************************************************************************\r
- * USER_EVENT_BUFFER_SIZE\r
- *\r
- * Macro which should be defined as an integer value.\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
- *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
- ******************************************************************************/\r
-#define USER_EVENT_BUFFER_SIZE 10\r
-\r
-/*******************************************************************************\r
- * USER_EVENT_CHANNELS\r
- *\r
- * Macro which should be defined as an integer value.\r
- *\r
- * This defines the number of allowed user event channels.\r
- *\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
- ******************************************************************************/\r
-#define CHANNEL_FORMAT_PAIRS 32\r
-\r
-#endif\r
-\r