| |||
| Home > Connecting to Targets > Connecting to a target > Setting connect mode | |||
When you connect to a target, RealView Debugger attempts to establish
the connection using the default connect mode, that is No
Reset and Stop. This mode is used when you connect from
the Connection Control window in any of the following ways:
Double-click on an unconnected connection entry.
Select the check box for a required connection entry so that it is checked.
Right-click on a connection entry and select Connect from the Connection context menu (see Connection context menu options).
Before connecting, RealView Debugger checks to see if a user-defined connect mode has been specified in your board file (see User-defined connect mode for details). If such a setting is found, it overrides the default connect mode and is used instead. If there is no connect mode specified in your target configuration file, RealView Debugger proceeds to connect using the default connect mode.
However, the connect mode that is actually used depends on the target hardware, the target vehicle, and the associated interface software that manages the connection. In some cases, the interface cannot complete the connection using the mode requested, for example where your RealView ICE or RVI-ME unit configuration conflicts with the connect mode. In this case, the RealView ICE or RVI-ME unit determines the connect mode and makes the connection. Similarly, some ARM processors require a reset before you can connect, for example XScale™, whereas other cores have no such restriction. RealView Debugger displays a warning message to say that the requested connect mode cannot be honored and tells you what connection mode was used instead.
This behavior also applies to disconnect mode, for example mode substitution might occur when you try to disconnect from a running target. See Setting disconnect mode for more details.
RealView Debugger provides a mechanism to enable you to override both the default connect mode and any user-defined settings in your board file. This is useful when debugging a single processor target system, for example using RVI-ME. Therefore, you can control the way a processor starts for individual connections. To do this you must select the option Connect (Defining Mode)... from the Connection context menu in the Connection Control window (see Connection context menu options). See Connect (Defining Mode)... for details on how to use this option.
Before connecting, RealView Debugger checks to see if a user-defined
connect mode has been specified by the Connect_mode setting
in the Advanced_Information block in your board
file, or in any .bcd file linked to the connection.
If such a setting is found, it becomes the default connect mode
for this connection and is used if you connect in any of the following
ways:
Double-click on an unconnected connection entry.
Select the check box for a required connection entry so that it is checked.
Right-click on a connection entry and select Connect from the Connection context menu (see Connection context menu options).
For more information about setting connect mode in your board file, see:
About target configuration in Chapter 13 Configuring Custom Targets
the example Specifying connect and disconnect mode in Chapter 13 Configuring Custom Targets
the description of the Advanced_Information block
in Appendix B Configuration Properties Reference.
To define a connection mode using the Connect (Defining Mode)... option:
Right-click
on a processor connection entry, for example ARM940T_0,
using RVI-ME, to display the Connection context
menu (see Connection context menu options).
Select Connect (Defining Mode)... to display the Connect Mode list selection box shown in Figure 2.3.
The state options shown depend on the interface software making the connection, but are always one or more from:
Does not submit a processor reset but explicitly halts any process currently running by issuing a Stop command.
Does not submit a processor reset or attempt to halt any process currently running.
Submits a processor reset and explicitly halts any process currently running by issuing a Stop command.
Submits a processor reset but does not attempt to halt any process currently running.
Highlight the required state and click OK.
If you set connect mode from the Connection Control window, this temporarily overrides any user-defined setting in your target configuration file.
The selection box, shown in Figure 2.3, offers a series of state options to make
the connection. The options shown depend on the interface software
that manages the target connection and so vary depending on the
connection entry you select in the Connection Control window. In
this example, the selection box contains an entry No Reset
and Stop (default). This is either the:
default connect mode chosen by the debugger (see Setting connect mode for details)
user-defined connect mode specified in the target configuration file (see User-defined connect mode for details).
Any user-defined connect mode takes precedence over the default connect mode chosen by the debugger.
If you click Cancel, RealView Debugger establishes the connection using the connect mode shown as the default. Where this mode is not supported by your target, a different connect mode is used and you are warned about the substitution.
This selection box is also displayed if you specify a prompt as your user-defined connect mode. In this case, there is no default entry (see Using a prompt for details).
You can specify a user-defined connect mode to display a prompt to enable you to choose the connection mode for each connection. In this case, RealView Debugger displays the Connect Mode selection box shown in Figure 2.3. However, where the prompt setting is defined, the state options offered are all supported by the target vehicle and so do not include a default option.
If a prompt is specified in your board file, or in any .bcd file
linked to the connection, it takes priority over any other user-defined
connect mode setting. This prompt-first rule holds true regardless
of where the setting is in the configuration hierarchy.
For more information about using a prompt, see:
the example Specifying connect and disconnect mode in Chapter 13 Configuring Custom Targets
the description of the Advanced_Information block
in Appendix B Configuration Properties Reference.