I read the tutorial for Trace Hook Macros and got a couple of questions.
In the example 2, how does the “reasonBLOCKING_ON_QUEUE_READ” defined? And how does the “log_event()” function logging the task execution? Is there any specific example in the Demo that logging task execution sequences, task timing, kernel events?
I ported it to CORTEX_LM3Sxxxx Rowley, and suspect one of my task stopped working and the RTOS is locking up for some reason. So I’m trying to figure it out by API call logging. Thank you in advance!
/* traceBLOCKING_ON_QUEUE_RECEIVE() is just one of the macros that can be used to record why
a context switch is about to occur. */
#define traceBLOCKING_ON_QUEUE_RECEIVE(pxQueue) \
ulSwitchReason = reasonBLOCKING_ON_QUEUE_READ;
/* log_event() is an application defined function that logs which tasks ran when, and why. */
#define traceTASK_SWITCHED_OUT() \
log_event( pxCurrentTCB, ulSwitchReason );