Everything
2.15.1 Inset printf

By setting a Printf event that is one of "action events", the value of the specified variable expression can be output to the Output panel by executing a printf command after temporarily stopping the program in execution at an arbitrary position.

To use this function, follow the steps below.

Caution 1.

Also see "2.16.7 Notes for setting events" for details on action events (e.g. limits on the number of enabled events).

Caution 2.

No action events occur during step execution ( / / ) or execution ignoring break-related events ( ).

Caution 3.

[Simulator]
When [Yes] is specified with the [Execute instruction at breakpoint when break] property in the [Break] category on the [Debug Tool Settings] tab in the Property panel, all of action events currently being set are handled as Hardware Break events (i.e. no Printf events occur).

(1)

Set a Printf event

Set a Printf event to the position where you want to execute the printf command in the Editor panel/Disassemble panel.

On each panel, select [Register Action Event...] from the context menu after moving the caret to the line that has a valid address to open the Action Events dialog box below.

In this dialog box, follow the steps below.

Figure 2.96

Set Printf Event (Action Events Dialog Box: [Printf event] tab)

(a)

Specify [Output string]

Directly enter from the keyboard the characters to add when output to the Output panel.

Characters must be in one line (spaces allowed).

(b)

Specify [Variable expression]

Specify the variable expression for the Printf event to take place.

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.

For the basic input format that can be specified as variable expressions and the values output by Printf event, see "Table A.14 Relationship between Variable Expressions and Output Value (Printf Event)".

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

(c)

Specify [Address]

Specify the address at which to set the Printf event.

The address of the location currently being specified is displayed by default.

If you want to edit this area, 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).

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

(d)

Click the [OK] button

Set the Printf event to the line/address at the caret position in the Editor panel/Disassemble panel.

When the Printf event is set, the mark is displayed in the event area on the Editor panel/Disassemble panel, and the set Printf event is managed in the Events panel (see "2.16 Manage Events").

(2)

Execute the program

Execute the program (see "2.8 Execute Programs").

By executing the program, the program momentarily stops immediately before executing the instruction 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.

(3)

Check the output result

The output result format from the Printf event in the [Debug Tool] tab of the Output panel are as follows (see "Figure A.24 Output Result Format of Printf Event").

Figure 2.97

Example of Output Result of Printf Event

(4)

Edit the Printf event

You can edit the Print event that has been set once.

To do this, on the Events panel, select [Edit Condition...] from the context menu after selecting the Printf event to be edited. On the Action Events dialog box opened automatically, edit the items, and then click the [OK] button.