10.1.2. RealView Debugger commands in macros

You can define a macro that contains a sequence of RealView Debugger commands. When used in this way, the command must be enclosed by dollar signs ($), for example:

$fprintf 50, "the important variable is %d\n", var1$;

Macros containing commands are similar to command files and can be used for setting up complex initialization conditions. These macros are executed by entering the macro name and any parameters on RealView Debugger command line.

The following commands cannot be used inside a macro:

Because macros can return a value, they can also be used in expressions. When the macro executes, the return value is used according to the return type.

Attaching macros

Macros can also be invoked as actions associated with:

  • a window

  • a breakpoint

  • deferred commands, for example BGLOBAL.

In this case, execution-type commands cannot be used inside a macro:

  • GO




If you require a conditional breakpoint that performs an action and then continues program execution, you must use the breakpoint continue qualifier, or return 1 from the macro call, instead of the GO command.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B