70
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
2 |
<html>
|
|
3 |
<head>
|
|
4 |
<title>Target Communication Framework: Getting Started</title>
|
|
5 |
</head>
|
|
6 |
|
|
7 |
<body lang='EN-US'>
|
|
8 |
|
|
9 |
<h1>Target Communication Framework: Getting Started</h1>
|
|
10 |
|
|
11 |
<p>Copyright (c) 2007, 2008 Wind River Systems, Inc. Made available under the EPL v1.0
|
|
12 |
<p>Direct comments, questions to the <a href="mailto:dsdp-tcf-dev@eclipse.org">dsdp-tcf-dev@eclipse.org</a> mailing list
|
|
13 |
|
|
14 |
<h2>Table of Contents</h2>
|
|
15 |
<ul>
|
|
16 |
<li><a href='#Workspace'>Creating Eclipse Workspace</a>
|
|
17 |
<li><a href='#Plugins'>TCF Plugins</a>
|
|
18 |
<li><a href='#Agent'>Building TCF Agent</a>
|
|
19 |
<li><a href='#Browsing'>Browsing Agent Source Code in CDT</a>
|
|
20 |
<li><a href='#RSE'>Using TCF With Remote System Explorer</a>
|
|
21 |
<li><a href='#Debugger'>Using TCF With Eclipse Debugger</a>
|
|
22 |
</ul>
|
|
23 |
|
|
24 |
<h2><a name='Workspace'>Creating Eclipse Workspace</a></h2>
|
|
25 |
|
|
26 |
<p>Eclipse can be used for developing clients for TCF in Java.
|
|
27 |
TCF host side code is organized into several Eclipse plug-in projects,
|
|
28 |
below are steps to create and populate Eclipse workspace with TCF projects:</p>
|
|
29 |
|
|
30 |
<ul>
|
|
31 |
<li>Install JDK 1.5.0 or later, recommended 1.6.0
|
|
32 |
<li>Install <b>Eclipse Classic SDK 3.4</b>, last tested with 3.4.2, recommended 3.4.2<br>
|
|
33 |
<a href='http://download.eclipse.org/eclipse/downloads/'>http://download.eclipse.org/eclipse/downloads/</a>
|
|
34 |
<li>Install <b>TM RSE SDK 3.0</b> or later, last tested with 3.0.3, recommended 3.0.3<br>
|
|
35 |
<a href='http://download.eclipse.org/dsdp/tm/downloads/'>http://download.eclipse.org/dsdp/tm/downloads/</a>
|
|
36 |
<li><b>Optional</b> dependencies for TCF/DSF/CDT integration: these are not required by
|
|
37 |
TCF itself, and not needed for RSE integration or for TCF based debugger demo,
|
|
38 |
use these for future development:
|
|
39 |
<ul>
|
|
40 |
<li>CDT (Eclipse C/C++ Development Tools SDK) 5.0 or later, last tested with 5.0.2, recommended 5.0.2<br>
|
|
41 |
<a href='http://www.eclipse.org/cdt/downloads.php'>http://www.eclipse.org/cdt/downloads.php</a>
|
|
42 |
<li>DD (Device Debug) SDK 1.0.0<br>
|
|
43 |
<a href='http://download.eclipse.org/dsdp/dd/downloads/'>http://download.eclipse.org/dsdp/dd/downloads/</a>
|
|
44 |
</ul>
|
|
45 |
<li>Checkout TCF code from <a href='http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk'>Eclipse SVN repository</a>:
|
|
46 |
<pre>svn co svn://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk</pre>
|
|
47 |
<li>Run Eclipse:
|
|
48 |
<pre>eclipse.exe -vm <JDK path>\bin\javaw.exe -data <Workspace path> -vmargs -Xmx200M</pre>
|
|
49 |
<li>Open "Java" perspective.
|
|
50 |
<li>In "Package Explorer" view: do right click and then select "Import...".
|
|
51 |
<li>Select "General/Existing Projects into Workspace" and click "Next".
|
|
52 |
<li>Select root directory: <TCF Root>\plugins, and click "Next".
|
|
53 |
<ul>
|
|
54 |
<li>If DD-DSF and/or CDT are not installed, don't import the following two plugins
|
|
55 |
into your workspace:
|
|
56 |
<ul>
|
|
57 |
<li>org.eclipse.tm.tcf.dsf
|
|
58 |
<li>org.eclipse.tm.tcf.dsf.ui
|
|
59 |
<li>org.eclipse.tm.tcf.cdt.ui
|
|
60 |
</ul>
|
|
61 |
</ul>
|
|
62 |
<!--
|
|
63 |
<li><b>Optional</b> for browsing dependencies:<ul>
|
|
64 |
<li>In Package Explorer: do right click and select "Import...".
|
|
65 |
<li>Select "Plug-in Development/Plug-ins and Fragments" and click "Next".
|
|
66 |
<li>Select "Import plug-ins and fragments required by existig workspace plug-ins" and click "Next".
|
|
67 |
<li>Click "Select All", then click "Finish".
|
|
68 |
</ul></li>
|
|
69 |
-->
|
|
70 |
</ul>
|
|
71 |
|
|
72 |
<!--
|
|
73 |
<p>Alternative way to get CDT, DSF and RSE installed:
|
|
74 |
<ul>
|
|
75 |
<li>Get Eclipse for C/C++ Package from <a href='http://www.eclipse.org/downloads/'>
|
|
76 |
http://www.eclipse.org/downloads/</a> - it includes CDT.
|
|
77 |
<li>Do "Help > Software Updates > Find and Install > Search for New Features to Install > Next"
|
|
78 |
<li>Select "Europa Discovery Site", press "Finish"
|
|
79 |
<li>Select following:
|
|
80 |
<ul>
|
|
81 |
<li>Remote Access and Device Development
|
|
82 |
<ul>
|
|
83 |
<li>Remote System Explorer End-User Runtime
|
|
84 |
<li>Debugger Services Framework end-user and extender SDK
|
|
85 |
</ul>
|
|
86 |
</ul>
|
|
87 |
<li>Press "Select Required" if in Error
|
|
88 |
<li>Press "Next", "Accept", "Next", "Finish"
|
|
89 |
</ul>
|
|
90 |
-->
|
|
91 |
|
|
92 |
<h2><a name='Plugins'>TCF Plugins</a></h2>
|
|
93 |
|
|
94 |
<p>TCF plugins source code is stored in <code><TCF Root>\plugins</code> directory.
|
|
95 |
|
|
96 |
<dl>
|
|
97 |
<dt><b>org.eclipse.tm.tcf</b>
|
|
98 |
<dd>This is the main TCF plugin. It contains Eclipse integration code for the framework.
|
|
99 |
It is the only TCF plugin, which (together with its fragments) should be required by a TCF client. The rest of TCF plugins are
|
|
100 |
clients developed as a reference implementation or for demonstration purposes.
|
|
101 |
<p>
|
|
102 |
<dt><b>org.eclipse.tm.tcf.core</b>
|
|
103 |
<dd>This is a fragment of <b>org.eclipse.tm.tcf</b> plugin. It contains the framework itself and interfaces for standard services.
|
|
104 |
The Java code in the fragment does not have any Eclipse dependencies and can be used outside Eclipse.
|
|
105 |
<p>
|
|
106 |
<dt><b>org.eclipse.tm.tcf.debug, org.eclipse.tm.tcf.debug.ui</b>
|
|
107 |
<dd>This is a prototype code that connects Eclipse Debug Framework and Target Communication Framework.
|
|
108 |
It allows to launch Eclipse debug session by connecting to a target running TCF agent,
|
|
109 |
and then perform basic debugging tasks, like resuming, suspending, single-stepping, setting/removing breakpoints, etc.
|
|
110 |
The code can be used as a reference for developing new TCF clients.
|
|
111 |
<p>
|
|
112 |
<dt><b>org.eclipse.tm.tcf.dsf, org.eclipse.tm.tcf.dsf.ui</b>
|
|
113 |
<dd>This code allows Debugger Services Framework (DSF) clients to access targets using TCF as comminucation protocol.
|
|
114 |
It includes implementation of DSF services as TCF clients.
|
|
115 |
<p>
|
|
116 |
<dt><b>org.eclipse.tm.tcf.rse</b>
|
|
117 |
<dd>This plugin allows Remote System Explorer (RSE) to connect to remote machines using TCF as communication protocol.
|
|
118 |
It includes implementation of RSE services as TCF clients.
|
|
119 |
<p>
|
|
120 |
<dt><b>org.eclipse.tm.tcf.cdt.ui</b>
|
|
121 |
<dd>This optional plugin improves integration between CDT and TCF debugger prototype.
|
|
122 |
It helps to search for CDT projects and executable files when creating TCF launch configuration.
|
|
123 |
<p>
|
|
124 |
<dt><b>org.eclipse.tm.tcf.examples.daytime</b>
|
|
125 |
<dd>This is an example plugin.
|
|
126 |
The Example shows how TCF/Java binding can be extended for a new, user defined service.
|
|
127 |
The plugin provides Java binding for DayTime service.
|
|
128 |
Also, see directory <code><TCF Root>/examples/org.eclipse.tm.tcf.examples.daytime.agent</code>
|
|
129 |
for example code of a customized TCF agent, which implements DayTime service.
|
|
130 |
</dl>
|
|
131 |
|
|
132 |
<h2><a name='Agent'>Building TCF Agent</a></h2>
|
|
133 |
|
|
134 |
<p><b>CDT</b> can be used to build TCF agent.
|
|
135 |
CDT .project file is located in <code><TCF Root>/agent</code> directory.
|
|
136 |
|
|
137 |
<p><b>Linux</b>: To build the agent:
|
|
138 |
<ul>
|
|
139 |
<li>Run <code>make</code> command in <code><TCF Root>/agent</code> directory.
|
|
140 |
<li>Start agent: <pre>GNU/Linux/i686/Debug/agent -L- -l0</pre>
|
|
141 |
Use other -l option values to increase agent log details level.
|
|
142 |
</ul>
|
|
143 |
|
|
144 |
<p><b>Windows</b>: For building the agent, there are two possibilities:<ul>
|
|
145 |
<li>Building with gcc (freely available from <a href="http://wascana.sourceforge.net/">Wascana</a>,
|
|
146 |
<a href="http://www.cygwin.com">Cygwin</a> or the
|
|
147 |
<a href="http://www.mingw.org/">MinGW32 project</a>): run
|
|
148 |
<pre>make</pre> or <pre>make SYSOP=Msys</pre>
|
|
149 |
in the agent directory.</li>
|
|
150 |
|
|
151 |
<li>Building with Microsoft Visual C++:
|
|
152 |
open workspace file <code><TCF Root>/agent/agent.sln</code>
|
|
153 |
and then build and run the agent using Development Studio commands. If getting an error about
|
|
154 |
<tt>IPHlpApi.h</tt> missing, you'll need to install the latest
|
|
155 |
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en">MS Platform SDK</a>.
|
|
156 |
For the free <a href="http://www.microsoft.com/express/vc/">Visual C++ Express Edition</a>, the
|
|
157 |
following changes in settings may be necessary:<ul>
|
|
158 |
<li>Project > Properties > C/C++ > Preprocessor > Preprocessor Definitions:
|
|
159 |
add <tt>_CRT_SECURE_NO_DEPRECATE</tt></li>
|
|
160 |
<li>Project > Properties > Linker > Input > Additional Dependencies :
|
|
161 |
add <tt>shell32.lib</tt></li>
|
|
162 |
</ul></li>
|
|
163 |
</ul></p>
|
|
164 |
|
|
165 |
<p>On <b>VxWorks</b>, line number mapping and the SysMonitor service (needed for RSE Processes
|
|
166 |
Demo) are not yet implemented.<br/>
|
|
167 |
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
|
|
168 |
project out of source code in <code><TCF Root>/agent</code> directory. Use Workbench
|
|
169 |
commands to build and run the agent. To run the agent on VxWorks Simulator
|
|
170 |
you will need to setup a simulated network - see Networking with the VxWorks Simulator chapter
|
|
171 |
in Wind River VxWorks Simulator user's guide for details.</p>
|
|
172 |
|
|
173 |
<h2><a name='Browsing'>Browsing Agent Source Code in CDT</a></h2>
|
|
174 |
On Linux, the default configuration from the CDT .project file included in TCF
|
|
175 |
should be fine for correctly browsing the agent source code. Linux is recommended
|
|
176 |
for working on the agent anyways, because most features are implemented already.
|
|
177 |
<p>
|
|
178 |
On Windows, open Project Properties of the agent project, and under C/C++ General >
|
|
179 |
Indexer switch the configuration to "Win32 - Cygwin" or "Win32 - DevStudio"
|
|
180 |
as needed.
|
|
181 |
<p>
|
|
182 |
For VxWorks, browsing should be configured automatically through the WR Workbench
|
|
183 |
Kernel Module Project.
|
|
184 |
|
|
185 |
<h2><a name='RSE'>Using TCF With Remote System Explorer</a></h2>
|
|
186 |
|
|
187 |
<p>Remote System Explorer is an Eclipse based component that allows users to create connections to remote machines and
|
|
188 |
explore their file systems, see list of processes and access some other resources, like remote shells.
|
|
189 |
Remote System Explorer has been designed as a flexible, extensible framework to which Eclipse plug-in developers can
|
|
190 |
contribute their own system definitions, actions, etc.</p>
|
|
191 |
|
|
192 |
<p>Plugin <b>org.eclipse.tm.tcf.rse</b> enables use of Processes and Files subsystems of Remote System Explorer over TCF.
|
|
193 |
It also extends Processes subsystem to include CPU utilization data and some other process attributes in RSE views.</p>
|
|
194 |
|
|
195 |
<p>To connect a remote machine over TCF:</p>
|
|
196 |
<ul>
|
|
197 |
<li>Make sure TCF agent is running on remote machine.
|
|
198 |
<li>Run Eclipse with RSE and TCF plugins installed.
|
|
199 |
<li>In Eclipse, do "Window/Open Perspective/Remote System Explorer" command.
|
|
200 |
<li>In "Remote Systems" view: do right click and select "New/Connection..."
|
|
201 |
<li>In "New Connection" dialog box: select TCF and press "Next" button.
|
|
202 |
<li>Enter "Host name" - IP host name ot the target machine, and "Connection name" - arbitrary string to name new connection.
|
|
203 |
Press "Finish" button.
|
|
204 |
<li>New connection should appear in "Remote Systems" view and it is ready to be explored.
|
|
205 |
</ul>
|
|
206 |
|
|
207 |
<p>RSE features supported by TCF connection:
|
|
208 |
<ul>
|
|
209 |
<li>File Subsystem: full support, i.e. browse, upload, download, copy, move, delete
|
|
210 |
<li>Processes: browse, including parent/child relationship
|
|
211 |
</ul>
|
|
212 |
|
|
213 |
<h2><a name='Debugger'>Using TCF With Eclipse Debugger</a></h2>
|
|
214 |
|
|
215 |
<p>Plugins <b>org.eclipse.tm.tcf.debug</b> and <b>org.eclipse.tm.tcf.debug.ui</b> allow to start a debug session
|
|
216 |
by connecting to a machine runnning TCF agent.
|
|
217 |
|
|
218 |
<p>To start a debug session over TCF:</p>
|
|
219 |
<ul>
|
|
220 |
<li>Make sure TCF agent is running on remote machine.
|
|
221 |
<li>Run Eclipse with TCF plugins installed.
|
|
222 |
<li>In Eclipse, do "Window/Open Perspective/Debug" command.
|
|
223 |
<li>Do "Run/Open Debug Dialog..." command.
|
|
224 |
<li>In "Debug" dialog box: select "Target Comminucation Framework" configuration type and press "New" button.
|
|
225 |
<li>Enter a name for the configuration.
|
|
226 |
<li>Select a target machine in "Available targtes" list. The list shows targets autodetected on local network.
|
|
227 |
<li>Press "Run Diagnostics" button to test connectivity for selected target.
|
|
228 |
<li>Enter a program name to run in debug session, for example "/bin/ls".
|
|
229 |
<li>Press "Debug" to start the debugger.
|
|
230 |
</ul>
|
|
231 |
|
|
232 |
<p>In TCF debug session "Debug", "Breakpoints", "Registers", "Variables" and "Expressions" views are populated.
|
|
233 |
Source level debugging is fully supported if the source code can be found in a CDT project in current workspace.
|
|
234 |
</p>
|
|
235 |
|
|
236 |
</body>
|
|
237 |
</html> |