Initializing the Trace Recorder#

Initialize the SystemView Trace Recorder anywhere after the BSP has been initialized.

The code below shows an example where it gets initialized from the Startup task:

Listing - Initializing the SystemView Trace Recorder#
#include  <rtos/kernel/include/os_trace.h>

.

.

.

static  void  Ex_MainStartTask (void  *p_arg)

{

    PP_UNUSED_PARAM(p_arg);                                     /* Prevent compiler warning.                  */

    BSP_TickInit();                                             /* Initialize Kernel tick source.             */

    .

    .

    .

#if (OS_CFG_TRACE_EN == DEF_ENABLED)

    OS_TRACE_INIT();                                            /* Initialize the Trace recorder.             */

#endif