Freescale Semiconductor Microcontrollers User Manual

Page 830

Advertising
background image

Debugger Engine Commands

Debugger Commands

830

Microcontrollers Debugger Manual

Example:

DEFINE test = 1

...

UNDEF test

When the test variable is no longer needed in a command program, it can be
undefined and removed from the list of symbols. After UNDEF test, the test
variable can no longer be used without (re)defining it.

NOTE

See also examples of the

DEFINE

command.

Examples:

The value of an existing symbol can be changed by applying the DEFINE
command again. In this case, the previous value is replaced and lost. It is not put on
a stack. Then when UNDEF is applied to the symbol, it no longer exists, even if the
value of the symbol has been replaced several times:

in>DEFINE apple 0

in>LS

apple 0x0 (0) // apple is equal to 0

in>DEFINE apple = apple + 1

in>LS

apple 0x1 (1) // apple is equal to 1

in>DEFINE apple = apple + 1

in>LS

apple 0x2 (2) // apple is equal to 2

in>UNDEF apple

in>LS

// apple no longer exists

In the next example, we assume that the FIBO.ABS sample is loaded. At the
beginning, no user symbol is defined:

in>UNDEF *

in>LS

User Symbols: // there is no user symbol

Application Symbols: // symbols of the loaded

Advertising