12.3.2. Finding configuration files

This section describes how RealView Debugger directories are created when you install the base product, and how they are used to find the configuration files. It contains the following sections:

The install directory

RealView Debugger must be able to locate the product installation directory so that it can locate program extensions, data, and configuration files stored there. Use the following settings to do this:

  • The default location, for example:

    C:\Program Files\ARM\RVD\Core\1.8\build_number\win_32-pentium

  • The RVDEBUG_INSTALL environment variable:

    
    set RVDEBUG_INSTALL=D:\ARM\RVD\Core\1.8\build_number\win_32-pentium
    

    For information about environment variables in RealView Debugger, see Chapter 1 Starting to use RealView Debugger.

  • The -install command line option:

    
    -install="D:\ARM\RVD\Core\1.8\build_number\win_32-pentium”
    

If the debugger cannot find the install directory, it terminates.

The shortcuts that are installed on the Windows Start → Programs menu might include the -install option to define the directory. If you did not install the debugger in the default location and you create your own shortcuts, or run rvdebug.exe from the command line, you must either include the same -install option or define the RVDEBUG_INSTALL environment variable globally, for example using the Windows Control Panel.

The home directory

The first time you run RealView Debugger after installing on Windows, it creates a unique working directory, in your RealView Debugger home directory, for you to store your personal files, debugger settings, and target configuration files. RealView Debugger then creates or copies files into this directory ready for your first debugging session.

The location of the home directory depends on the environment variables and command-line options defined when the debugger is started. RealView Debugger uses the first defined item from the following ordered list:

  1. On Windows, you can use the -home argument when starting RealView Debugger from the command line to specify an explicit path:

    
    -home="C:\Documents and Settings\user_name\RVD" 
    

    The home directory is C:\Documents and Settings\user_name\RVD

  2. You can use the RVDEBUG_HOME environment variable to use a directory other than the default home directory. For example, on Windows:

    
    set RVDEBUG_HOME=C:\RVD\Test_home
    

    For information about environment variables in RealView Debugger, see Chapter 1 Starting to use RealView Debugger.

  3. You can use the -install command line option on its own or together with -user or $USER:

    
    -install="D:\WinApp\RVD\” -user=”DevTeam”
    

    The home directory is D:\WinApp\RVD\home\DevTeam\.

    You can use -user or $USER to specify an alternative for DevTeam.

  4. You can use the RVDEBUG_INSTALL environment variable on its own or together with -user or $USER:

    
    set RVDEBUG_INSTALL=D:\WinApp\RVD\
    
    
    set USER=DevTeam
    

    The home directory is D:\WinApp\RVD\home\DevTeam.

  5. The default location, for example:

    install_directory\RVD\Core\...\home\user_name\

Note

If the debugger home directory location is defined, but the directory does not exist, the debugger creates it and copies the standard set of configuration files there from the default settings directory (\etc).

The RealView Debugger search path

RealView Debugger searches several directories for board files, including the default file, rvdebug.brd. The search path the debugger uses is:

  1. The current working directory, sometimes called the Start In directory.

  2. The location defined by the RVDEBUG_SHARE environment variable, if it is set.

    For information about environment variables in RealView Debugger, see Chapter 1 Starting to use RealView Debugger.

  3. The RealView Debugger home directory, described in The home directory, using the order specified there.

  4. The default settings directory, \etc.

RealView Debugger searches all of these directories for workspace files and other configuration files. In particular, this is how *.bcd files are found. Where two or more files with the same filename are found in more than one of the searched directories, the first file found is loaded and others are ignored.

Saving and restoring connection properties

When you are configuring RealView Debugger, you are recommended to keep backups of known-good configuration information before changing settings. There are backup systems you can use:

  • You can rely on the automatic backup that RealView Debugger makes whenever it saves the Connection Properties window, for example rvdebug.brd.bak.

  • You can copy specific files, for example rvdebug.brd, or the whole home directory to a backup area.

Note

It is recommended that you make backups before using the worked examples in the rest of this book.

Using the automatic backup files

If you edit a board file, or a Board/Chip definition file, RealView Debugger automatically renames the original file by adding a .bak file extension. Any previous backup copy of the file is deleted.

If you want to restore a backup file:

  1. Exit the Connection Properties window without saving changes.

  2. Delete the current file or files.

  3. Rename the backup file to the original filename by deleting .bak from the name.

Using manual file or directory backups

For safer backups, you are recommended to make tape or disk copies of the files in another place. The simplest policy is to save the whole directory when you make a backup, but restore individual files when you want to revert changes.

Note

If you restore the whole directory, then in addition to restoring the Connection Properties configuration information, you restore preferences that you might not want to change, for example workspace properties, project properties, and window layout.

Creating a directory backup requires you to locate and copy the home directory to a safe place. You do not have to exit the debugger to do this.

Restoring previously backed up files requires you to:

  1. Locate the backup that you want to restore from and the debugger home directory that RealView Debugger is using for your session.

    See The home directory for more information about the location of your debugger home directory.

  2. Determine the files to restore.

  3. Copy the backup files to the debugger home directory.

Deciding which files to restore depends on the type of configuration change you have performed. These hints might help:

  • If you have changed everything, or you are not sure what to restore, select all the files listed in What the configuration files contain to restore the Connection Properties window to its original state.

  • If you have configured or reconfigured a chip or board using BOARD, CHIP or COMPONENT groups, select appropriate files from the *.bcd set.

    If you have created new *.bcd files in your debugger home directory, you might also want to delete them from that directory. However, a *.bcd file is not used unless it is explicitly referenced.

  • If you have changed RV-msg connection settings, for example by changing items in the RVConfig dialog box, select the *.rvc files for the RVI/RVI-ME connections you have reconfigured. These files are saved by default in your RVI/RVI-ME installation directory.

Copyright © 2005, 2006 ARM Limited. All rights reserved.ARM DUI 0281C
Non-Confidential