Exemplo n.º 1
0
/*******************************************************************************
 * Trace_Init
 *
 * The main initialization routine for the trace recorder. Configures the stream
 * and activates the TzCtrl task.
 * Also sets up the diagnostic User Event channels used by TzCtrl task.
 *
 ******************************************************************************/
void Trace_Init(void)
{
	TRC_STREAM_PORT_INIT();

	trcWarningChannel = vTraceStoreUserEventChannelName("Warnings from Recorder");

#if ((TRC_STREAM_PORT_BLOCKING_TRANSFER==1) && (TRC_MEASURE_BLOCKING_TIME))
	trcDiagnosticsChannel = vTraceStoreUserEventChannelName("Blocking on trace buffer");
#endif

  	/* Creates the TzCtrl task - receives trace commands (start, stop, ...) */
	xTaskCreate( TzCtrl, "TzCtrl", configMINIMAL_STACK_SIZE, NULL, TRC_CTRL_TASK_PRIORITY, &HandleTzCtrl );
}
Exemplo n.º 2
0
/*******************************************************************************
 * Trace_Init
 *
 * The main initialization routine for the embOS-Trace recorder. Configures RTT,
 * activates the PTRACE instrumentation in embOS and the TzCtrl task.
 * Also sets up the diagnostic User Event channels used by TzCtrl task.
 *
 * Settings used by the trace recorder are found in these header files:
 *  - SEGGER_RTT_Conf.h: settings for SEGGER Real-Time Terminal (RTT) which is
 *    used for the trace streaming.
 *  - trcKernelPort.h: RTT related settings for the trace streaming.
 *  - trcRecorder.h - settings for allocation of internal recorder tables.
 *  - trcHardwarePort.h - hardware-specific configuration (timestamping).
 ******************************************************************************/
void Trace_Init()
{
	/* Only RTT channel 0 works at the moment, so these only sets RTT_MODE! */
	SEGGER_RTT_ConfigUpBuffer(TRC_RTT_UP_BUFFER_INDEX,
								"TzData",
								_TzTraceData,
								sizeof(_TzTraceData),
								TRC_RTT_MODE );

	SEGGER_RTT_ConfigDownBuffer(TRC_RTT_DOWN_BUFFER_INDEX,
								"TzCtrl",
								_TzCtrlData,
								sizeof(_TzCtrlData),
								0);

	WarnChn = vTraceStoreUserEventChannelName("Warnings from Recorder");

#if ((TRC_RTT_MODE==SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) && (TRC_MEASURE_BLOCKING_TIME))
	RTTDiagChn = vTraceStoreUserEventChannelName("Blocking on trace buffer");
#endif

  	/* Creates the TzCtrl task - receives trace commands (start, stop, ...) */
	xTaskCreate( TzCtrl, "TzCtrl", configMINIMAL_STACK_SIZE, NULL, TRC_CTRL_TASK_PRIORITY, &HandleTzCtrl );
}