Configuring TraceAlyzer (Streaming Mode)
Configuring the TraceAlyzer Streaming Recorder
Configuration is performed through the addition of the following files:
(1) trcKernelPort.h
In this file you need to verify that the macro to obtain the system clock frequency in Hertz exists in your project. It is usually a function that is part of your BSP. The code listing below shows an example:
#define TRACE_CPU_CLOCK_HZ BSP_ClkFreqGet(BSP_CLK_ID_HCLK)
(2) trcConfig.h
From this file you can configure the name of the embedded target device by setting the macro TRC_RECORDER_HARDWARE_PORT
and the maximum number of kernel objects to trace. The code listing below shows an example:
#define TRC_RECORDER_HARDWARE_PORT TRC_PORT_ARM_Cortex_M #define NTask 32 #define NISR 8 #define NQueue 32 #define NSemaphore 64 #define NMutex 8 #define NFlag 2 #define NMem 2
TRC_PORT_ARM_Cortex_MNote: Setting TRC_RECORDER_HARDWARE_PORT
is very important. The options include the following:
TRC_PORT_ARM_Cortex_M_DWT
TRC_PORT_ARM_CORTEX_A9
TRC_PORT_Renesas_RX600
TRC_PORT_TEXAS_INSTRUMENTS_TMS570_RM48
TRC_PORT_MICROCHIP_PIC32_MX_MZ
(3) SEGGER_RTT_Conf.h
From this file you can configure the maximum number of bytes for the ring buffer used to stream the trace data up to the host application running on the PC. Low numbers will result in less data footprint at the expense of possible dropped events due to overflows during the communication. The code below shows an example:
#define BUFFER_SIZE_UP 4096u
The file SEGGER_RTT_Conf.h
contains other settings that are beyond the scope of this document. For more information on this configuration file refer to the SEGGER RTT Documentation .