* meaningful units. See the documentation page for the Windows simulator for\r
* an explanation of the slow timing:\r
* http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html\r
+ *\r
+ * Documentation for this demo can be found on:\r
+ * http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_Trace/Free_RTOS_Plus_Trace_CLI_Example.shtml\r
******************************************************************************\r
*\r
* This is a simple FreeRTOS Windows simulator project that makes it easy to\r
* the screen before returning to block on the queue once again. This\r
* sequencing is clearly visible in the recorded FreeRTOS+Trace data.\r
*\r
- * Finally, a trace monitoring task is also created that prints out a message\r
- * when it determines that the status of the trace has changed since it last\r
- * executed. It prints out a message when the trace has started, when the\r
- * trace has stopped, and periodically when the trace is executing.\r
- *\r
*/\r
\r
/* Standard includes. */\r
/* The queue used by both tasks. */\r
static xQueueHandle xQueue = NULL;\r
\r
+/* The user trace event posted to the trace recording on each tick interrupt.\r
+Note tick events will not appear in the trace recording with regular period\r
+because this project runs in a Windows simulator, and does not therefore\r
+exhibit deterministic behaviour. */\r
+traceLabel xTickTraceUserEvent;\r
+\r
/*-----------------------------------------------------------*/\r
\r
int main( void )\r
{\r
const uint32_t ulLongTime_ms = 250UL;\r
\r
+ /* Initialise the trace recorder and create the label used to post user\r
+ events to the trace recording on each tick interrupt. */\r
+ vTraceInitTraceData();\r
+ xTickTraceUserEvent = xTraceOpenLabel( "tick" );\r
+\r
/* Create the queue used to pass messages from the queue send task to the\r
queue receive task. */\r
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
is set using the configUDP_CLI_PORT_NUMBER setting in FreeRTOSConfig.h. */\r
xTaskCreate( vUDPCommandInterpreterTask, ( signed char * ) "CLI", configMINIMAL_STACK_SIZE, NULL, mainUDP_CLI_TASK_PRIORITY, NULL );\r
\r
- /* Create the task that monitors the trace recording status, printing\r
- periodic information to the display. */\r
- vTraceStartStatusMonitor();\r
-\r
/* Register commands with the FreeRTOS+CLI command interpreter. */\r
vRegisterCLICommands();\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vApplicationTickHook( void )\r
+{\r
+ /* Write a user event to the trace log. \r
+ Note tick events will not appear in the trace recording with regular period\r
+ because this project runs in a Windows simulator, and does not therefore\r
+ exhibit deterministic behaviour. */\r
+ vTraceUserEvent( xTickTraceUserEvent ); \r
+}\r
+\r