#define configTIMER_QUEUE_LENGTH 20\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )\r
\r
-#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )\r
+#define configMAX_PRIORITIES ( 7 )\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
\r
\r
\r
/* Include the FreeRTOS+Trace FreeRTOS trace macro definitions. */\r
+#define TRACE_ENTER_CRITICAL_SECTION() portENTER_CRITICAL()\r
+#define TRACE_EXIT_CRITICAL_SECTION() portEXIT_CRITICAL()\r
#include "trcKernelPort.h"\r
\r
#endif /* FREERTOS_CONFIG_H */\r
/*******************************************************************************\r
- * Tracealyzer v2.6.0 Recorder Library\r
+ * Tracealyzer v2.7.0 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
+ * 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
* 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
+ * 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
+ * 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
- * Copyright Percepio AB, 2013.\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
- * CONFIGURATION RELATED TO CAPACITY AND ALLOCATION \r
- ******************************************************************************/\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. Each registered event typically use one record (4 byte), but\r
- * vTracePrintF may use multiple records depending on the number of data args.\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
-#define EVENT_BUFFER_SIZE 4000 /* Adjust wrt. to available RAM */\r
+#ifndef WIN32\r
+ // Set the port setting here!\r
+ #define SELECTED_PORT PORT_NOT_SET\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
+#endif\r
\r
-/*******************************************************************************\r
- * USE_LINKER_PRAGMA\r
- *\r
- * Macro which should be defined as an integer value, default is 0.\r
+/******************************************************************************\r
+ * FREERTOS_VERSION\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
+ * 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
- * 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
-\r
-#define USE_LINKER_PRAGMA 0\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
- * SYMBOL_TABLE_SIZE\r
+/******************************************************************************\r
+ * TRACE_RECORDER_STORE_MODE\r
*\r
- * Macro which should be defined as an integer value.\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
- * 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. Note that the names of active objects not stored here but in the \r
- * Object Table. Thus, if you don't use User Events or delete any kernel \r
- * objects you set this to a very low value, e.g. 4, but not zero (0) since \r
- * this causes a declaration of a zero-sized array, for which the C compiler\r
- * behavior is not standardized and may cause misaligned data.\r
- ******************************************************************************/\r
-#define SYMBOL_TABLE_SIZE 1000\r
-\r
-#if (SYMBOL_TABLE_SIZE == 0)\r
-#error "SYMBOL_TABLE_SIZE may not be zero!"\r
-#endif\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
- * USE_SEPARATE_USER_EVENT_BUFFER\r
+ * TRACE_SCHEDULING_ONLY\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.\r
+ * If this setting is enabled (= 1), only scheduling events are recorded.\r
+ * If disabled (= 0), all events are recorded.\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
+ * Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this\r
+ * option can be used to avoid storing unsupported events.\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
+ * Default value is 0 (store all enabled events).\r
*\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
******************************************************************************/\r
-#define USER_EVENT_BUFFER_SIZE 500\r
+#define TRACE_SCHEDULING_ONLY 0\r
\r
/*******************************************************************************\r
- * USER_EVENT_CHANNELS\r
+ * EVENT_BUFFER_SIZE\r
*\r
* Macro which should be defined as an integer value.\r
*\r
- * This defines the number of allowed user event channels.\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
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
+ * Default value is 1000, which means that 4000 bytes is allocated for the\r
+ * event buffer.\r
******************************************************************************/\r
-#define CHANNEL_FORMAT_PAIRS 32\r
+#define EVENT_BUFFER_SIZE 15000\r
\r
/*******************************************************************************\r
* NTask, NISR, NQueue, NSemaphore, NMutex\r
*\r
- * A group of Macros which should be defined as an integer value of zero (0) \r
- * or larger.\r
+ * A group of macros which should be defined as integer values, zero or larger.\r
*\r
- * This defines the capacity of the Object Property Table - the maximum number\r
- * of objects active at any given point within each object class.\r
- * \r
- * NOTE: In case objects are deleted and created during runtime, this setting\r
- * does not limit the total amount of objects, only the number of concurrently\r
- * active objects. \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
- * Using too small values will give an error message through the vTraceError\r
- * routine, which makes the error message appear when opening the trace data\r
- * in Tracealyzer. If you are using the recorder status monitor task,\r
- * any error messages are displayed in console prints, assuming that the\r
- * print macro has been defined properly (vConsolePrintMessage). \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
- * It can be wise to start with very large values for these constants, \r
- * unless you are very confident on these numbers. Then do a recording and\r
- * check the actual usage in Tracealyzer. This is shown by selecting\r
- * View -> Trace Details -> Resource Usage -> Object Table\r
- * \r
- * NOTE 2: Remember to account for all tasks and other objects created by \r
- * the kernel, such as the IDLE task, any timer tasks, and any tasks created \r
- * by other 3rd party software components, such as communication stacks.\r
- * Moreover, one task slot is used to indicate "(startup)", i.e., a fictive \r
- * task that represent the time before the scheduler starts. \r
- * NTask should thus be at least 2-3 slots larger than your application task count.\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 15\r
-#define NQueue 15\r
-#define NSemaphore 15\r
-#define NMutex 15\r
-#define NTimer 15\r
-#define NEventGroup 15\r
-\r
-/* Maximum object name length for each class (includes zero termination) */\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
+#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
\r
/******************************************************************************\r
- * TRACE_DESCRIPTION\r
+ * INCLUDE_MEMMANG_EVENTS\r
*\r
- * Macro which should be defined as a string.\r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * This string is stored in the trace and displayed in Tracealyzer. Can be\r
- * used to store, e.g., system version or build date. This is also used to store\r
- * internal error messages from the recorder, which if occurs overwrites the\r
- * value defined here. This may be maximum 256 chars.\r
- *****************************************************************************/\r
-#define TRACE_DESCRIPTION "Tracealyzer Recorder Test Program"\r
-\r
-/******************************************************************************\r
- * TRACE_DESCRIPTION_MAX_LENGTH\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
- * The maximum length (including zero termination) for the TRACE_DESCRIPTION\r
- * string. Since this string also is used for internal error messages from the \r
- * recorder do not make it too short, as this may truncate the error messages.\r
- * Default is 80. \r
- * Maximum allowed length is 256 - the trace will fail to load if longer.\r
+ * Default value is 1.\r
*****************************************************************************/\r
-#define TRACE_DESCRIPTION_MAX_LENGTH 80\r
-\r
+#define INCLUDE_MEMMANG_EVENTS 1\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
+ * INCLUDE_USER_EVENTS\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
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * Using dynamic allocation may give more flexibility in some cases.\r
- *****************************************************************************/\r
-\r
-#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC\r
-\r
-\r
-/******************************************************************************\r
- * CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE\r
- *****************************************************************************/\r
-\r
-/******************************************************************************\r
- * USE_TRACE_ASSERT\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
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 0.\r
+ * Default value 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
+ * Note that User Events are only displayed in Professional Edition.\r
*****************************************************************************/\r
-#define USE_TRACE_ASSERT 1\r
+#define INCLUDE_USER_EVENTS 1\r
\r
-/******************************************************************************\r
- * INCLUDE_FLOAT_SUPPORT\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+/*****************************************************************************\r
+ * INCLUDE_ISR_TRACING\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) argments. \r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * Note: vTracePrintF can still be used with integer and string arguments in\r
- * either case.\r
- *****************************************************************************/\r
-#define INCLUDE_FLOAT_SUPPORT 0\r
-\r
-/******************************************************************************\r
- * INCLUDE_USER_EVENTS\r
+ * If this is zero (0), the code for recording Interrupt Service Routines is\r
+ * excluded to reduce code size.\r
*\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+ * Default value is 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
- * Note that User Events are not displayed in FreeRTOS+Trace Free Edition.\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_USER_EVENTS 1\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
- * Default is 1.\r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * If this is zero (0), the code for recording Ready events is \r
- * excluded. Note, this will make it impossible to calculate the correct\r
- * response times.\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
- * Default is 0.\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
+ * 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
+#define INCLUDE_NEW_TIME_EVENTS 1\r
\r
-/*****************************************************************************\r
- * INCLUDE_ISR_TRACING\r
+/******************************************************************************\r
+ * INCLUDE_FLOAT_SUPPORT\r
*\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\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
- * 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
+ * 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_ISR_TRACING 1\r
+#define INCLUDE_FLOAT_SUPPORT 0\r
\r
/******************************************************************************\r
* INCLUDE_OBJECT_DELETE\r
- * \r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 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
+ * 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
- * INCLUDE_MEMMANG_EVENTS\r
- * \r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+/*******************************************************************************\r
+ * SYMBOL_TABLE_SIZE\r
*\r
- * This controls if malloc and free calls should be traced. Set this to zero to\r
- * exclude malloc/free calls from the tracing.\r
- *****************************************************************************/\r
-#define INCLUDE_MEMMANG_EVENTS 1\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
- * CONFIGURATION RELATED TO BEHAVIOR\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_RECORDER_STORE_MODE\r
+ * TRACE_DATA_ALLOCATION\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
+ * 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
- * With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the events are \r
- * stored in a ring buffer, i.e., where the oldest events are overwritten when \r
- * the buffer becomes full. This allows you to get the last events leading up \r
- * to an interesting state, e.g., an error, without having a large trace buffer\r
- * for string the whole run since startup. In this mode, the recorder can run\r
- * "forever" as the buffer never gets full, i.e., in the sense that it always\r
- * has room for more events.\r
- *\r
- * To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the\r
- * system using your debugger and then do a RAM dump, or to explicitly stop the\r
- * recorder using vTraceStop() and then store/upload the trace data using a\r
- * task that you need to provide yourself. The trace data is found in the struct\r
- * RecorderData, initialized in trcBase.c.\r
- *\r
- * Note that, if you upload the trace using a RAM dump, i.e., when the system is \r
- * halted on a breakpoint or by a debugger command, there is no need to stop the \r
- * recorder first.\r
- *\r
- * When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is\r
- * stopped when the buffer becomes full. When the recorder stops itself this way\r
- * vTracePortEnd() is called which allows for custom actions, such as triggering\r
- * a task that stores the trace buffer, i.e., in case taking a RAM dump\r
- * using an on-chip debugger is not possible. In the Windows port, vTracePortEnd\r
- * saves the trace to file directly, but this is not recommended in a real-time\r
- * system since the scheduler is blocked during the processing of vTracePortEnd.\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
-#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\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
- * STOP_AFTER_N_EVENTS\r
+ * USE_LINKER_PRAGMA\r
*\r
- * Macro which should be defined as an integer value, or not defined.\r
- * Default is -1\r
+ * Macro which should be defined as an integer value, default is 0.\r
*\r
- * STOP_AFTER_N_EVENTS is intended for tests of the ring buffer mode (when\r
- * RECORDER_STORE_MODE is STORE_MODE_RING_BUFFER). It stops the recording when\r
- * the specified number of events has been observed. This value can be larger\r
- * than the buffer size, to allow for test of the "wrapping around" that occurs\r
- * in ring buffer mode . A negative value (or no definition of this macro)\r
- * disables this feature.\r
- *****************************************************************************/\r
-#define STOP_AFTER_N_EVENTS -1\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
+ * Macro which should be defined as either zero (0) or one (1).\r
* Default is 1.\r
*\r
- * ### Instance Finish Events (IFE) ###\r
- *\r
- * For tasks with "infinite" main loops (non-terminating tasks), the concept\r
- * of a task instance has no clear definition, it is an application-specific\r
- * thing. Tracealyzer allows you to define Instance Finish Events (IFEs),\r
- * which marks the point in a cyclic task when the "task instance" ends.\r
- * The IFE is a blocking kernel call, typically in the main loop of a task\r
- * which typically reads a message queue, waits for a semaphore or performs\r
- * an explicit delay.\r
- *\r
- * If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)\r
- * will define what kernel calls are considered by default to be IFEs.\r
- *\r
- * However, Implicit IFEs only applies to blocking kernel calls. If a\r
- * service reads a message without blocking, it does not create a new\r
- * instance since no blocking occurred.\r
- *\r
- * Moreover, the actual IFE might sometimes be another blocking call. We \r
- * therefore allow for user-defined Explicit IFEs by calling\r
- *\r
- * vTraceTaskInstanceIsFinished()\r
- *\r
- * right before the kernel call considered as IFE. This does not create an\r
- * additional event but instead stores the service code and object handle\r
- * of the IFE call as properties of the task.\r
- *\r
- * If using Explicit IFEs and the task also calls an Implicit IFE, this may \r
- * result in additional incorrect task instances.\r
- * This is solved by disabling the Implicit IFEs for the task, by adding\r
- * a call to\r
- * \r
- * vTraceTaskSkipDefaultInstanceFinishedEvents()\r
- * \r
- * in the very beginning of that task. This allows you to combine Explicit IFEs\r
- * for some tasks with Implicit IFEs for the rest of the tasks, if\r
- * USE_IMPLICIT_IFE_RULES is 1.\r
- *\r
- * By setting USE_IMPLICIT_IFE_RULES to zero (0), the implicit IFEs are disabled\r
- * for all tasks. Tasks will then be considered to have a single instance only, \r
- * covering all execution fragments, unless you define an explicit IFE in each\r
- * task by calling vTraceTaskInstanceIsFinished before the blocking call.\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
/******************************************************************************\r
* USE_16BIT_OBJECT_HANDLES\r
*\r
* Macro which should be defined as either zero (0) or one (1).\r
- * Default is 0.\r
*\r
- * If set to 0 (zero), the recorder uses 8-bit handles to identify kernel \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
+ * 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
- * NOTE: An object with a high ID (> 255) will generate an extra event \r
- * (= 4 byte) in the event buffer. \r
- * \r
- * NOTE: Some internal tables in the recorder gets larger when using 16-bit \r
- * handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object\r
- *, i.e., task, queue, semaphore, mutex, etc.\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
-/****** Port Name ******************** Code ** Official ** OS Platform ******\r
-* PORT_APPLICATION_DEFINED -2 - - \r
-* PORT_NOT_SET -1 - - \r
-* PORT_HWIndependent 0 Yes Any \r
-* PORT_Win32 1 Yes FreeRTOS 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_PIC32 9 No 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
-*****************************************************************************/\r
-#define SELECTED_PORT PORT_Win32\r
-\r
-#if (SELECTED_PORT == PORT_NOT_SET)\r
-#error "You need to define SELECTED_PORT here!"\r
-#endif\r
-\r
/******************************************************************************\r
-* USE_PRIMASK_CS (for Cortex M devices only)\r
-*\r
-* An integer constant that selects between two options for the critical\r
-* sections of the recorder library.\r
+ * USE_TRACE_ASSERT\r
*\r
-* 0: The default FreeRTOS critical section (BASEPRI) - default setting\r
-* 1: Always disable ALL interrupts (using PRIMASK)\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ * Default is 1.\r
*\r
-* Option 0 uses the standard FreeRTOS macros for critical sections.\r
-* However, on Cortex-M devices they only disable interrupts with priorities \r
-* below a certain configurable level, while higher priority ISRs remain active.\r
-* Such high-priority ISRs may not use the recorder functions in this mode.\r
-*\r
-* Option 1 allows you to safely call the recorder from any ISR, independent of \r
-* the interrupt priority. This mode may however cause higher IRQ latencies\r
-* (some microseconds) since ALL configurable interrupts are disabled during \r
-* the recorder's critical sections in this mode, using the PRIMASK register.\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_PRIMASK_CS 0\r
+#define USE_SEPARATE_USER_EVENT_BUFFER 0\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 addresses truncated to the \r
-* lower 24 bit. Otherwise set it to 0 to get the full 32-bit addresses.\r
-******************************************************************************/\r
-#define HEAP_SIZE_BELOW_16M 0\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
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h" />\r
- <ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcHooks.h" />\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h" />\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h" />\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcTypes.h" />\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcUser.h" />\r
<ClInclude Include="FreeRTOSConfig.h" />\r
<ClInclude Include="Trace_Recorder_Configuration\trcConfig.h" />\r
- <ClInclude Include="Trace_Recorder_Configuration\trcHardwarePort.h" />\r
</ItemGroup>\r
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
<ImportGroup Label="ExtensionTargets">\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcBase.h">\r
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcHooks.h">\r
- <Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernel.h">\r
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\Source\FreeRTOS-Plus-Trace\Include\trcKernelPort.h">\r
<Filter>FreeRTOS+\FreeRTOS+Trace\Include</Filter>\r
</ClInclude>\r
- <ClInclude Include="Trace_Recorder_Configuration\trcHardwarePort.h">\r
- <Filter>Demo App Source\Trace Recorder Configuration</Filter>\r
- </ClInclude>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.56486929" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
<externalSettings/>\r
<extensions>\r
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
- <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>\r
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
+ <extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
</extensions>\r
</storageModule>\r
<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
<option id="com.crt.advproject.link.gcc.hdrlib.2006557555" name="Use C library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>\r
<option id="gnu.c.link.option.nodeflibs.2072403274" name="Do not use default libraries (-nodefaultlibs)" superClass="gnu.c.link.option.nodeflibs" value="false" valueType="boolean"/>\r
<option id="com.crt.advproject.link.gcc.multicore.slave.1911982348" name="Multicore slave" superClass="com.crt.advproject.link.gcc.multicore.slave"/>\r
+ <option id="com.crt.advproject.link.gcc.multicore.master.userobjs.502901386" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" valueType="userObjs"/>\r
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1085761099" superClass="cdt.managedbuild.tool.gnu.c.linker.input">\r
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>\r
<additionalInput kind="additionalinput" paths="$(LIBS)"/>\r
<storageModule moduleId="com.crt.config">\r
<projectStorage><?xml version="1.0" encoding="UTF-8"?> \r
<TargetConfig> \r
-<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="60000"/> \r
+<Properties property_0="" property_2="LPC1850A_4350A_SPIFI.cfx" property_3="NXP" property_4="LPC1830" property_count="5" version="70200"/> \r
<infoList vendor="NXP"><info chip="LPC1830" match_id="0x0" name="LPC1830" resetscript="LPC18LPC43ExternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"><chip><name>LPC1830</name> \r
<family>LPC18xx</family> \r
<vendor>NXP (formerly Philips)</vendor> \r
<peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/> \r
<peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/> \r
<peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/> \r
+<peripheralInstance derived_from="SPIFI" id="SPIFI" location="0x40003000"/> \r
<peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/> \r
<peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/> \r
<peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/> \r
<peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/> \r
+<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/> \r
<peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/> \r
<peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/> \r
<peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/> \r
<peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/> \r
<peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/> \r
<peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/> \r
-<peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/> \r
</chip> \r
<processor><name gcc_name="cortex-m3">Cortex-M3</name> \r
<family>Cortex-M</family> \r
#define configTICK_RATE_HZ 100\r
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 300 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40 * 1024 ) ) /* Has not effect in this demo as the heap is manually pointed to AHB RAM. */\r
-#define configMAX_TASK_NAME_LEN ( 12 )\r
+#define configMAX_TASK_NAME_LEN ( 9 )\r
#define configIDLE_SHOULD_YIELD 0\r
#define configQUEUE_REGISTRY_SIZE 10\r
#define configUSE_TRACE_FACILITY 1\r
--- /dev/null
+/* The name of this header file is set by the trace recorder code, but the name\r
+of the actual header file is used below. */\r
+#include "lpc18xx.h"\r
/*******************************************************************************\r
- * Tracealyzer v2.6.0 Recorder Library\r
+ * Tracealyzer v2.7.0 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
+ * 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
* 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
+ * 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
+ * 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
- * Copyright Percepio AB, 2013.\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
- * CONFIGURATION RELATED TO CAPACITY AND ALLOCATION \r
- ******************************************************************************/\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. Each registered event typically use one record (4 byte), but\r
- * vTracePrintF may use multiple records depending on the number of data args.\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
-#define EVENT_BUFFER_SIZE 10000 /* Adjust wrt. to available RAM */\r
+#ifndef WIN32\r
+ // Set the port setting here!\r
+ #define SELECTED_PORT PORT_ARM_CortexM\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
+#endif\r
\r
-/*******************************************************************************\r
- * USE_LINKER_PRAGMA\r
- *\r
- * Macro which should be defined as an integer value, default is 0.\r
+/******************************************************************************\r
+ * FREERTOS_VERSION\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
+ * 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
- * 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
-\r
-#define USE_LINKER_PRAGMA 0\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
- * SYMBOL_TABLE_SIZE\r
+/******************************************************************************\r
+ * TRACE_RECORDER_STORE_MODE\r
*\r
- * Macro which should be defined as an integer value.\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
- * 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. Note that the names of active objects not stored here but in the \r
- * Object Table. Thus, if you don't use User Events or delete any kernel \r
- * objects you set this to a very low value, e.g. 4, but not zero (0) since \r
- * this causes a declaration of a zero-sized array, for which the C compiler\r
- * behavior is not standardized and may cause misaligned data.\r
- ******************************************************************************/\r
-#define SYMBOL_TABLE_SIZE 1000\r
-\r
-#if (SYMBOL_TABLE_SIZE == 0)\r
-#error "SYMBOL_TABLE_SIZE may not be zero!"\r
-#endif\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
- * USE_SEPARATE_USER_EVENT_BUFFER\r
+ * TRACE_SCHEDULING_ONLY\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.\r
+ * If this setting is enabled (= 1), only scheduling events are recorded.\r
+ * If disabled (= 0), all events are recorded.\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
+ * Users of FreeRTOS+Trace Free Edition only displays scheduling events, so this\r
+ * option can be used to avoid storing unsupported events.\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
+ * Default value is 0 (store all enabled events).\r
*\r
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
******************************************************************************/\r
-#define USER_EVENT_BUFFER_SIZE 500\r
+#define TRACE_SCHEDULING_ONLY 0\r
\r
/*******************************************************************************\r
- * USER_EVENT_CHANNELS\r
+ * EVENT_BUFFER_SIZE\r
*\r
* Macro which should be defined as an integer value.\r
*\r
- * This defines the number of allowed user event channels.\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
- * Only in use if USE_SEPARATE_USER_EVENT_BUFFER is set to 1.\r
+ * Default value is 1000, which means that 4000 bytes is allocated for the\r
+ * event buffer.\r
******************************************************************************/\r
-#define CHANNEL_FORMAT_PAIRS 32\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 an integer value of zero (0) \r
- * or larger.\r
+ * A group of macros which should be defined as integer values, zero or larger.\r
*\r
- * This defines the capacity of the Object Property Table - the maximum number\r
- * of objects active at any given point within each object class.\r
- * \r
- * NOTE: In case objects are deleted and created during runtime, this setting\r
- * does not limit the total amount of objects, only the number of concurrently\r
- * active objects. \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
- * Using too small values will give an error message through the vTraceError\r
- * routine, which makes the error message appear when opening the trace data\r
- * in Tracealyzer. If you are using the recorder status monitor task,\r
- * any error messages are displayed in console prints, assuming that the\r
- * print macro has been defined properly (vConsolePrintMessage). \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
- * It can be wise to start with very large values for these constants, \r
- * unless you are very confident on these numbers. Then do a recording and\r
- * check the actual usage in Tracealyzer. This is shown by selecting\r
- * View -> Trace Details -> Resource Usage -> Object Table\r
- * \r
- * NOTE 2: Remember to account for all tasks and other objects created by \r
- * the kernel, such as the IDLE task, any timer tasks, and any tasks created \r
- * by other 3rd party software components, such as communication stacks.\r
- * Moreover, one task slot is used to indicate "(startup)", i.e., a fictive \r
- * task that represent the time before the scheduler starts. \r
- * NTask should thus be at least 2-3 slots larger than your application task count.\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 4\r
-#define NQueue 10\r
-#define NSemaphore 10\r
-#define NMutex 5\r
-#define NTimer 10\r
-#define NEventGroup 1\r
-\r
-/* Maximum object name length for each class (includes zero termination) */\r
-#define NameLenTask configMAX_TASK_NAME_LEN\r
-#define NameLenISR 10\r
-#define NameLenQueue 15\r
-#define NameLenSemaphore 15\r
-#define NameLenMutex 15\r
-#define NameLenTimer 15\r
-#define NameLenEventGroup 15\r
+#define NTask 15\r
+#define NISR 4\r
+#define NQueue 10\r
+#define NSemaphore 10\r
+#define NMutex 5\r
+#define NTimer 10\r
+#define NEventGroup 1\r
\r
/******************************************************************************\r
- * TRACE_DESCRIPTION\r
+ * INCLUDE_MEMMANG_EVENTS\r
*\r
- * Macro which should be defined as a string.\r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * This string is stored in the trace and displayed in Tracealyzer. Can be\r
- * used to store, e.g., system version or build date. This is also used to store\r
- * internal error messages from the recorder, which if occurs overwrites the\r
- * value defined here. This may be maximum 256 chars.\r
- *****************************************************************************/\r
-#define TRACE_DESCRIPTION "FreeRTOS+Trace Demo"\r
-\r
-/******************************************************************************\r
- * TRACE_DESCRIPTION_MAX_LENGTH\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
- * The maximum length (including zero termination) for the TRACE_DESCRIPTION\r
- * string. Since this string also is used for internal error messages from the \r
- * recorder do not make it too short, as this may truncate the error messages.\r
- * Default is 80. \r
- * Maximum allowed length is 256 - the trace will fail to load if longer.\r
+ * Default value is 1.\r
*****************************************************************************/\r
-#define TRACE_DESCRIPTION_MAX_LENGTH 80\r
-\r
+#define INCLUDE_MEMMANG_EVENTS 1\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
+ * INCLUDE_USER_EVENTS\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
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * Using dynamic allocation may give more flexibility in some cases.\r
- *****************************************************************************/\r
-\r
-#define TRACE_DATA_ALLOCATION TRACE_DATA_ALLOCATION_STATIC\r
-\r
-\r
-/******************************************************************************\r
- * CONFIGURATION REGARDING WHAT CODE/FEATURES TO INCLUDE\r
- *****************************************************************************/\r
-\r
-/******************************************************************************\r
- * USE_TRACE_ASSERT\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
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 0.\r
+ * Default value 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
+ * Note that User Events are only displayed in Professional Edition.\r
*****************************************************************************/\r
-#define USE_TRACE_ASSERT 1\r
+#define INCLUDE_USER_EVENTS 0\r
\r
-/******************************************************************************\r
- * INCLUDE_FLOAT_SUPPORT\r
- *\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+/*****************************************************************************\r
+ * INCLUDE_ISR_TRACING\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) argments. \r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * Note: vTracePrintF can still be used with integer and string arguments in\r
- * either case.\r
- *****************************************************************************/\r
-#define INCLUDE_FLOAT_SUPPORT 0\r
-\r
-/******************************************************************************\r
- * INCLUDE_USER_EVENTS\r
+ * If this is zero (0), the code for recording Interrupt Service Routines is\r
+ * excluded to reduce code size.\r
*\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+ * Default value is 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
- * Note that User Events are not displayed in FreeRTOS+Trace Free Edition.\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_USER_EVENTS 1\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
- * Default is 1.\r
+ * Macro which should be defined as either zero (0) or one (1).\r
*\r
- * If this is zero (0), the code for recording Ready events is \r
- * excluded. Note, this will make it impossible to calculate the correct\r
- * response times.\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
- * Default is 0.\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
+ * 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_ISR_TRACING\r
+/******************************************************************************\r
+ * INCLUDE_FLOAT_SUPPORT\r
*\r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\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
- * 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
+ * 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_ISR_TRACING 1\r
+#define INCLUDE_FLOAT_SUPPORT 0\r
\r
/******************************************************************************\r
* INCLUDE_OBJECT_DELETE\r
- * \r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 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
+ * 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
-#ifdef INCLUDE_OBJECT_DELETE\r
-#undef INCLUDE_OBJECT_DELETE\r
-#endif\r
-\r
#define INCLUDE_OBJECT_DELETE 1\r
\r
-/******************************************************************************\r
- * INCLUDE_MEMMANG_EVENTS\r
- * \r
- * Macro which should be defined as either zero (0) or one (1). \r
- * Default is 1.\r
+/*******************************************************************************\r
+ * SYMBOL_TABLE_SIZE\r
*\r
- * This controls if malloc and free calls should be traced. Set this to zero to\r
- * exclude malloc/free calls from the tracing.\r
- *****************************************************************************/\r
-#define INCLUDE_MEMMANG_EVENTS 0\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
- * CONFIGURATION RELATED TO BEHAVIOR\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_RECORDER_STORE_MODE\r
+ * TRACE_DATA_ALLOCATION\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
+ * 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
- * With TRACE_RECORDER_STORE_MODE set to TRACE_STORE_MODE_RING_BUFFER, the events are \r
- * stored in a ring buffer, i.e., where the oldest events are overwritten when \r
- * the buffer becomes full. This allows you to get the last events leading up \r
- * to an interesting state, e.g., an error, without having a large trace buffer\r
- * for string the whole run since startup. In this mode, the recorder can run\r
- * "forever" as the buffer never gets full, i.e., in the sense that it always\r
- * has room for more events.\r
- *\r
- * To fetch the trace in mode TRACE_STORE_MODE_RING_BUFFER, you need to first halt the\r
- * system using your debugger and then do a RAM dump, or to explicitly stop the\r
- * recorder using vTraceStop() and then store/upload the trace data using a\r
- * task that you need to provide yourself. The trace data is found in the struct\r
- * RecorderData, initialized in trcBase.c.\r
- *\r
- * Note that, if you upload the trace using a RAM dump, i.e., when the system is \r
- * halted on a breakpoint or by a debugger command, there is no need to stop the \r
- * recorder first.\r
- *\r
- * When TRACE_RECORDER_STORE_MODE is TRACE_STORE_MODE_STOP_WHEN_FULL, the recording is\r
- * stopped when the buffer becomes full. When the recorder stops itself this way\r
- * vTracePortEnd() is called which allows for custom actions, such as triggering\r
- * a task that stores the trace buffer, i.e., in case taking a RAM dump\r
- * using an on-chip debugger is not possible. In the Windows port, vTracePortEnd\r
- * saves the trace to file directly, but this is not recommended in a real-time\r
- * system since the scheduler is blocked during the processing of vTracePortEnd.\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
-#define TRACE_RECORDER_STORE_MODE TRACE_STORE_MODE_RING_BUFFER\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
- * STOP_AFTER_N_EVENTS\r
+ * USE_LINKER_PRAGMA\r
*\r
- * Macro which should be defined as an integer value, or not defined.\r
- * Default is -1\r
+ * Macro which should be defined as an integer value, default is 0.\r
*\r
- * STOP_AFTER_N_EVENTS is intended for tests of the ring buffer mode (when\r
- * RECORDER_STORE_MODE is STORE_MODE_RING_BUFFER). It stops the recording when\r
- * the specified number of events has been observed. This value can be larger\r
- * than the buffer size, to allow for test of the "wrapping around" that occurs\r
- * in ring buffer mode . A negative value (or no definition of this macro)\r
- * disables this feature.\r
- *****************************************************************************/\r
-#define STOP_AFTER_N_EVENTS -1\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
+ * Macro which should be defined as either zero (0) or one (1).\r
* Default is 1.\r
*\r
- * ### Instance Finish Events (IFE) ###\r
- *\r
- * For tasks with "infinite" main loops (non-terminating tasks), the concept\r
- * of a task instance has no clear definition, it is an application-specific\r
- * thing. Tracealyzer allows you to define Instance Finish Events (IFEs),\r
- * which marks the point in a cyclic task when the "task instance" ends.\r
- * The IFE is a blocking kernel call, typically in the main loop of a task\r
- * which typically reads a message queue, waits for a semaphore or performs\r
- * an explicit delay.\r
- *\r
- * If USE_IMPLICIT_IFE_RULES is one (1), the kernel macros (trcKernelPort.h)\r
- * will define what kernel calls are considered by default to be IFEs.\r
- *\r
- * However, Implicit IFEs only applies to blocking kernel calls. If a\r
- * service reads a message without blocking, it does not create a new\r
- * instance since no blocking occurred.\r
- *\r
- * Moreover, the actual IFE might sometimes be another blocking call. We \r
- * therefore allow for user-defined Explicit IFEs by calling\r
- *\r
- * vTraceTaskInstanceIsFinished()\r
- *\r
- * right before the kernel call considered as IFE. This does not create an\r
- * additional event but instead stores the service code and object handle\r
- * of the IFE call as properties of the task.\r
- *\r
- * If using Explicit IFEs and the task also calls an Implicit IFE, this may \r
- * result in additional incorrect task instances.\r
- * This is solved by disabling the Implicit IFEs for the task, by adding\r
- * a call to\r
- * \r
- * vTraceTaskSkipDefaultInstanceFinishedEvents()\r
- * \r
- * in the very beginning of that task. This allows you to combine Explicit IFEs\r
- * for some tasks with Implicit IFEs for the rest of the tasks, if\r
- * USE_IMPLICIT_IFE_RULES is 1.\r
- *\r
- * By setting USE_IMPLICIT_IFE_RULES to zero (0), the implicit IFEs are disabled\r
- * for all tasks. Tasks will then be considered to have a single instance only, \r
- * covering all execution fragments, unless you define an explicit IFE in each\r
- * task by calling vTraceTaskInstanceIsFinished before the blocking call.\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
/******************************************************************************\r
* USE_16BIT_OBJECT_HANDLES\r
*\r
* Macro which should be defined as either zero (0) or one (1).\r
- * Default is 0.\r
*\r
- * If set to 0 (zero), the recorder uses 8-bit handles to identify kernel \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
+ * 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
- * NOTE: An object with a high ID (> 255) will generate an extra event \r
- * (= 4 byte) in the event buffer. \r
- * \r
- * NOTE: Some internal tables in the recorder gets larger when using 16-bit \r
- * handles. The additional RAM usage is 5-10 byte plus 1 byte per kernel object\r
- *, i.e., task, queue, semaphore, mutex, etc.\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
-/****** Port Name ******************** Code ** Official ** OS Platform ******\r
-* PORT_APPLICATION_DEFINED -2 - - \r
-* PORT_NOT_SET -1 - - \r
-* PORT_HWIndependent 0 Yes Any \r
-* PORT_Win32 1 Yes FreeRTOS 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_PIC32 9 No 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
-*****************************************************************************/\r
-#define SELECTED_PORT PORT_ARM_CortexM\r
-\r
-#if (SELECTED_PORT == PORT_NOT_SET)\r
-#error "You need to define SELECTED_PORT here!"\r
-#endif\r
-\r
/******************************************************************************\r
-* USE_PRIMASK_CS (for Cortex M devices only)\r
-*\r
-* An integer constant that selects between two options for the critical\r
-* sections of the recorder library.\r
+ * USE_TRACE_ASSERT\r
*\r
-* 0: The default FreeRTOS critical section (BASEPRI) - default setting\r
-* 1: Always disable ALL interrupts (using PRIMASK)\r
+ * Macro which should be defined as either zero (0) or one (1).\r
+ * Default is 1.\r
*\r
-* Option 0 uses the standard FreeRTOS macros for critical sections.\r
-* However, on Cortex-M devices they only disable interrupts with priorities \r
-* below a certain configurable level, while higher priority ISRs remain active.\r
-* Such high-priority ISRs may not use the recorder functions in this mode.\r
-*\r
-* Option 1 allows you to safely call the recorder from any ISR, independent of \r
-* the interrupt priority. This mode may however cause higher IRQ latencies\r
-* (some microseconds) since ALL configurable interrupts are disabled during \r
-* the recorder's critical sections in this mode, using the PRIMASK register.\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_PRIMASK_CS 0\r
+#define USE_SEPARATE_USER_EVENT_BUFFER 0\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 addresses truncated to the \r
-* lower 24 bit. Otherwise set it to 0 to get the full 32-bit addresses.\r
-******************************************************************************/\r
-#define HEAP_SIZE_BELOW_16M 0\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
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-2135181506" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-726532912" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
<language-scope id="org.eclipse.cdt.core.gcc"/>\r
<language-scope id="org.eclipse.cdt.core.g++"/>\r
</provider>\r
<Windows>\r
\r
\r
- <Wnd0>\r
+ <Wnd2>\r
<Tabs>\r
<Tab>\r
<Identity>TabID-29494-21985</Identity>\r
<Factory>Workspace</Factory>\r
<Session>\r
\r
- <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session>\r
+ <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS_Source/port.c</ExpandedNode></NodeDict></Session>\r
</Tab>\r
</Tabs>\r
\r
- <SelectedTab>0</SelectedTab></Wnd0><Wnd1>\r
+ <SelectedTab>0</SelectedTab></Wnd2><Wnd3>\r
<Tabs>\r
<Tab>\r
<Identity>TabID-28344-23030</Identity>\r
</Tab>\r
<Tab><Identity>TabID-19430-2343</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>\r
\r
- <SelectedTab>0</SelectedTab></Wnd1></Windows>\r
+ <SelectedTab>0</SelectedTab></Wnd3></Windows>\r
<Editor>\r
\r
\r
\r
\r
- <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>64</YPos2><SelStart2>5909</SelStart2><SelEnd2>5909</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>62</YPos2><SelStart2>8654</SelStart2><SelEnd2>8654</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>64</YPos2><SelStart2>5909</SelStart2><SelEnd2>5909</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>62</YPos2><SelStart2>8654</SelStart2><SelEnd2>8654</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\portmacro.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>132</YPos2><SelStart2>4892</SelStart2><SelEnd2>4892</SelEnd2></Tab><ActiveTab>3</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>1492</YPos2><SelStart2>53848</SelStart2><SelEnd2>53881</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
<Positions>\r
\r
\r
\r
\r
\r
- <Top><Row0><Sizes><Toolbar-013BA698><key>iaridepm.enu1</key></Toolbar-013BA698></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+ <Top><Row0><Sizes><Toolbar-002A6A90><key>iaridepm.enu1</key></Toolbar-002A6A90></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>742</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>756098</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203252</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203252</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
</Desktop>\r
</Workspace>\r
\r
/* The timer used to notify the task. */\r
static TimerHandle_t xTimer = NULL;\r
\r
+/* Used by the pseudo random number generating function. */\r
+static uint32_t ulNextRand = 0;\r
+\r
/*-----------------------------------------------------------*/\r
\r
void vStartTaskNotifyTask( void )\r
/* Create the task that performs some tests by itself, then loops around\r
being notified by both a software timer and an interrupt. */\r
xTaskCreate( prvNotifiedTask, "Notified", configMINIMAL_STACK_SIZE, NULL, notifyTASK_PRIORITY, &xTaskToNotify );\r
+\r
+ /* Pseudo seed the random number generator. */\r
+ ulNextRand = ( uint32_t ) prvRand;\r
}\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvNotifyingTimer( TimerHandle_t xTimer )\r
+static void prvNotifyingTimer( TimerHandle_t xNotUsed )\r
{\r
- ( void ) xTimer;\r
+ ( void ) xNotUsed;\r
\r
xTaskNotifyGive( xTaskToNotify );\r
\r
\r
static UBaseType_t prvRand( void )\r
{\r
- static uint32_t ulNextRand = ( uint32_t ) prvRand;\r
-\r
- const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL;\r
+const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL;\r
\r
/* Utility function to generate a pseudo random number. */\r
ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;\r
TC_INSTALL=C:\devtools\KPIT\GNURXv14.01-ELF\rx-ELF\rx-ELF\
GCC_STRING=4.7-GNURX_v14.01
VERSION_IDE=
+E2STUDIO_VERSION=3.1.2.09
ACTIVE_CONFIGURATION=HardwareDebug
-E2STUDIO_VERSION=3.0.1.09
<configuration id="%com.renesas.cdt.rx.hardwaredebug.win32.configuration.Id.606469687" name="HardwareDebug">\r
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
- <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="982537399514949188" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="1142094570" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS} -mcpu=rx600 -mlittle-endian-data" prefer-non-shared="true">\r
+ <provider class="com.renesas.cdt.common.build.spec.RXGCCBuiltinSpecsDetector" console="false" env-hash="879191947459214602" id="RXGCCBuiltinSpecsDetector" keep-relative-paths="false" name="Renesas GCCBuildinCompilerSettings" options-hash="1142094570" parameter="rx-elf-gcc -E -P -v -dD ${INPUTS}" prefer-non-shared="true">\r
<language-scope id="org.eclipse.cdt.core.gcc"/>\r
<language-scope id="org.eclipse.cdt.core.g++"/>\r
</provider>\r
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
</extension>\r
</configuration>\r
</project>\r
/* Called by vApplicationTickHook(), which is defined in main.c. */\r
void vFullDemoTickHookFunction( void )\r
{\r
+TaskHandle_t xTimerTask;\r
+\r
/* Call the periodic timer test, which tests the timer API functions that\r
can be called from an ISR. */\r
#if( configUSE_PREEMPTION != 0 )\r
\r
/* Exercise using task notifications from an interrupt. */\r
xNotifyTaskFromISR();\r
+\r
+ /* For code coverage purposes. */\r
+ xTimerTask = xTimerGetTimerDaemonTaskHandle();\r
+ configASSERT( uxTaskPriorityGetFromISR( xTimerTask ) == configTIMER_TASK_PRIORITY );\r
}\r
/*-----------------------------------------------------------*/\r
\r
#define configUSE_TASK_NOTIFICATIONS 1\r
#endif\r
\r
+#ifndef portTICK_TYPE_IS_ATOMIC\r
+ #define portTICK_TYPE_IS_ATOMIC 0\r
+#endif\r
+\r
+#if( portTICK_TYPE_IS_ATOMIC == 0 )\r
+ /* Either variables of tick type cannot be read atomically, or\r
+ portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when\r
+ the tick count is returned to the standard critical section macros. */\r
+ #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()\r
+ #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()\r
+ #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()\r
+ #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )\r
+#else\r
+ /* The tick type can be read atomically, so critical sections used when the\r
+ tick count is returned can be defined away. */\r
+ #define portTICK_TYPE_ENTER_CRITICAL()\r
+ #define portTICK_TYPE_EXIT_CRITICAL()\r
+ #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0\r
+ #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x\r
+#endif\r
+\r
/* Definitions to allow backward compatibility with FreeRTOS versions prior to\r
V8 if desired. */\r
#ifndef configENABLE_BACKWARD_COMPATIBILITY\r
*/\r
UBaseType_t uxTaskPriorityGet( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
\r
+/**\r
+ * task. h\r
+ * <pre>UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask );</pre>\r
+ *\r
+ * A version of uxTaskPriorityGet() that can be used from an ISR.\r
+ */\r
+UBaseType_t uxTaskPriorityGetFromISR( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
+\r
/**\r
* task. h\r
* <pre>eTaskState eTaskGetState( TaskHandle_t xTask );</pre>\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY (TickType_t) 0xFFFFFFFFF\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
\r
\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
\r
+/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+not need to be guarded with a critical section. */\r
+#define portTICK_TYPE_IS_ATOMIC 1\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Hardware specifics. */\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*---------------------------------------------------------------------------*/\r
\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Hardware specifics. */\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Hardware specifics. */\r
/*\r
- FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd. \r
+ FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Scheduler utilities. */\r
+#define portYIELD() \\r
+{ \\r
+ /* Set a PendSV to request a context switch. */ \\r
+ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; \\r
+ __DSB(); \\r
+ __ISB(); \\r
+}\r
+\r
#define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) )\r
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )\r
-#define portYIELD() vPortYield()\r
-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield()\r
+#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD()\r
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )\r
+\r
/*-----------------------------------------------------------*/\r
\r
/* Architecture specific optimisations. */\r
extern void vPortEnterCritical( void );\r
extern void vPortExitCritical( void );\r
\r
-#define portDISABLE_INTERRUPTS() ulPortRaiseBASEPRI()\r
-#define portENABLE_INTERRUPTS() vPortSetBASEPRI( 0 )\r
+#define portDISABLE_INTERRUPTS() \\r
+{ \\r
+ /* Work around. */ \\r
+ __set_BASEPRI( configMAX_SYSCALL_INTERRUPT_PRIORITY ); \\r
+ __DSB(); \\r
+ __ISB(); \\r
+}\r
+\r
+#define portENABLE_INTERRUPTS() __set_BASEPRI( 0 )\r
#define portENTER_CRITICAL() vPortEnterCritical()\r
#define portEXIT_CRITICAL() vPortExitCritical()\r
-#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()\r
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI( x )\r
+#define portSET_INTERRUPT_MASK_FROM_ISR() __get_BASEPRI(); portDISABLE_INTERRUPTS()\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) __set_BASEPRI( x )\r
/*-----------------------------------------------------------*/\r
\r
/* Tickless idle/low power functionality. */\r
/* portNOP() is not required by this port. */\r
#define portNOP()\r
\r
-#ifndef portFORCE_INLINE\r
- #define portFORCE_INLINE _Pragma("inline=forced")\r
-#endif\r
-\r
-portFORCE_INLINE static void vPortYield( void )\r
-{\r
- /* Set a PendSV to request a context switch. */\r
- portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;\r
-\r
- /* Barriers are normally not required but do ensure the code is completely\r
- within the specified behaviour for the architecture. */\r
- __DSB();\r
- __ISB();\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void )\r
-{\r
-uint32_t ulOriginalBASEPRI;\r
-\r
- __asm volatile\r
- (\r
- " mrs %0, basepri \n" \\r
- " mov r1, %1 \n" \\r
- " msr basepri, r1 \n" \\r
- " isb \n" \\r
- " dsb \n" \\r
- :"=r" (ulOriginalBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "r1"\r
- );\r
-\r
- /* This return will not be reached but is necessary to prevent compiler\r
- warnings. */\r
- return ulOriginalBASEPRI;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )\r
-{\r
- __asm volatile\r
- (\r
- " msr basepri, %0 " :: "r" ( ulNewMaskValue )\r
- );\r
-}\r
/*-----------------------------------------------------------*/\r
\r
/* Suppress warnings that are generated by the IAR tools, but cannot be fixed in\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
\r
/* Hardware specifics. */\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
#else\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
+\r
+ /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
+ not need to be guarded with a critical section. */\r
+ #define portTICK_TYPE_IS_ATOMIC 1\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
\r
uxSavedInterruptState = portSET_INTERRUPT_MASK_FROM_ISR();\r
{\r
- /* If null is passed in here then we are changing the\r
- priority of the calling function. */\r
+ /* If null is passed in here then it is the priority of the calling\r
+ task that is being queried. */\r
pxTCB = prvGetTCBFromHandle( xTask );\r
uxReturn = pxTCB->uxPriority;\r
}\r
TickType_t xTicks;\r
\r
/* Critical section required if running on a 16 bit processor. */\r
- taskENTER_CRITICAL();\r
+ portTICK_TYPE_ENTER_CRITICAL();\r
{\r
xTicks = xTickCount;\r
}\r
- taskEXIT_CRITICAL();\r
+ portTICK_TYPE_EXIT_CRITICAL();\r
\r
return xTicks;\r
}\r
link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */\r
portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
\r
- uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
+ uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR();\r
{\r
xReturn = xTickCount;\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
+ portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
\r
return xReturn;\r
}\r
\r
/* Pad the end of the string with spaces to ensure columns line up when\r
printed out. */\r
- for( x = strlen( pcBuffer ); x < configMAX_TASK_NAME_LEN; x++ )\r
+ for( x = strlen( pcBuffer ); x < ( configMAX_TASK_NAME_LEN - 1 ); x++ )\r
{\r
pcBuffer[ x ] = ' ';\r
}\r
{\r
switch( pxTaskStatusArray[ x ].eCurrentState )\r
{\r
- case eReady: cStatus = tskREADY_CHAR;\r
- break;\r
+ case eReady: cStatus = tskREADY_CHAR;\r
+ break;\r
\r
- case eBlocked: cStatus = tskBLOCKED_CHAR;\r
- break;\r
+ case eBlocked: cStatus = tskBLOCKED_CHAR;\r
+ break;\r
\r
- case eSuspended: cStatus = tskSUSPENDED_CHAR;\r
- break;\r
+ case eSuspended: cStatus = tskSUSPENDED_CHAR;\r
+ break;\r
\r
- case eDeleted: cStatus = tskDELETED_CHAR;\r
- break;\r
+ case eDeleted: cStatus = tskDELETED_CHAR;\r
+ break;\r
\r
- default: /* Should not get here, but it is included\r
- to prevent static checking errors. */\r
- cStatus = 0x00;\r
- break;\r
+ default: /* Should not get here, but it is included\r
+ to prevent static checking errors. */\r
+ cStatus = 0x00;\r
+ break;\r
}\r
\r
/* Write the task name to the string, padding with spaces so it\r
ulTotalRunTimeDiv100 has already been divided by 100. */\r
ulStatsAsPercentage = pxTaskStatusArray[ x ].ulRunTimeCounter / ulTotalTime;\r
\r
+ /* Write the task name to the string, padding with\r
+ spaces so it can be printed in tabular form more\r
+ easily. */\r
+ pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );\r
+\r
if( ulStatsAsPercentage > 0UL )\r
{\r
- /* Write the task name to the string, padding with\r
- spaces so it can be printed in tabular form more\r
- easily. */\r
- pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName );\r
-\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
sprintf( pcWriteBuffer, "\t\t%lu\t\t%lu%%\r\n", pxTaskStatusArray[ x ].ulRunTimeCounter, ulStatsAsPercentage );\r
consumed less than 1% of the total run time. */\r
#ifdef portLU_PRINTF_SPECIFIER_REQUIRED\r
{\r
- sprintf( pcWriteBuffer, "%s\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "\t\t%lu\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
#else\r
{\r
/* sizeof( int ) == sizeof( long ) so a smaller\r
printf() library can be used. */\r
- sprintf( pcWriteBuffer, "%s\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
+ sprintf( pcWriteBuffer, "\t\t%u\t\t<1%%\r\n", pxTaskStatusArray[ x ].pcTaskName, ( unsigned int ) pxTaskStatusArray[ x ].ulRunTimeCounter );\r
}\r
#endif\r
}\r
\r
if( xTaskResumeAll() == pdFALSE )\r
{\r
- /* Yield to wait for either a command to arrive, or the block time\r
- to expire. If a command arrived between the critical section being\r
- exited and this yield then the yield will not cause the task\r
- to block. */\r
+ /* Yield to wait for either a command to arrive, or the\r
+ block time to expire. If a command arrived between the\r
+ critical section being exited and this yield then the yield\r
+ will not cause the task to block. */\r
portYIELD_WITHIN_API();\r
}\r
else\r
xMessage.u.xCallbackParameters.ulParameter2 = ulParameter2;\r
\r
xReturn = xQueueSendFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );\r
- \r
+\r
tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, xReturn );\r
\r
return xReturn;\r
xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait );\r
\r
tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, xReturn );\r
- \r
+\r
return xReturn;\r
}\r
\r