2.3.26. CONNECT

The CONNECT command is used to connect the debugger to a specified target.

Syntax

CONNECT [,route] [{,reset|,noreset}] [{,halt|,nohalt}] [=] {targetid | @targetname}

CONNECT [,gui] [=] {targetid | @targetname}

where:

route

Indicates that the specified targetid is a target access-provider, not the final target device.

reset

Reset the target before connecting to it.

noreset

Do not reset the target on connecting to it.

halt

Stop the target on connecting to it.

nohalt

Do not stop the target on connecting to it.

targetid

Specifies the required target as a number. See Making numbered connections for details.

targetname

Specifies the required target as a name. See Making named connections for details.

gui

Enables 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.

Description

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.

Figure 2.2. Connection Control window

Connection Control window

Note

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.

Connect modes

When you connect to a target, the connect mode determines what happens to the target:

No Reset and Stop

Connect to the target, but do not reset it. If the target is running, stop it. This is the default.

No Reset and No Stop

Connect to the target, but do not reset it. The running state of the target is unchanged.

Reset and Stop

Connect to the target, and reset it. If the target is running after the reset, stop it.

Reset and No Stop

Connect to the target, and reset it. The running state of the target is unchanged.

Note

The options available depend on the target that you are connecting to.

Making numbered connections

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
Making named connections

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

Note

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
Making named endpoint connections

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.

See also

The following commands provide similar or related functionality:

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