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 tool bar button or select the Connect option from the target's context menu.

## Disconnecting from a target

##### To disconnect from a target

- Select the connected target in the targets window.
- Click the Disconnect tool bar button or select the Disconnect option from the target's context menu.

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

## Re-connecting to a target

Disconnection and re-connection to the same target can be accomplished in a single operation by using the re-connect 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 re-connect 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 re-connect 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 select the Target | Reset menu option.

## 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

- 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 "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

- Select the Tools | Options menu item to bring up the Environment Options dialog window.
- 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.