15.7.4. Referencing scripts in a Debug Configuration or BCD file

A Debug Configuration or BCD file allows you to specify one or more commands to execute automatically after connection to a target. Therefore, you can automatically execute command scripts after establishing a connection.

To specify one or more command scripts to execute:

  1. Select Target → Connect to Target... from the Code window main menu to open the Connect to Target window.

  2. Locate the required Debug Configuration:

    1. Select Configuration from the Grouped By list.

    2. Expand the Debug Interface containing the Debug Configuration of interest. For this example, expand RealView ICE.

    3. Make sure that all targets are disconnected on the Debug Configuration.

  3. Right-click on the required Debug Configuration to display the context menu. For example, right-click on RVI.

  4. Select Properties... from the context menu to open the Connection Properties dialog box.

  5. Click the BCD files tab to see the available definitions.

  6. Open the Connection Properties window:

    • If you want to specify command scripts for the chosen Debug Configuration, click the Advanced button.

      The settings group for the Debug Configuration entry is selected, and the contents are displayed in the right pane.

    • If you want to specify command scripts for a BCD file, select the BCD file from the Available Definitions or Assigned Definitions list, then click the View Definition... button for that list.

      The settings group for the BCD file entry is selected, and the contents are displayed in the right pane.

  7. Expand the selected settings group in the left pane.

  8. Expand the Advanced_Information block.

  9. Select the Advanced_Information group name. This might be Default, ARM, or a processor name such as ARM936EJ-S, depending on the setting group.

  10. Enter the commands required to run the scripts for the target:

    1. In the right pane, right-click on the black Commands setting to display the context menu.

    2. Select Edit Value... from the context menu.

    3. Enter the required CLI command, for example:

      include 'C:\Myprojects\scripts\script_1.inc'

      A new Commands setting is added for the command, colored blue.

    4. Repeat these steps for each command script to be added.

      Note

      You must add the commands in the reverse order that they are to execute. However, you can change the order if required.

    Alternatively, you can define the command sequence in another script file, for example myscript.inc:

    1. Specify the commands in myscript.inc.

    2. Add an INCLUDE command in the Commands setting to run the myscript.inc file.

      For example, to run commands in the script: C:\Myprojects\scripts\myscript.inc, add the command:

      include 'C:\Myprojects\scripts\myscript.inc'

  11. Select File → Save and Close from the menu to save your changes and close the Connection Properties window.

  12. Click the OK button to close the Connection Properties dialog box.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111