/*******************************************************************************\r
- * FreeRTOS+Trace v2.2.3 Recorder Library\r
- * Percepio AB, www.percepio.se\r
+ * FreeRTOS+Trace v2.3.0 Recorder Library\r
+ * Percepio AB, www.percepio.com\r
*\r
* trcUser.h\r
* The public API of the trace recorder library.\r
*\r
* FreeRTOS+Trace is available as Free Edition and in two premium editions.\r
* You may use the premium features during 30 days for evaluation.\r
- * Download FreeRTOS+Trace at http://www.percepio.se/index.php?page=downloads\r
+ * Download FreeRTOS+Trace at http://www.percepio.com/products/downloads/\r
*\r
* Copyright Percepio AB, 2012.\r
- * www.percepio.se\r
+ * www.percepio.com\r
******************************************************************************/\r
\r
#ifndef TRCUSER_H\r
\r
#include "FreeRTOS.h"\r
\r
-#if (configUSE_TRACE_FACILITY == 1)\r
+#include "trcKernel.h"\r
\r
-#include "trcBase.h"\r
+#if (configUSE_TRACE_FACILITY == 1)\r
\r
#ifdef __cplusplus\r
extern "C" {\r
* portEXIT_CRITICAL();\r
* }\r
******************************************************************************/\r
-void vTraceSetISRProperties(objectHandleType handle, char* name, char priority);\r
+void vTraceSetISRProperties(objectHandleType handle, const char* name, char priority);\r
\r
/*******************************************************************************\r
* vTraceStoreISRBegin\r
* \r
- * Registers the beginning of an Interrupt Service Routine. This must not be\r
- * interrupted by another ISR containing recorder library calls, so if allowing\r
- * nested ISRs this must be called with interrupts disabled.\r
+ * Registers the beginning of an Interrupt Service Routine.\r
+ *\r
+ * Note! This may only be used for interrupts affected by portENTER_CRITICAL.\r
+ * In some FreeRTOS ports, such as ARM Cortex M3, this does not disable all\r
+ * interrupts. Interrupts above configMAX_SYSCALL_INTERRUPT_PRIORITY are still \r
+ * enabled, but may not call the FreeRTOS API. Such may not call the recorder \r
+ * API, including this function.\r
+ *\r
+ * See http://www.freertos.org/a00110.html\r
+ * \r
+ * If allowing nested ISRs, this must be called with interrupts disabled. \r
*\r
* Example:\r
* #define ID_ISR_TIMER1 1 // lowest valid ID is 1\r
/*******************************************************************************\r
* vTraceStoreISREnd\r
* \r
- * Registers the end of an Interrupt Service Routine. This must not be\r
- * interrupted by another ISR containing recorder library calls, so if allowing\r
- * nested ISRs this must be called with interrupts disabled.\r
+ * Registers the end of an Interrupt Service Routine.\r
+ *\r
+ * Note! This may only be used for interrupts affected by portENTER_CRITICAL.\r
+ * In some FreeRTOS ports, such as ARM Cortex M3, this does not disable all\r
+ * interrupts. Interrupts above configMAX_SYSCALL_INTERRUPT_PRIORITY are still \r
+ * enabled, but may not call the FreeRTOS API. Such may not call the recorder \r
+ * API, including this function.\r
+ *\r
+ * See http://www.freertos.org/a00110.html\r
+ * \r
+ * If allowing nested ISRs, this must be called with interrupts disabled. \r
*\r
* Example:\r
* #define ID_ISR_TIMER1 1 // lowest valid ID is 1\r
void vTraceStoreISREnd(void);\r
\r
#else\r
-\r
/* If not including the ISR recording */\r
\r
- #define vTraceSetISRProperties(handle, name, priority)\r
- #define vTraceStoreISRBegin(id)\r
- #define vTraceStoreISREnd()\r
+void vTraceIncreaseISRActive(void);\r
+\r
+void vTraceDecreaseISRActive(void);\r
+\r
+#define vTraceSetISRProperties(handle, name, priority)\r
+#define vTraceStoreISRBegin(id) vTraceIncreaseISRActive()\r
+#define vTraceStoreISREnd() vTraceDecreaseISRActive()\r
\r
#endif\r
\r
* executed and/or located in time-critical code. The lookup operation is\r
* however fairly fast due to the design of the symbol table.\r
******************************************************************************/\r
-traceLabel xTraceOpenLabel(char* label);\r
+traceLabel xTraceOpenLabel(const char* label);\r
\r
/******************************************************************************\r
* vTraceUserEvent\r
* %hu - 16 bit unsigned integer\r
* %bd - 8 bit signed integer\r
* %bu - 8 bit unsigned integer\r
- * %lf - double-precision float\r
+ * %lf - double-precision float (Note! See below...)\r
* \r
* Up to 15 data arguments are allowed, with a total size of maximum 32 byte.\r
* In case this is exceeded, the user event is changed into an error message.\r
* \r
* The data is stored in trace buffer, and is packed to allow storing multiple \r
* smaller data entries in the same 4-byte record, e.g., four 8-bit values.\r
- * A string requires two bytes, as the symbol table is limited to 64K. Storing a \r
- * double (%lf) uses two records, so this is quite costly. Use float (%f) unless\r
- * the higher precision is really necessary.\r
+ * A string requires two bytes, as the symbol table is limited to 64K. Storing \r
+ * a double (%lf) uses two records, so this is quite costly. Use float (%f) \r
+ * unless the higher precision is really necessary.\r
+ * \r
+ * Note that the double-precision float (%lf) assumes a 64 bit double \r
+ * representation. This does not seem to be the case on e.g. PIC24F. \r
+ * Before using a %lf argument on a 16-bit MCU, please verify that \r
+ * "sizeof(double)" actually gives 8 as expected. If not, use %f instead.\r
******************************************************************************/ \r
void vTracePrintF(traceLabel eventLabel, const char* formatStr, ...);\r
\r
#endif\r
\r
/******************************************************************************\r
- * vTraceExcludeTask\r
+ * vTraceExclude______FromTrace\r
*\r
- * Excludes a task from the recording using a flag in the Object Property Table.\r
+ * Excludes a task or object from the trace.\r
* This can be useful if some irrelevant task is very frequent and is "eating\r
- * up the buffer". This should be called the task has been created, but \r
+ * up the buffer". This should be called after the task has been created, but \r
* before starting the FreeRTOS scheduler.\r
*****************************************************************************/\r
-void vTraceExcludeTaskFromSchedulingTrace(const char* name);\r
+void vTraceExcludeQueueFromTrace(void* handle);\r
+void vTraceExcludeSemaphoreFromTrace(void* handle);\r
+void vTraceExcludeMutexFromTrace(void* handle);\r
+void vTraceExcludeTaskFromTrace(void* handle);\r
+void vTraceExcludeKernelServiceFromTrace(traceKernelService kernelService);\r
+\r
+/******************************************************************************\r
+ * vTraceInclude______InTrace\r
+ *\r
+ * Includes a task, object or kernel service in the trace. This is only\r
+ * necessary if the task or object has been previously exluded.\r
+ *****************************************************************************/\r
+void vTraceIncludeQueueInTrace(void* handle);\r
+void vTraceIncludeSemaphoreInTrace(void* handle);\r
+void vTraceIncludeMutexInTrace(void* handle);\r
+void vTraceIncludeTaskInTrace(void* handle);\r
+void vTraceIncludeKernelServiceInTrace(traceKernelService kernelService);\r
\r
#ifdef __cplusplus\r
}\r
#include "trcPort.h"\r
\r
#define vTraceInit()\r
+#define uiTraceStart() (1)\r
#define vTraceStart()\r
#define vTraceStop()\r
#define vTraceClear()\r
+#define vTraceStartStatusMonitor()\r
+#define vTracePortSetOutFile(f)\r
#define vTraceGetTraceBuffer() ((void*)0)\r
#define uiTraceGetTraceBufferSize() 0\r
#define xTraceOpenLabel(label) 0\r
#define vTracePrintF(eventLabel,formatStr,...)\r
#define vTraceExcludeTaskFromSchedulingTrace(name)\r
#define vTraceSetQueueName(queue, name)\r
+\r
#define vTraceTaskSkipDefaultInstanceFinishedEvents()\r
#define vTraceSetISRProperties(handle, name, priority)\r
#define vTraceStoreISRBegin(id)\r
#define vTraceStoreISREnd()\r
#endif\r
#endif\r
+\r