How To...
How to Work on Variables
208
Microcontrollers Debugger Manual

Modify a Variable Value

The Debugger allows you to change the value of a variable, as shown in Figure 6.3.
Figure 6.3 Modifying a Variable Value
Double-click on a variable. The current variable value is highlighted and can be edited.
1. Formats for the input value follow the rule from ANSI C constant values (prefixed by
0x for hexadecimal value, prefixed by 0 for octal values, otherwise considered as
decimal value). For example, if the data component is in decimal format and if a
variable input value is 0x20, the variable is initialized with 32. If a variable input value
is 020, the variable is initialized with 16.
2. To validate the input value you can either press the Enter or Tab key.
3. If an input value has been validated by the Tab key, the value of the next variable in
the component is automatically highlighted (this value can also be edited).
4. To restore the previous variable value, press the Esc key or select another variable.
A local variable can be modified when the application is stopped. Since these variables are
located on the stack, they do not exist as long as the function where they are defined is not
active.

Get the Address Where a Variable is

Allocated

The Debugger provides you with the start address and size of a variable if you do the
following:
1. Point to a variable name in a Data Component
2. Click the variable name
The start address and size of the selected variable is displayed in the Data info bar.