The targets window (and associated menu) displays the set of target interfaces that you can connect to in order to download and debug your programs. Using the targets window in conjunction with the properties window enables you to define new targets based on the specific target types supported by the particular CrossStudio release.

You can connect, disconnect, reconnect to a defined target system. You can also reset and load programs using the target window. If you load a program using the target window and you need to debug it then you will have to use the Debug | Attach Debugger operation.

###### To view the targets window

- Select Target | Targets menu option.

## Connecting to a target

###### To connect to a target

- Select the required target in the Targets window
- Click the Connect toolbar button

  —or—

- Right click on the required target in the Targets window
- From the context ment, select Connect

  —or—

- Select the required target in the Targets window
- Type Ctrl+T, C.

## Disconnecting from a target

###### To disconnect from a target

- Select the connected target in the Targets window
- Click the Disconnect toolbar button

  —or—

- Right click on the connected target in the Targets window
- From the context ment, select Disconnect

  —or—

- Type Ctrl+T, D.

Alternatively, connecting to a different target will automatically disconnect the current target connection.

## Reconnecting to a target

Disconnection and reconnection to the same target can be accomplished in a single operation by using the reconnect feature. This operation may be useful if the target board has been power cycled, or reset manually as it forces the system to resynchronise with the target.

###### To reconnect to a target from the target window

- Select the connected target in the targets window.
- Select the Reconnect option from the target's context menu.

###### To reconnect to a target from the main menu

- Select the Target | Reconnect menu option.

## Resetting the target

Reset of the target is typically handled automatically by the system when you start debugging. However, the target may be manually reset using the targets window.

###### To reset the connected target

- Click the Reset tool bar button

  —or—

- From the Target menu, select Reset

  —or—

- Type Ctrl+T, S.

## Downloading a program using the target window

Downloading of programs is typically handled automatically by the system when you start debugging. However, arbitrary programs may be downloaded to a target using the targets window.

###### To download to the connected target

- Select and connect to a target.
- Select the Load... option from the target's context menu.
- Select the executable file to be downloaded to target and click Open to download the file.

## Creating a new target interface

###### To create a new target interface

- From the targets window's context menu, select New Target Interface. A new menu will be displayed containing the types of target interface that may be created.
- Select the type of target interface to create.

## Viewing and editing target properties

All target interfaces have a set of properties. Some properties are read-only and provide information on the target, others are modifiable and allow the target interface to be configured. Target interface properties can be viewed and edited using CrossStudio's property system.

###### To view and edit target properties

- Select a target.
- Select the Properties option from the target's context menu.

## Target auto-connect

The system can be configured to automatically connect to the last used target interface when loading a solution.

###### To enable target auto-connect

- From the View menu, select Properties Window.
- In the Properties Window, select Environment Properties from the combo box.
- In the Target Settings section, set the Enable Auto Connect property to Yes.

###### To disable target auto-connect

- Open properties window by clicking View | Properties Window menu option.
- In the Properties Window, select Environment Properties.
- In the Target Settings section, set the Enable Auto Connect property to No.

## Restoring default target definitions

The targets window provides the facility to restore the target definitions to the default set. Restoring the default target definitions will undo any of the changes you have made to the targets and their properties and therefore should be used with care.

###### To restore the default target definitions

- Select Restore Default Targets from the targets window context menu.
- Click Yes when prompted if you want to restore the default targets.

## Target definition file

The target interface information in the targets window is stored in an XML file called the target definition file.

###### To change the target definition file used by the targets window

- From the Tools menu, select Options.
- In the Environment Options, select the Target section.
- Edit the Target definition file entry to change the path to the target definition file.
- Click OK to apply the change, the targets window should load the new target definition file.