| |||
| Home > RealView Debugger Commands > Alphabetical command reference > CONNECT | |||
The CONNECT command is used to connect the debugger to a specified target.
CONNECT [,route]
[{,reset|,noreset}] [{,halt|,nohalt}] [=] {targetid | @targetname}
CONNECT [,gui]
[=] {targetid | @targetname}
where:
routeIndicates that the specified targetid is
a target access-provider, not the final target device.
resetReset the target before connecting to it.
noresetDo not reset the target on connecting to it.
haltStop the target on connecting to it.
nohaltDo not stop the target on connecting to it.
targetidSpecifies the required target as a number. See Making numbered connections for details.
targetnameSpecifies the required target as a name. See Making named connections for details.
guiEnables you to choose the connect mode from a dialog or prompt:
If you use this option in the GUI CLI, it displays a dialog.
If you use this option in the headless debugger, it displays a prompt.
The connect specifies what state you want the debugger to leave the target in after the connection. See Connect modes for more details.
The CONNECT command creates a new target connection. The details of the connection are specified using the board file. To connect to a target you indicate which target in the board file you want to connect to. There are two ways to specify the target:
As a number
As an identifier string.
Using the CONNECT command means that you do not use the Connection Control window (shown in Figure 2.2). However, it is helpful to think of that window when considering the operation of the CONNECT command.
If you set the connect mode in the board (.BRD)
file of the target, or the .BCD file for a board,
the target connects using that mode. If you specify prompt for
the connect mode, then the CONNECT command acts
as though you specified the ,gui qualifier. The reset, noreset, halt,
and nohalt qualifiers override the connect mode
setting in the board file.
When you connect to a target, the connect mode determines what happens to the target:
Connect to the target, but do not reset it. If the target is running, stop it. This is the default.
Connect to the target, but do not reset it. The running state of the target is unchanged.
Connect to the target, and reset it. If the target is running after the reset, stop it.
Connect to the target, and reset it. The running state of the target is unchanged.
The options available depend on the target that you are connecting to.
The connection numbers are positive integers that identify elements in the board file. Numbers start at 1 and increment sequentially. However, if you want to use numbered connections with the CONNECT command, it is important to understand how these numbers are allocated.
A distinction is made between access-provider connections and endpoint connections. For example, an access-provider connection might be an RVI-ME interface unit while an endpoint connection might use RVI-ME to connect to an ARM926EJ™-S processor, shown in Figure 2.2.
All possible access-provider connections in the current board
file are enumerated first, followed by the endpoint connections.
Some access-provider connections support many endpoints, possibly
even a variable number of them. Because of this, endpoint connections
are not allocated an id until you CONNECT to
the access-provider for that endpoint connection and so enable the
connections provided by the access-provider. When an access-provider
connection is enabled, the endpoint connection ids
are revised, with numbers allocated to each of the known endpoints.
For example, your board file might include the following access-providers, shown in Figure 2.2:
RVI
RVI-ME
To connect to an RVI-ME:
connect,route 1
This command enables the access-provider connection and expands it in the Connection Control window. (Entering the same command again disables the connection and collapses it.)
To connect to a target using RVI-ME, use CONNECT again without
the route qualifier:
connect 2
You can use named connections using similar principles to the numbered technique described in Making numbered connections. However, you can use named connections to connect to a target whose access-provider connection is not currently enabled or to specify targets where there might be ambiguity (see Making named endpoint connections for details).
To enable or disable a route, you enter the route name with
an @ prefix, for example:
connect,route @RVI-ME
Which is the same as:
connect,route 1
If you specify a target that has not been configured, you are prompted to configure the target before the access-provider connection is enabled.
Now you can connect to a named target:
connect @ARM926EJ-S_0
You can use named connections to connect to a named target
where the access-provider is not currently enabled or if you do
not know the connection ids. Specify the full
target name in prefix notation. To connect to the RVI-ME target:
connect @ARM926EJ-S_0@RVI-ME
This command connects to the ARM926EJ-S on the RVI-ME. If
the access-provider, in this case RVI-ME, has not been configured
with an ARM926EJ-S_0, the connection fails with
the message Types of objects in list do not match.
You must configure the target before you connect to it. The target
name must be as defined in the board file, that is as it appears
in the Connection Control window.
The following commands provide similar or related functionality: