[Printf event] tab


This tab is used to configure Printf events as action events (see "2.16 Set an Action into Programs").

A Printf event momentarily stops the execution of the program at a specified location, and executes the printf command via software processing. When a Printf event is set, the program momentarily stops immediately before executing the command at the location where this event is set, and the value of the variable expression specified in this dialog box is output to the Output panel.

This dialog box appears only when connected to the debug tool.

Figure A.37

Action Events Dialog Box: [Printf event] Tab

 

This section describes the following.

[How to open]

-

On the Editor panel, move the caret to the line where you wish to set a Printf event, then select [Register Action Event...] from the context menu.

-

On the Disassemble panel, move the caret to the address where you wish to set a Printf event, then select [Register Action Event...] from the context menu.

-

On the Events panel, select a Printf event, then select [Edit Condition...] from the context menu.

[Description of each area]

(1)

[Output string] area

Type in the string to add to the Output panel directly via the keyboard (up to 1024 characters).

Note that the output string can only be one line (spaces allowed).

(2)

[Variable expression] area

Specify the variable expression(s) for the Printf event.

Type a variable expression directly into the text box (up to 1024 characters).

You can specify up to 10 variable expressions for a single Printf event by separating them with commas (",").

If this dialog box opens with a variable expression selected in the Editor panel /Disassemble panel, the selected variable expression appears as the default.

The basic input format that can be specified as variable expressions and the values output by Printf event are as follows:

Table A.12

Relationship between Variable Expressions and Output Value (Printf Event)

Variable Expression

Output Value

Variable name of C language

Value of C language variable

Variable expression [Variable expression]

Element of array

Variable expression.Member name

Member of structure/union

Variable expression -> Member name

Member of structure/union that pointer designates

*Variable expression

Value of pointer variable

&Variable expression

Location address

CPU register name

Value of the CPU register

I/O register name

I/O register value

Label nameNote, EQU symbol nameNote and [immediate address]

Values of label, EQU symbol and immediate address

Note

If the label name or EQU symbol name includes a "$," be sure to enclose the name in "{ }".
Example: {$Label}
Any imaginary number must be multiplied by an uppercase "I" (e.g. 1.0 + 2.0*I). When you specify the CPU register name "I", add ":REG" (e.g. I:REG) to distinguish it from the keyword "I".

Remark

A symbol name at the current caret position can be complemented by pressing the [Ctrl] + [Space] key in this text box (see "2.19.2 Symbol name completion function").

(3)

[Address] area

Specify the address at which to set the Printf event.

You can either type an address expression directly into the text box (up to 1024 characters), or select them from the input history via the drop-down list (up to 10 items). The address of the location currently being specified is displayed by default.

Remark

A symbol name at the current caret position can be complemented by pressing the [Ctrl] + [Space] key in this text box (see "2.19.2 Symbol name completion function").

 

Note that the output result format by the Printf event in the Output panel are as follows:

Figure A.38

Output Result Format of Printf Event

Specified-characters Variable-expression-1 = Value-1, Variable-expression-2 = Value-2, ...

Specified characters

Characters specified with [Output string]

Variable expression 1 - 10

Characters specified with [Variable expression]

Value 1 - 10

Value of variable corresponds to " Variable expression 1 - 10 ".

The value is displayed in the default notation (see "Table A.7 Display Format of Watch-Expressions (Default)") according to the type of the variable (note, however, that "?" will be displayed if the specified variable expression cannot be obtained). Moreover, the value in hexadecimal number enclosing with "()" is also displayed (note, however, that "-" will be displayed if the value cannot be displayed in that notation).