Reputation: 99
I have a script with a breakpoint A and I want to know if is a function that shows the run time till the breakpoint is reached(manually you see it at Misc Runtime ). Let's say if it hits at 10ms is passed if is more is fail. The current code for reaching the breakpoint is:
GO A
TOOLBOX WaitValidateBreakpoint A
ENTRY &StoppedAtBreakpoint
IF &StoppedAtBreakpoint==FALSE()
(
TOOLBOX TestStepFail "Breakpoint A is not reached"
RETURN
)
ELSE
(
TOOLBOX TestStepPass "Breakpoint A is reached"
RETURN
)
Upvotes: 1
Views: 713
Reputation: 4173
You can get time the core was running until it hits a breakpoints with the PRACTICE function RunTime.LASTRUN()
So you can write something like that:
IF RunTime.LASTRUN()<=10.ms
PRINT "OK"
ELSE
PRINT "Execution took too long!"
You can read more about PRACTICE functions in <t32sys>/pdf/general_func.pdf located in you TRACE32 installation.
See also: Benchmarking Code Runtime with Trace32
Upvotes: 2