4.4.2. Configuration using session files

If you require a more automated way of running several debuggers, you can use the session feature in AXD. An AXD session file includes debugger settings, for example the name of an executable image file and the locations of windows, and also the current target configuration. A command-line argument to AXD enables you to select a particular session file on startup. In this way you can automatically connect AXD to a particular processor by changing the session file you use.

This method is less flexible than the multiple target procedure described in Configuration using named AXD target configurations, especially if you frequently change the processor you connect to. However, specifying a processor when you start AXD enables a greater level of automation.

To configure the first AXD session file:

  1. Ensure the Multi-ICE server is correctly configured for your target board.

  2. Run AXD.

  3. Select Multi-ICE as the target configuration. It is recommended that you click Remove to delete all but one copy of the Multi-ICE configuration, to avoid confusion in making any further changes.

  4. Configure Multi-ICE to connect to one of the target board processors.

  5. Select Options ? Configure Interface....

  6. Enable the Reselect target option in the Session File tab.

    If you do not have this option enabled, the session files you create will not select any target when you load them back into AXD.

  7. Click OK.

Changing session settings

You must now create a session file for each processor in your system. For each processor on your target board:

  1. Select Options ? Configure Target...

  2. Select Multi-ICE in the target configuration list

  3. Configure Multi-ICE for that processor.

  4. Click OK in the Multi-ICE configuration dialog to accept the configuration.

  5. Click OK in the Configure Target dialog to connect to the processor.

  6. If you want AXD to load a specific executable image when it connects to this processor:

    1. Click File ? Load Image to load the file.

    2. Select Options ? Configure Interface....

    3. Enable the Reload Images option in the Session File tab (Figure 4.19).

    4. Click OK.

  7. If you want to run a configuration script as AXD starts up, for example to set the processor into a particular state:

    1. Select Options ? Configure Interface....

    2. Select Run Configuration Script in the Session File tab.

    3. Use the Browse... button to locate the configuration script, or type the name into the text field, as shown in Figure 4.19.

    4. Click OK.

    Figure 4.19. Configuring AXD to run a configuration script

    Configuring AXD to run a configuration script
  8. Save the session file by selecting File ? Save Session…. You must use the file extension .ses. It is recommended that you use a name that refers to the processor this configuration connects to.

    It is recommended you save session files together in an easily-accessible directory.

You can now select which processor to connect to by specifying the appropriate session file in AXD's command line. For example:


axd -session C:\sessions\tap1.ses

An example of three AXDs connected to a Multi-ICE server and a multiple processor target is shown in Figure 4.20.

Figure 4.20. Three AXDs and the Multi-ICE server configured for a multiple processor target

Three AXDs and the Multi-ICE server configured for a multiple processor target

By putting several AXD session file commands into a script, you can automatically start up the required number of instances of AXD, one connected to each processor. Example files are shown in Example 4.1 and Example 4.2. The Unix script file command source ads.cshrc sets up the path and environment for the ADS executables. The Windows versions of these files are in the examples directory of your Multi-ICE installation.

Note

Under Windows the pause command is used. This is because several copies of AXD cannot be loaded concurrently under Windows. The pause command waits for you to press a key, and you must do this after each copy of AXD has loaded and initialized.

Example 4.1. Windows batch file


start axd -session C:\sessions\tap0.ses
pause
start axd -session C:\sessions\tap1.ses
pause
start axd -session C:\sessions\tap2.ses

Example 4.2. Unix shell script


source ads.cshrc
axd -session sessions/tap0.ses &
axd -session sessions/tap1.ses &
axd -session sessions/tap2.ses &

You can also create a shortcut on your desktop for each processor. To do this under Windows, you must:

  1. Right click on the desktop to bring up the context menu

  2. Select New ? Shortcut

  3. In the Create Shortcut dialog, click Browse

  4. Use the browse dialog to locate AXD.exe. If you installed AXD in the default location, it is in C:\Program Files\ARM\ADSv1_1\Bin\axd.exe.

  5. Click Open.

  6. Press the End key to move the cursor to the end of the line, and type a space and then:


    -session “C:\sessions\tap0.ses”

    The line should now look something like:


    "C:\Program Files\ARM\ADSv1_1\Bin\axd.exe" -session “C:\sessions\tap0.ses”

  7. Click Next>

  8. Enter a name for the shortcut, for example, AXD on Tap0.

  9. Click Finish.

Double clicking on this shortcut launches AXD and automatically connects to the configured processor with the settings you saved in the session file.

You can configure your Unix desktop in a similar way. Refer to the system documentation for your desktop environment (for example, CDE or OpenWindows) for more information.

Note

If you want to change any of the settings in a session file, you must re-save it. AXD does not automatically update the session file it was started from if you change settings.

Using sessions from CodeWarrior

When you have set up your sessions, you might also want to configure CodeWarrior so that clicking on the Run button automatically selects one of your sessions. This works best if you have a different CodeWarrior project for each processor. Otherwise you have to change the project settings each time you want to use a different processor.

To configure a project to load into AXD with a particular session:

  1. In the CodeWarrior IDE, display the project settings dialog and in the settings pane tree control select ARM Runner in the Debugger section.

  2. Select the Choose Debugger tab.

  3. Select AXD.

  4. In the Equivalent Command Line control, enter the -session parameter as described in Changing session settings.

    For example:


    axd -session C:\sessions\tap0.ses -exec &1

    Note

    The -session parameter and the session file name must be together and must precede a -debug or -exec parameter on the command line.

  5. Click on Save and close the dialog.

Caution

If you subsequently change any of the other settings in this panel you must enter the -session argument again.

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0048F
Non-Confidential