Chapter 2: Getting Started with the Standard Interface
To use a C printf command
To use a C printf command
The Expression Printf command prints the formatted output of the command
to the Journal window using C format parameters. This command permits
type conversions, scaling, and positioning of output within the Journal window.
• Using the command line, enter:
Expression Printf "%010d",current_temp
In this example, the value of current_temp is printed as a decimal integer with a
field width of 10, padded with zeros.
The Expression Fprintf command can be used to print formatted output to a
file or user-defined window.
To break on an access to a variable
You can also set breakpoints on a read, a write, or any access of a variable.
This helps to locate defects due to multiple functions accessing the same
variable. Suppose you want to break on the access of the variable
¤t_temp.
1 Set the access breakpoint:
Breakpt Access ¤t_temp
2 Run the program:
Program Run
When the program stops (after approximately ten seconds), the code window
shows that the program stopped at the next reference to the variable
current_temp. Due to the latency of the emulation analyzer, the processor may
halt up to two instruction cycles after the breakpoint has been detected.
48