1 #include <trcRecorder.h> 2 3 /* The handle to the runnable */ 4 TraceRunnableHandle_t xMyRunnableHandle1 = 0; 5 TraceRunnableHandle_t xMyRunnableHandle2 = 0; 6 TraceRunnableHandle_t xMyRunnableHandle3 = 0; 7 const char* MY_RUNNABLE_NAME1 = "MyRunnable1"; 8 const char* MY_RUNNABLE_NAME2 = "MyRunnable2"; 9 const char* MY_RUNNABLE_NAME3 = "MyRunnable3"; 10 11 void looper(void); 12 main(void)13int main(void) 14 { 15 /* First initialize */ 16 xTraceInitialize(); 17 18 /* Start tracing */ 19 xTraceEnable(TRC_START); 20 21 looper(); 22 23 return 0; 24 } 25 looper(void)26void looper(void) 27 { 28 /* Runnable in EntryTable */ 29 xTraceRunnableRegister(MY_RUNNABLE_NAME1, TRC_RUNNABLE_REGISTER_METHOD_USE_ENTRY_TABLE, &xMyRunnableHandle1); 30 31 /* Runnable from string address */ 32 xTraceRunnableRegister(MY_RUNNABLE_NAME2, TRC_RUNNABLE_REGISTER_METHOD_USE_STRING_ADDRESS, &xMyRunnableHandle2); 33 34 /* Runnable from Handle address */ 35 xTraceRunnableRegister(MY_RUNNABLE_NAME3, TRC_RUNNABLE_REGISTER_METHOD_USE_HANDLE_ADDRESS, &xMyRunnableHandle3); 36 37 for(;;) 38 { 39 xTraceRunnableStart(xMyRunnableHandle1); 40 /* call runnable 1 */ 41 xTraceRunnableStop(); 42 43 xTraceRunnableStart(xMyRunnableHandle2); 44 /* call runnable 2 */ 45 xTraceRunnableStop(); 46 47 xTraceRunnableStart(xMyRunnableHandle3); 48 /* call runnable 3 */ 49 xTraceRunnableStop(); 50 } 51 } 52