Target Communication Framework: Getting Started

Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0

Direct comments, questions to the dsdp-tcf-dev@eclipse.org mailing list

Table of Contents

Creating Eclipse Workspace

Eclipse can be used for developing clients for TCF in Java. TCF host side code is organized into several Eclipse plug-in projects, below are steps to create and populate Eclipse workspace with TCF projects:

TCF Plugins

TCF plugins source code is stored in <TCF Root>\plugins directory.

org.eclipse.tm.tcf
This is the main TCF plugin. It contains Eclipse integration code for the framework. It is the only TCF plugin, which (together with its fragments) should be required by a TCF client. The rest of TCF plugins are clients developed as a reference implementation or for demonstration purposes.

org.eclipse.tm.tcf.core
This is a fragment of org.eclipse.tm.tcf plugin. It contains the framework itself and interfaces for standard services. The Java code in the fragment does not have any Eclipse dependencies and can be used outside Eclipse.

org.eclipse.tm.tcf.debug, org.eclipse.tm.tcf.debug.ui
This is a prototype code that connects Eclipse Debug Framework and Target Communication Framework. It allows to launch Eclipse debug session by connecting to a target running TCF agent, and then perform basic debugging tasks, like resuming, suspending, single-stepping, setting/removing breakpoints, etc. The code can be used as a reference for developing new TCF clients.

org.eclipse.tm.tcf.dsf, org.eclipse.tm.tcf.dsf.ui
This code allows Debugger Services Framework (DSF) clients to access targets using TCF as comminucation protocol. It includes implementation of DSF services as TCF clients.

org.eclipse.tm.tcf.rse
This plugin allows Remote System Explorer (RSE) to connect to remote machines using TCF as communication protocol. It includes implementation of RSE services as TCF clients.

org.eclipse.tm.tcf.cdt.ui
This optional plugin improves integration between CDT and TCF debugger prototype. It helps to search for CDT projects and executable files when creating TCF launch configuration.

org.eclipse.tm.tcf.examples.daytime
This is an example plugin. The Example shows how TCF/Java binding can be extended for a new, user defined service. The plugin provides Java binding for DayTime service. Also, see directory <TCF Root>/examples/org.eclipse.tm.tcf.examples.daytime.agent for example code of a customized TCF agent, which implements DayTime service.

Building TCF Agent

CDT can be used to build TCF agent. CDT .project file is located in <TCF Root>/agent directory.

Linux: To build the agent:

Windows: For building the agent, there are two possibilities:

On VxWorks, line number mapping and the SysMonitor service (needed for RSE Processes Demo) are not yet implemented.
To build the agent: Use Wind River Workbench 3.0 or 3.1, and VxWorks 6.6 or 6.7 to create a Kernel Module project out of source code in <TCF Root>/agent directory. Use Workbench commands to build and run the agent. To run the agent on VxWorks Simulator you will need to setup a simulated network - see Networking with the VxWorks Simulator chapter in Wind River VxWorks Simulator user's guide for details.

Browsing Agent Source Code in CDT

On Linux, the default configuration from the CDT .project file included in TCF should be fine for correctly browsing the agent source code. Linux is recommended for working on the agent anyways, because most features are implemented already.

On Windows, open Project Properties of the agent project, and under C/C++ General > Indexer switch the configuration to "Win32 - Cygwin" or "Win32 - DevStudio" as needed.

For VxWorks, browsing should be configured automatically through the WR Workbench Kernel Module Project.

Using TCF With Remote System Explorer

Remote System Explorer is an Eclipse based component that allows users to create connections to remote machines and explore their file systems, see list of processes and access some other resources, like remote shells. Remote System Explorer has been designed as a flexible, extensible framework to which Eclipse plug-in developers can contribute their own system definitions, actions, etc.

Plugin org.eclipse.tm.tcf.rse enables use of Processes and Files subsystems of Remote System Explorer over TCF. It also extends Processes subsystem to include CPU utilization data and some other process attributes in RSE views.

To connect a remote machine over TCF:

RSE features supported by TCF connection:

Using TCF With Eclipse Debugger

Plugins org.eclipse.tm.tcf.debug and org.eclipse.tm.tcf.debug.ui allow to start a debug session by connecting to a machine runnning TCF agent.

To start a debug session over TCF:

In TCF debug session "Debug", "Breakpoints", "Registers", "Variables" and "Expressions" views are populated. Source level debugging is fully supported if the source code can be found in a CDT project in current workspace.