13.07.2015 Views

RealView Debugger User Guide - ARM Information Center

RealView Debugger User Guide - ARM Information Center

RealView Debugger User Guide - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Working with Macros9.2 Using macrosThis section shows you how to start using macros by working through an example. Itcontains the following sections:• Creating a macro• Viewing a macro on page 9-10• Testing a macro on page 9-10• Editing a macro on page 9-11• Copying a macro on page 9-13• Deleting a macro on page 9-13• Calling a macro on page 9-14.9.2.1 Creating a macroTo create a macro from within <strong>RealView</strong> <strong>Debugger</strong>, you can use the Add/Edit Macrosdialog box. It is not possible to create macros using CLI commands on the commandline.Complete the following steps to create a macro for use with a debug target:1. Connect to your target and load an image, for example dhrystone.axf.2. Select Edit → Advanced → Show Line Numbers to display line numbers.This is not necessary but might help you to follow the examples.3. Select Tools → Add/Edit <strong>Debugger</strong> Macros... to display the Add/Edit Macrosdialog box.When you open this dialog box, the Existing Macros display list is empty, unlessyou have previously loaded macros into <strong>RealView</strong> <strong>Debugger</strong>.The Macro Entry Area gives advice on how to use the buttons, New, Show, andCopy.This area shows the definition of the macro when it has been created.4. Click New to create the macro. This inserts the default name int Macro() in theName data entry field and inserts {} in the Macro Entry Area ready for editing.5. Edit the default macro name so that it shows int tutorial(var1).6. Enter the macro contents to show:int var1;{$printf “value=%d\n”,var1$;}9-8 Copyright © 2002-2005 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0153G

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!