Target Communication Framework: Getting Started

Copyright (c) 2007-2019 Wind River Systems, Inc. and others. Made available under the EPL 2.0
Agent portion made available under your choice of EPL 2.0 or EDL v1.0 dual-license.

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

Table of Contents

Creating an Eclipse Workspace for Development

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

TCF Plugins

TCF plugins source code is stored in <TCF Root>/plugins directory.
Examples source code is stored in <TCF Root>/examples directory.

org.eclipse.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.tcf.core
This is a fragment of org.eclipse.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.tcf.debug, org.eclipse.tcf.debug.ui
This code 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.tcf.rse
This optional 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.tcf.cdt.ui
This optional plugin improves integration between CDT and TCF debugger. It helps to search for CDT projects and executable files when creating TCF launch configuration.

org.eclipse.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.tcf.examples.daytime.agent for example code of a customized TCF agent, which implements DayTime service.

Pre-built TCF plugins are available at Eclipse Update site/p2 repositories. The repositories can be accessed from Eclipse using Help/Install New Software command.

Target Explorer Plugins

Target Explorer plugins source code is stored in the <TCF Root>/target_explorer/plugins directory.

Building TCF Agent

Clone TCF C code from Eclipse GIT repository, using one of the following commands:
git clone https://git.eclipse.org/r/tcf/org.eclipse.tcf.agent.git
git clone ssh://<user>@git.eclipse.org:29418/tcf/org.eclipse.tcf.agent.git

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:

TCF Integration with Python

The TCF integration with Python allows writing TCF client and server programs in the Python programming lanugage. TCF Python code is stored in <TCF Root>/python directory.

TCF Integration with Lua

The TCF integration with Lua allows writing TCF client and server programs in the Lua programming lanugage. See TCF Lua Integration 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.

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 Target Explorer

The Target Explorer aims to create a lightweight but highly flexible and extensible remote system management framework. The focus is on TCF remote system management, but is by no means limited to it. The Target Explorer comes with full remote file system and remote process support, and allows to connect a terminal to the remote system using TCF, SSH, Telnet and serial line.

If building from source, import all org.eclipse.tcf.te.* plug-in's to enable the Target Explorer.

Since Eclipse version 3.8, Target Explorer is available for download from main Eclipse p2 repository. The feature name is "Mobile and Device Development / Target Explorer, TCF".

To connect a remote machine over TCF:

Using TCF With Eclipse Debugger

Plugins org.eclipse.tcf.debug and org.eclipse.tcf.debug.ui allow to start a debug session by connecting to a machine runnning TCF agent. Plugin org.eclipse.tcf.cdt.ui handles integration of the debugger with CDT UI.

Since Eclipse version 3.8, TCF Debugger is available for download from main Eclipse p2 repository. The feature name is "Mobile and Device Development / Target Communication Framework, CDT Extender".

To start a debug session over TCF:

The TCF Debugger implements advanced, asynchronous, transaction based retrieval and caching of remote data. The technology allows excellent data coherency and communication performance.

The debugger fully supports multi-threaded, multi-process, multi-core, whole system and multi-system debugging in a single debug session.

In TCF debug session, "Debug", "Breakpoints", "Registers", "Variables", "Expressions", "Memory" and "Modules" views are populated by the TCF debugger. "Disassembly" view and instruction level stepping are available if the agent supports it. Reverse execution is available if the agent supports it. TCF Trace view can be used to display TCF communication traffic. Remote process standard I/O is redirected to the Console view. Source level debugging is fully supported.

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.tcf.rse enables use of Processes, Shells, Terminals 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.

Since Eclipse version 3.8, TCF-RSE is available for download from main Eclipse p2 repository. The feature name is "Mobile and Device Development / Target Communication Framework, RSE Extender".

To connect a remote machine over TCF:

RSE features supported by TCF connection: