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, and reconnect to a 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.

## Targets window layout

###### Targets tool bar

Button | Description
| Connects the selected target interface.
| Disconnects the connected target interface.
| Reconnects the connected target interface.
| Resets the connected target interface.
| Displays the properties of the selected target interface.

###### Showing the Targets window

To display the Targets window if it is hidden, do one of the following:

- From the View or Target menu, click Targets.

—or—

- Type Ctrl+Alt+T.

—or—

- Right click the tool bar area to display the View menu.
- From the popup menu, click Targets.

## Managing target connections

###### Connecting a target

To connect a target, do one of the following:

- In the Targets window, double click the target to connect.

—or—

- From the Target menu, click the target to connect.

—or—

- In the Targets window, click the target to connect.
- On the Targets window tool bar, click the Connect button

—or—

- In the Targets window, right click the target to connect.
- From the popup menu, click Connect

—or—

- In the Targets window, click the target to connect.
- Type Ctrl+T, C.

###### Disconnecting a target

To disconnect a target, do one of the following:

- From the Target menu, click Disconnect

—or—

- On the Targets window tool bar, click the Disconnect button

—or—

- Type Ctrl+T, D.

—or—

- Right click the connected target in the Targets window
- From the popup menu, click Disconnect.

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

###### Reconnecting a target

You can disconnect and reconnect a target in a single operation using the reconnect feature. This may be useful if the target board has been power cycled or reset manually as it forces CrossStudio to resynchronize with the target.

To reconnect a target, do one of the following:

- From the Target menu, click Reconnect.

—or—

- On the Targets window tool bar, click the Reconnect button.

—or—

- Type Ctrl+T, E.

—or—

- In the Targets window, right click the target to reconnect.
- From the popup menu, click Reconnect.

###### Automatic target connection

You can configure CrossStudiuo to automatically connect to the last used target interface when loading a solution.

To enable or disable automatic target connection, do the following:

- From the View menu, click Properties Window.
- In the Properties Window, click Environment Properties from the combo box.
- In the Target Settings section, set the Enable Auto Connect property to Yes to enable automatic connection or to No to disable automatic connection.

###### Creating a new target interface

To create a new target interface, do the following:

- From the targets window's context menu, click 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.

###### Setting target interface 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 or edit target properties, do the following:

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

###### 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, do the following:

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

## Controlling target connections

###### 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, do one of the following:

- On the Targets window tool bar, click the Reset button.

—or—

- From the Target menu, click Reset

—or—

- Type Ctrl+T, S.

###### Downloading programs

Program download is handled automatically by CrossStudio when you start debugging. However, you can download arbitrary programs to a target using the Targets window.

To download a program to the currently selected target, do the following:

- In the Targets window, right click the selected target.
- From the popup menu, click Download File.
- From the Download File menu, select the type of file to download.
- In the Open File dialog, select the executable file to download and click Open to download the file.

CrossStudio supports the following file formats when downloading a program:

- Binary
- Intel Hex
- Motorola S-record
- CrossWorks native object file
- Texas Instruments text file

###### Verifying downloaded programs

You can verify a target's contents against a arbitrary programs held on disk using the Targets window.

To verify a target's contents against a program, do the following:

- In the Targets window, right click the selected target.
- From the popup menu, click Verify File.
- From the Verify File menu, select the type of file to verify.
- In the Open File dialog, select the executable file to verify and click Open to verify the file.

CrossStudio supports the same file types for verification as it does for downloading, described above.

###### Erasing target memory

Usually, erasing target memory is done automatically CrossStudio downloads a program, but you can erase a target's memory manually.

To completely erase target memory, do the following:

- In the Targets window, right click the target to erase.
- From the popup menu, click Erase All.

To erase part of target memory, do the following:

- In the Targets window, right click the target to erase.
- From the popup menu, click Erase Range.

###### 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, do the following:

- From the Tools menu, click 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.