Qorivva MPC5xxx/SPC5xx Debugger and NEXUS Trace
61
©1989-2021 Lauterbach GmbH
Example: Selective Program Tracing
TraceEnable enables tracing exclusively for the selected events. All other program and data trace messaging
is disabled.
TraceEnable can also be applied on data trace. In this case, filtering is performed using the data trace
selectors of the NEXUS module, which supports differentiation between read and write accesses:
TraceEnable can be used for high precision time-distance measurements:
;Only generate a trace message when the instruction
;at address 0x00008230 is executed.
Break.Set 0x00008230 /Program /TraceEnable
;Only generate a trace message when the core writes to variable flags[3].
Var.Break.Set flags[3] /Write /TraceEnable
;Get start and end address of function to be measured
&a1=sYmbol.BEGIN(func_to_measure)
&a2=sYmbol.EXIT(func_to_measure)
;Only generate trace messages on the addresses used for measurement
Break.Set &a1 /Program /TraceEnable
Break.Set &a2 /Program /TraceEnable
;run application
Trace.Init
Go
WAIT 5.s
Break
;statistic analysis
Trace.STATistic.AddressDURation &a1 &a2
;plot time distance over time (can take some time for analysis)
Trace.PROFILECHART.DURATION /FILTERA ADDRess &a1 /FILTERB ADDRess &a2