This panel displays the content of a registered watch-expression or changes the displayed value (see "2.11.6 Displaying and changing watch-expressions").
Up to four instances of this panel can be opened at a time. Each panel is discriminated by the name "Watch1," "Watch2," "Watch3" or "Watch4" in the title bar, allowing you to register, delete or move a watch-expression independently of the panel.
Watch-expressions can also be registered from the Editor panel, Disassemble panel, Memory panel, CPU Register panel, Local Variables panel or IOR panel, as well as from this panel.
If a panel that has watch-expressions registered in it is closed, the panel is hidden, but information on its registered watch-expressions is retained. (When the panel is reopened, it opens, with those watch-expressions registered in it as they were.)
When the value of any watch-expression changes after the program is executed, the display is updated. (During step execution, the display is updated successively as the program is stepped through.)
Also, if the Realtime display update function is enabled, the display of values can be updated in real time, even during program execution.
Note that this panel can only be opened when CS+ is connected with the debug tool.
By double-clicking a line delimiting each area on the panel, it is possible to change the relevant area to the smallest displayable width without omitting the content in it. |
This section describes the following.
This area displays registered watch-expressions in list form.
By clicking the table title part of this area, it is possible to sort the watch-expressions in the list in alphabetical order.
Also, it is possible to create a category (folder) as desired and display the watch-expressions, as classified by category, in tree form (see "(a) Editing a tree").
The meaning of each displayed icon is as follows:
Indicates a state that the watch-expressions belonging to this category are displayed. When you double-click the icon or click the "-" mark, the category is closed to hide the watch-expressions. |
||
Indicates a state that the watch-expressions belonging to this category are hidden. When you double-click the icon or click the "+" mark, the category is opened to display the watch-expressions. |
||
Indicates that the watch-expression is a variable. The watch-expression indicating an array, pointer type variable or a structure/union is marked with a "+" or "-" at the beginning, so that when the sign is clicked, the expression expands or collapses (see “(b) Expanding/collapsing the display”). |
||
Indicates that the watch-expression is a CPU register. The watch-expression having a lower level register (part of a register) is marked with a "+" or "-" at the beginning, so that when the sign is clicked, the expression expands or collapses (see “(b) Expanding/collapsing the display”). |
This area has the following features:
Watch-expressions can be classified by category (folder) for display in tree form.
To create a new category, move the caret to the position where you want to create and click the button in the toolbar or select [Create Category] on the context menu, and then enter any category name.
If the need arises to delete a category, select the category you want to delete, click the button in the toolbar or select [Delete] on the context menu.
Also, if you want to edit a category name you created, select the category name you want to edit and follow one of the following methods:
After creating a category, drag-and-drop the registered watch-expressions into the category. The watch-expressions are displayed in tree form classified by category.
Similarly, the order in which categories or watch-expressions are displayed (one above or below the other) can be changed as desired by a drag-and-drop operation.
Up to 64 categories can be created in one Watch panel. (If an attempt is made to create more categories exceeding this limit, a message is displayed.) |
If categories or watch-expressions in a Watch panel are drag-and-dropped into another Watch panel (Watch1 to Watch4), the categories or watch-expressions are copied into the target Watch panel. |
The watch-expression indicating an array, pointer type variable, a structure/union/class or a register (only those that bear a name representing a part) is marked with a "+" at the beginning, so that when you click the sign, the next entry is expanded for display (when expanded, the sign changes to a "-").
There are following three methods of registering a new watch-expression.
On another panel, perform one of the following operations on the subject that you want to register as a watch-expression:
Select the subject character string and then drag-and-drop it directly into this area on any Watch panel (Watch1 to Watch4) (except for the Editor panel). |
Select the subject character string or move the caret to one of subject character strings (the subject being automatically selected), and then select [Register to Watch1] on the context menu. |
Choose [Copy] from the [Edit] menu to copy the subject character string and then choose [Paste] from the [Edit] menu in this area on any Watch panel (Watch1 to Watch4). |
The table below shows the relationship between the panels for which this operation is possible and the subjects that are registrable as watch-expressions.
C/C++ variablesNote 1, CPU registers, I/O registers, and assembler symbols |
|
C/C++ variablesNote 1, CPU registers, I/O registers, and assembler symbols |
|
On any Watch panel (Watch1 to Watch4), click the button in the toolbar or select [Add New Watch] on the context menu. An entry box for new watch-expressions is displayed at the bottom of this area.
In the [Watch] area of the entry box, enter a watch-expression directly from the keyboard and then press the [Enter] key.
The form in which watch-expressions are entered this way is as follows:
Member values of the structure/union/class pointed to by a pointer |
|
Value of a label, value of an EQU symbol, value of an immediate address |
|
To specify a member variable of base class, specify scope before a member name. |
If a label name or EQU symbol name contains a "$," enclose the name in braces "{ }." |
Also, scope can be specified for a watch-expression when it is registered. When a watch-expression is registered by specifying scope, it is handled as shown below.
If a load module name or file name contains a space or one of the following symbols, enclose the name in double-quotes (" "). (Example: "c:\folder\prog.abs" $file.c#func) |
A search is made for static functions and global functions from the scope of the current PC value in that order. Static functions out of scope are not searched for. |
If a load module name or file name contains a space or one of the following symbols, enclose the name in double-quotes (" "). (Example: "c:\folder\prog.abs" $file.c#func#var) |
To specify a function and variable defined in a name space, be sure to write scope. (Example: Scope::func) |
If the current PC value exists in a specified function, the local variables that are not declared as static also comprise the subject to be searched. |
A search is made for local variables, static variables inside a file and global variables from the scope of the current PC value in that order. The local variables and the static variables inside a file that are out of scope are not searched for. |
A symbol name at the current caret position can be supplemented by pressing the [Ctrl] and [Space] keys together in this area. (See "2.21.2 Symbol name completion function.") |
If there exist a C/C++ variable, a CPU register and an I/O register with the same name that are registered without specifying scope, the symbols are resolved in the order given below, to display values. |
If there exist a local variable and a global variable with the same name that are registered by only a symbol name without specifying scope, the symbols are resolved based on the scope of the current PC value, to display values. |
If a watch-expression is registered from the IOR panel or CPU Register panel, the watch-expression will have scope specification automatically added to it. |
If the letter "I" alone is specified as a watch-expression, it is interpreted as an imaginary keyword. To acquire the value of a register "I," add ":REG" after the register. |
Select a character string representing a C/C++ variable, CPU register, I/O register or assembler symbol from an external editor or the like, and then perform one of the following operations:
Copy the subject character string to the clipboard and then select [Paste] on the [Edit] menu in this area on any Watch panel (Watch1 to Watch4). |
Up to 128 watch-expressions can be registered in one Watch panel. (If an attempt is made to register more watch-expressions exceeding this limit, a message is displayed.) |
In a block where a variable that is the subject of operation is not used, variable data may not always exist in the stack or register, due to optimization by a compiler. In this case, even when a variable that is the subject of operation is registered as a watch-expression, the displayed value remains marked with "?." |
Watch-expressions registered on each Watch panel (Watch1 to Watch4) are managed separately from each other and are saved as user information on the project. |
To edit a registered watch-expression, double-click the subject watch-expression to put it into edit mode and then enter the content of editing directly from the keyboard. (Pressing the [Esc] key cancels the edit mode.)
When you've finished editing a watch-expression, press the [Enter] key to complete the editing.
Click the button in the toolbar or select [Delete] on the context menu to delete a selected watch-expression.
By selecting [Access Break] or [Trace Output] on the context menu, it is possible to set various events in a selected watch-expression.
When an access-related break event is set, the icon of the watch-expression changes shape. (An event mark for break events is displayed additionally below the icon of the watch-expression.) If the event you set is a trace event, there are no changes to the mark of the watch-expression.
When an event is set, detail information on the set event is reflected in the Events panel.
However, events can be set only when the watch-expression for which you're going to set an event is a global variable, a static variable inside a function, a static variable inside a file, or an I/O register.
For details on how to set an event, see the sections listed below.
Selecting [Jump to Memory] on the context menu opens the Memory panel (Memory1), with the caret on it moved to the address where a selected watch-expression is defined. (If the Memory panel (Memory1) is already open, CS+ jumps to it directly.)
However, if multiple watch-expressions are selected at the same time or an I/O register or CPU register is selected, this operation has no effect.
To zoom in and out of the Watch panel view, change the zoom ratio by using the drop-down list on the toolbar of the Main window while the focus is placed in the Watch panel.
You can also change the zoom ratio by using the [Ctrl] key + mouse-wheel combination.
Using the [Ctrl] key + mouse-wheel forward will zoom into the view, making the contents larger and easier to see (max. 300%). |
Using the [Ctrl] key + mouse-wheel backward will zoom out of the view, making the contents smaller (min. 50%). |
If the panel is closed after the zoom ratio is changed, the changed zoom ratio is retained (next time, the panel will open at the changed zoom ratio).
This area displays or changes the value of a registered watch-expression.
Note that if the watch-expression is a function pointer, a function name is displayed.
The display notation (numeral representation) and encoding can be selected using a toolbar button or from the content menu. Also, it is possible to select a display form that always adds hexadecimal equivalents to the ordinary display.
Note that the default display form is automatically determined depending on the type of watch-expression, as follows:
The values of floating and complex types are rounded to an approximate value (nearest whole value) before being displayed. |
The meaning of marks displayed as values of watch-expressions and their colors are as follows. (The colors in which text and backgrounds are displayed depend on how the [General - Font and Color] category of the Option dialog box is set.)
Values of watch-expressions which have had their values changed by the user (Written into the target memory by hitting [Enter] key) |
|||
Values of watch-expressions which have their display updated in real time (Realtime display update function) |
|||
Values of watch-expressions whose values have changed as a result of program execution Highlighting is reset by clicking the button in the toolbar or selecting [Reset Color] on the context menu. |
|||
When nonexistent variables are registered as watch-expressions, or when values of watch-expressions could not be acquired (e.g., variables gotten out of scope) |
|||
The I/O registers that may get the microcontroller operated unintentionally by a read operation are protected against reads, so that they are not loaded with values. To load the contents of the I/O registers protected against reads, select [Force Read Value] on context menu. |
Watch-expressions have their values acquired in the order they are registered. |
If hexadecimal equivalents are added, the value in specified notation and its hexadecimal equivalent are read out separately. |
This area has the following features:
By using the realtime display update function, it is possible to display or change the value of a registered watch-expression, not only when the program is halted, but also when it is under execution.
For details about the realtime display update function, see "2.11.1.4 Displaying and changing memory contents during program execution."
To change the value of a watch-expression, select the value of the subject watch-expression and click on it again. Then enter a new value directly from the keyboard. (Pressing the [Esc] key cancels the edit mode.)
When you've finished editing the value of a watch-expression, press the [Enter] key or move the focus to other than the edit area. The value you've changed is written into the target memory.
For details on how to change the value of a watch-expression, see "2.11.6.6 Changing the contents of watch-expressions."
By choosing [Save Watch Data As...] from the [File] menu, it is possible to open the Save As dialog box and then save the entire content of this panel to a text file (*.txt) or CSV file (*.csv).
By selecting [Save Expanded Watch Data…] from the context menu, the Save As dialog box can be opened, and the selected contents of watch-expressions can be saved in a text file (*.txt) or CSV file (*.csv).
For details on how to save the values of watch-expressions, see "2.11.6.9 Saving the displayed contents of watch-expressions."
This area displays the type information of watch-expressions in the form shown below.
<Type of I/O register> (<Access attribute> <Access type><SizeNote 1>) |
||
<Type of watch-expression as determined by C compilerNote 2> (<SizeNote 1>) |
The sizes of watch-expressions are expressed in byte units. |
Watch-expressions are handled as having the type indicated here when they are compiled. |
This area displays the address to which each watch-expression is mapped (always expressed in hexadecimal).
However, if the watch-expression is a single CPU register or not determinable, it is marked with "-" or "?," respectively.
If the watch-expression is an I/O register that is a bit register, a bit offset value is added to its displayed address, as shown below. |
This area allows the user to enter a comment on a watch-expression or category, freely as desired.
The contents of comments entered in this area are held separately for each watch-expression and category, and are saved as user information on the project. Therefore, if one of these watch-expressions or categories is deleted, the content of its corresponding memo is also discarded.
Note that when an array, register or the like is expanded for display, you cannot enter a comment on any expanded element.
To edit a comment, double-click the item you want to edit. The selected item is placed in edit mode. (Pressing the [Esc] key cancels the edit mode.) A character string of up to 256 characters can be entered directly from the keyboard (new-line code ignored).
When you've finished editing a character string, press the [Enter] key or move the focus to other than the edit area to complete the character string editing.
Reacquires all values of registered watch-expressions to update the display. However, the I/O registers protected against reads are not reloaded. |
||
Resets the highlighting for a selected watch-expression which indicates that its value has changed as a result of program execution. |
||
Registers a new watch-expression. Enter a watch-expression directly in the text box (see "(c) Registering a new watch-expression"). Note that up to 128 watch-expressions can be registered in one Watch panel. |
||
Adds a new category (folder). Enter a category name directly in the text box. Note that up to 64 categories can be created in one Watch panel. (No other categories can be created within a category.) |
||
Deletes a selected range of character string. If a watch-expression or category is selected, the item is deleted. However, this is disabled when an expanded item of a watch-expression is selected. |
||
Shows the following buttons to change the display form of values. |
||
Displays the value of a selected watch-expression in per-variable predetermined notation (default) (see "Table A.11 Display Form of Watch-expressions (Default)"). |
||
Displays the value of a selected item in Float. However, this is enabled only when a selected watch-expression consists of 4-byte data. |
||
Displays the value of a selected item in Double. However, this is enabled only when a selected watch-expression consists of 8-byte data. |
||
Adds a hexadecimal equivalent for the displayed value of a selected item at the end of it, with the equivalent enclosed in "( )." However, this does not apply when the value is displayed in hexadecimal. |
[[File] Menu (Watch Panel-Only Items)]
The [File] menu used exclusively for the Watch panel is as follows. (The other items are shared.)
However, all of these items are disabled during program execution.
Saves the content of this panel to a text file (*.txt) or CSV file (*.csv) that has been saved previously (see "(c) Saving the values of watch-expressions"). Note that if this item is selected for the first time after startup, the same operation as [Save Watch Data As...] would have been selected is performed. |
|
Opens the Save As dialog box in order to save the content of this panel to a specified text file (*.txt) or CSV file (*.csv) (see "(c) Saving the values of watch-expressions"). |
[[Edit] Menu (Watch Panel-Only Items)]
The [Edit] menu used exclusively for the Watch panel is as follows. (All other items are disabled.)
This item is usable when the selected watch-expression is a global variable, a static variable inside a function, a static variable inside a file, or an I/O register (multiple selection not accepted). Shows the following cascaded menu to set access-related break events (see "2.10.4.1 Set a break event (access-related) to a variable/I/O register"). |
|||
Sets a read-access break event in a selected watch-expression. |
|||
Sets a write-access break event in a selected watch-expression. |
|||
Sets a read/write-access break event in a selected watch-expression. |
|||
Sets a read-access break event in a selected watch-expression as the condition for a combination break event. |
|||
Sets a write-access break event in a selected watch-expression as the condition for a combination break event. |
|||
Sets a read/write-access break event in a selected watch-expression as the condition for a combination break event. |
|||
This item is usable when the selected watch-expression is a global variable, a static variable inside a function, a static variable inside a file, or an I/O register (multiple selection not accepted). Shows the following cascaded menu to set trace-related events. (see "2.13.3 Collecting an execution history in a section" and "2.13.4 Collecting an execution history only when conditions are met"). After an event is set, a watch-expression that is the subject of operation is marked with an (b) Event mark at the beginning. |
|||
Sets a point trace event that, when a selected watch-expression is accessed for read, records the accessed value in trace memory (see "(1) When an access to a variable or I/O register occurred"). |
|||
Sets a point trace event that, when a selected watch-expression is accessed for write, records the accessed value in trace memory (see "(1) When an access to a variable or I/O register occurred"). |
|||
Sets a point trace event that, when a selected watch-expression is accessed for read/write, records the accessed value in trace memory (see "(1) When an access to a variable or I/O register occurred"). |
|||
Sets a trace event that, when a selected watch-expression is accessed for read/write, causes trace recording to start (see "2.13.3.1 Setting a trace start event and a trace end event"). |
|||
Sets a trace event that, when a selected watch-expression is accessed for read/write, causes trace recording to end (see "2.13.3.1 Setting a trace start event and a trace end event"). |
|||
Opens the Trace panel to display acquired trace data. |
|||
This item is enabled only when the selected watch-expression is a global variable, a static variable inside a function, a static variable inside a file, or an I/O register (plural selections not accepted). Displays the following cascaded menu to set timer-related events (see "2.14.3 Measuring execution time in a section"). After an event is set, an event mark is displayed at the beginning of the watch-expression concerned. |
|||
Sets an event that causes the timer to start upon read/write access to a selected watch-expression (see "(1) How to set a timer start event"). |
|||
Specify a channelNote 2 in which a timer start event is set. |
|||
Sets an event that causes the timer to finish upon read/write access to a selected watch-expression (see " How to set a timer end event"). |
|||
Shows the following cascaded menu to set realtime display updating (see "(a) Realtime display update function"). |
|||
Opens the Property panel to set the realtime display update function generally. |
|||
Reacquires all values of registered watch-expressions to update the display. However, the I/O registers protected against reads are not reloaded. |
|||
Forcibly loads the values of I/O registers protected against reads once. |
|||
Registers a new watch-expression. Enter a watch-expression directly in the text box (see "(c) Registering a new watch-expression"). Note that up to 128 watch-expressions can be registered in one Watch panel. |
|||
Adds a new category (folder). Enter a category name directly in the text box. Note that up to 64 categories can be created in one Watch panel (no other categories can be created within a category). |
|||
Deletes a selected range of character string. If a watch-expression or category is in a selected state, the item is deleted. However, this is disabled when an expanded item of a watch-expression is selected. |
|||
Cuts a selected range of character string and moves it to the clipboard. If a watch-expression or category is in a selected state, the item is cut. However, this is disabled when an expanded item of a watch-expression is selected. |
|||
Copies a selected range of character string to the clipboard. If a watch-expression or category is in a selected state, the item is copied. |
|||
Inserts the content of the clipboard into the caret position when text is in edit mode. If, when text is in other than edit mode, a watch-expression is copied to the clipboard, the copied watch-expression is registered at the caret position. However, this is disabled when an expanded item of a watch-expression is selected. |
|||
Opens the Open Watch Expression Data File dialog box to import watch-expressions (see "2.11.6.8 Exporting/importing watch-expressions"). |
|||
Shows the following cascaded menu to specify a display form. |
|||
Displays the value of a selected watch-expression in per-variable predetermined notation (default) (see "Table A.11 Display Form of Watch-expressions (Default)".) |
|||
Adds a hexadecimal equivalent for the displayed value of a selected item at the end of it, with the equivalent enclosed in "( )". However, this does not apply when the value is displayed in hexadecimal. |
|||
Displays a selected item in Float. However, if a selected watch-expression is not 4-byte data or has type information, the selected item is displayed in predetermined notation (see "Table A.11 Display Form of Watch-expressions (Default)"). |
|||
Displays a selected item in Double. However, if a selected watch-expression is not 8-byte data or has type information, the selected item is displayed in predetermined notation (see "Table A.11 Display Form of Watch-expressions (Default)"). |
|||
Shows the following cascaded menu to specify character code. |
|||
Opens the Memory panel (Memory1), with the caret on it moved to the address at which a selected watch-expression is defined (see "(g) Jumping to a memory definition address"). |
|||
Resets the highlighting for a selected watch-expression which indicates that its value has changed as a result of program execution. |
|||
Opens the Save As dialog box to newly save the selected contents of watch-expressions to the specified text file (*.txt)/CSV file (*.csv) (see "(c) Saving the values of watch-expressions"). |