Everything
 

[Printf event] tab


Use this tab to configure Printf events as action events (see "2.15 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.23

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.14

Relationship between Variable Expressions and Output Value (Printf Event)

Variable Expression

Output Value

Variable name of C/C++ languageNote 1

Value of C/C++ language variable

Variable expression [Variable expression]

Element of array

Variable expression.Member nameNote 2

Member of structure/union/class

Variable expression -> Member nameNote 2

Member of structure/union/class that pointer designates

Variable expression.*Cast expression

Value of a pointer to member variable

Variable expression->*Cast expression

Value of a pointer to member variable

*Variable expression

Value of pointer variable

&Variable expression

Location address

(Type name) Variable expression

Value cast to a specified type

CPU register name

Value of a CPU register

SFR name

Value of a SFR

Label nameNote 3, EQU symbol nameNote 3 and immediate address

Values of label, EQU symbol and immediate address

Note 1.

It represents C language (C89/C99) and C++ language variables.

Note 2.

When using a member variable of a base class, specify the scope before the member name (e.g. variable.BaseClass::member).

Note 3.

If the label name or EQU symbol name includes a "$", be sure to enclose the name in "{ }" (e.g. {$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" that indicates an imaginary number.

Remark

A symbol name at the current caret position can be complemented by pressing the [Ctrl] + [Space] key in this text box (see "2.20.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.20.2 Symbol name completion function").

 

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

Figure A.24

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.10 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).

[Function buttons]

Button

Function

OK

Finishes configuring the Printf event, and sets it at the caret position in the Editor panel/Disassemble panel.

Cancel

Cancels the Printf event settings and closes this dialog box.

Help

Displays the help for this dialog box.