blob: 3eb85e8ab1e4ed23913d9e0a6dfcd0d3cbbbc853 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='sdk-eclipse-project'>
6
7 <title>Developing Applications Using <trademark class='trade'>Eclipse</trademark></title>
8
9 <para>
10 If you are familiar with the popular Eclipse IDE, you can use an
11 Eclipse Yocto Plug-in to allow you to develop, deploy, and test your
12 application all from within Eclipse.
13 This chapter describes general workflow using the SDK and Eclipse
14 and how to configure and set up Eclipse.
15 </para>
16
17 <section id='workflow-using-eclipse'>
18 <title>Workflow Using <trademark class='trade'>Eclipse</trademark></title>
19
20 <para>
21 The following figure and supporting list summarize the
Brad Bishop316dfdd2018-06-25 12:45:53 -040022 general workflow for application development that uses the
23 SDK within the Eclipse IDE.
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024 </para>
25
26 <para>
27 <imagedata fileref="figures/sdk-eclipse-dev-flow.png"
28 width="7in" depth="7in" align="center" scale="100" />
29 </para>
30
31 <para>
32 <orderedlist>
33 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -040034 <emphasis>Prepare the Host System for the Yocto Project</emphasis>:
35 See the
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
37 and
38 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
39 sections both in the Yocto Project Reference Manual for
40 requirements.
41 In particular, be sure your host system has the
42 <filename>xterm</filename> package installed.
43 </para></listitem>
44 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -040045 <emphasis>Secure the Yocto Project Kernel Target
46 Image</emphasis>:
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047 You must have a target kernel image that has been built
48 using the OpenEmbedded build system.</para>
49 <para>Depending on whether the Yocto Project has a
50 pre-built image that matches your target architecture
51 and where you are going to run the image while you
52 develop your application (QEMU or real hardware), the
53 area from which you get the image differs.
54 <itemizedlist>
55 <listitem><para>
56 Download the image from
57 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
58 if your target architecture is supported and
59 you are going to develop and test your
60 application on actual hardware.
61 </para></listitem>
62 <listitem><para>
63 Download the image from
64 <ulink url='&YOCTO_QEMU_DL_URL;'>
65 <filename>machines/qemu</filename></ulink> if
66 your target architecture is supported and you
67 are going to develop and test your application
Brad Bishop316dfdd2018-06-25 12:45:53 -040068 using the
69 <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>QEMU Emulator</ulink>.
Brad Bishopd7bf8c12018-02-25 22:55:05 -050070 </para></listitem>
71 <listitem><para>
72 Build your image if you cannot find a pre-built
73 image that matches your target architecture.
74 If your target architecture is similar to a
75 supported architecture, you can modify the
76 kernel image before you build it.
77 See the
78 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</ulink>"
79 section in the Yocto Project Linux Kernel
80 Development Manual for an example.
81 </para></listitem>
82 </itemizedlist>
83 </para></listitem>
84 <listitem>
85 <para><emphasis>Install the SDK</emphasis>:
86 The SDK provides a target-specific cross-development
87 toolchain, the root filesystem, the QEMU emulator, and
88 other tools that can help you develop your application.
89 For information on how to install the SDK, see the
90 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
91 section.
92 </para></listitem>
93 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -040094 <emphasis>Secure the Target Root Filesystem
95 and the Cross-Development Toolchain</emphasis>:
Brad Bishopd7bf8c12018-02-25 22:55:05 -050096 You need to find and download the appropriate root
97 filesystem and the cross-development toolchain.</para>
98 <para>You can find the tarballs for the root filesystem
99 in the same area used for the kernel image.
100 Depending on the type of image you are running, the
101 root filesystem you need differs.
102 For example, if you are developing an application that
103 runs on an image that supports Sato, you need to get a
104 root filesystem that supports Sato.</para>
105 <para>You can find the cross-development toolchains at
106 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
107 Be sure to get the correct toolchain for your
108 development host and your target architecture.
109 See the "<link linkend='sdk-locating-pre-built-sdk-installers'>Locating Pre-Built SDK Installers</link>"
110 section for information and the
111 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
112 section for installation information.
113 <note>
114 As an alternative to downloading an SDK, you can
115 build the SDK installer.
116 For information on building the installer, see the
117 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
118 section.
119 Another helpful resource for building an installer
120 is the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400121 "<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>Cookbook guide to Making an Eclipse Debug Capable Image</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500122 wiki page.
123 </note>
124 </para></listitem>
125 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400126 <emphasis>Create and Build Your Application</emphasis>:
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500127 At this point, you need to have source files for your
128 application.
129 Once you have the files, you can use the Eclipse IDE
130 to import them and build the project.
Brad Bishop316dfdd2018-06-25 12:45:53 -0400131 </para></listitem>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500132 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400133 <emphasis>Deploy the Image With the Application</emphasis>:
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500134 Using the Eclipse IDE, you can deploy your image to the
135 hardware or to QEMU through the project's preferences.
136 You can also use Eclipse to load and test your image
137 under QEMU.
138 See the
139 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
140 chapter in the Yocto Project Development Tasks Manual
141 for information on using QEMU.
142 </para></listitem>
143 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400144 <emphasis>Test and Debug the Application</emphasis>:
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500145 Once your application is deployed, you need to test it.
146 Within the Eclipse IDE, you can use the debugging
147 environment along with supported performance enhancing
148 <ulink url='http://www.eclipse.org/linuxtools/'>Linux Tools</ulink>.
149 </para></listitem>
150 </orderedlist>
151 </para>
152 </section>
153
154 <section id='adt-eclipse'>
155 <title>Working Within Eclipse</title>
156
157 <para>
158 The Eclipse IDE is a popular development environment and it
159 fully supports development using the Yocto Project.
160 </para>
161
162 <para>
163 When you install and configure the Eclipse Yocto Project
164 Plug-in into the Eclipse IDE, you maximize your Yocto
165 Project experience.
166 Installing and configuring the Plug-in results in an
167 environment that has extensions specifically designed to let
168 you more easily develop software.
169 These extensions allow for cross-compilation, deployment, and
170 execution of your output into a QEMU emulation session as well
171 as actual target hardware.
172 You can also perform cross-debugging and profiling.
173 The environment also supports performance enhancing
174 <ulink url='http://www.eclipse.org/linuxtools/'>tools</ulink>
175 that allow you to perform remote profiling, tracing,
176 collection of power data, collection of latency data, and
177 collection of performance data.
178 <note>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400179 This release of the Yocto Project supports both the Oxygen
180 and Neon versions of the Eclipse IDE.
181 This section provides information on how to use the Oxygen
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500182 release with the Yocto Project.
Brad Bishop316dfdd2018-06-25 12:45:53 -0400183 For information on how to use the Neon version of Eclipse
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500184 with the Yocto Project, see
Brad Bishop316dfdd2018-06-25 12:45:53 -0400185 "<link linkend='sdk-appendix-neon-yp-eclipse-plug-in'>Appendix D</link>".
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500186 </note>
187 </para>
188
Brad Bishop316dfdd2018-06-25 12:45:53 -0400189 <section id='oxygen-setting-up-the-eclipse-ide'>
190 <title>Setting Up the Oxygen Version of the Eclipse IDE</title>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500191
192 <para>
193 To develop within the Eclipse IDE, you need to do the
194 following:
195 <orderedlist>
196 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400197 Install the Oxygen version of the Eclipse IDE.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500198 </para></listitem>
199 <listitem><para>
200 Configure the Eclipse IDE.
201 </para></listitem>
202 <listitem><para>
203 Install the Eclipse Yocto Plug-in.
204 </para></listitem>
205 <listitem><para>
206 Configure the Eclipse Yocto Plug-in.
207 </para></listitem>
208 </orderedlist>
209 <note>
210 Do not install Eclipse from your distribution's package
211 repository.
212 Be sure to install Eclipse from the official Eclipse
213 download site as directed in the next section.
214 </note>
215 </para>
216
Brad Bishop316dfdd2018-06-25 12:45:53 -0400217 <section id='oxygen-installing-eclipse-ide'>
218 <title>Installing the Oxygen Eclipse IDE</title>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500219
220 <para>
221 Follow these steps to locate, install, and configure
Brad Bishop316dfdd2018-06-25 12:45:53 -0400222 Oxygen Eclipse:
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500223 <orderedlist>
224 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400225 <emphasis>Locate the Oxygen Download:</emphasis>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500226 Open a browser and go to
Brad Bishop316dfdd2018-06-25 12:45:53 -0400227 <ulink url='http://www.eclipse.org/oxygen/'>http://www.eclipse.org/oxygen/</ulink>.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500228 </para></listitem>
229 <listitem><para>
230 <emphasis>Download the Tarball:</emphasis>
231 Click through the "Download" buttons to
232 download the file.
233 </para></listitem>
234 <listitem><para>
235 <emphasis>Unpack the Tarball:</emphasis>
236 Move to a clean directory and unpack the
237 tarball.
238 Here is an example:
239 <literallayout class='monospaced'>
240 $ cd ~
241 $ tar -xzvf ~/Downloads/eclipse-inst-linux64.tar.gz
242 </literallayout>
243 Everything unpacks into a folder named
244 "eclipse-installer".
245 </para></listitem>
246 <listitem><para>
247 <emphasis>Launch the Installer:</emphasis>
248 Use the following commands to launch the
249 installer:
250 <literallayout class='monospaced'>
251 $ cd ~/eclipse-installer
252 $ ./eclipse-inst
253 </literallayout>
254 </para></listitem>
255 <listitem><para>
256 <emphasis>Select Your IDE:</emphasis>
257 From the list, select the "Eclipse IDE for
258 C/C++ Developers".
259 </para></listitem>
260 <listitem><para>
261 <emphasis>Install the Software:</emphasis>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400262 Click "Install" to begin the installation.
263 Accept all the certificates and any license
264 agreements.
265 Click "Install" again to finish the installation.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500266 </para></listitem>
267 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400268 <emphasis>Launch Oxygen:</emphasis>
269 Accept the default "workspace" and click the
270 "Launch" button.
271 You should see the Eclipse welcome page from which
272 can click "workbench" to enter your workspace.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500273 </para></listitem>
274 </orderedlist>
275 </para>
276 </section>
277
Brad Bishop316dfdd2018-06-25 12:45:53 -0400278 <section id='oxygen-configuring-the-eclipse-ide'>
279 <title>Configuring the Oxygen Eclipse IDE</title>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500280
281 <para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400282 Follow these steps to configure the Oxygen Eclipse IDE.
283 <note><title>Notes</title>
284 <itemizedlist>
285 <listitem><para>
286 Depending on how you installed Eclipse and what
287 you have already done, some of the options will
288 not appear.
289 If you cannot find an option as directed by the
290 manual, it has already been installed.
291 </para></listitem>
292 <listitem><para>
293 If you want to see all items regardless of
294 whether they are installed or not, deselect the
295 "Hide items that are already installed"
296 check box.
297 </para></listitem>
298 </itemizedlist>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500299 </note>
300 <orderedlist>
301 <listitem><para>
302 Be sure Eclipse is running and you are in your
303 workbench.
Brad Bishop316dfdd2018-06-25 12:45:53 -0400304 Just click "workbench" if you are not in your
305 default workspace.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500306 </para></listitem>
307 <listitem><para>
308 Select "Install New Software" from the "Help"
309 pull-down menu.
310 </para></listitem>
311 <listitem><para>
312 Select
Brad Bishop316dfdd2018-06-25 12:45:53 -0400313 "Oxygen - http://download.eclipse.org/releases/oxygen"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500314 from the "Work with:" pull-down menu.
315 </para></listitem>
316 <listitem><para>
317 Expand the box next to "Linux Tools" and select
318 the following:
319 <literallayout class='monospaced'>
320 C/C++ Remote (Over TCF/TE) Run/Debug Launcher
321 TM Terminal
322 </literallayout>
323 </para></listitem>
324 <listitem><para>
325 Expand the box next to "Mobile and Device
326 Development" and select the following
327 boxes:
328 <literallayout class='monospaced'>
329 C/C++ Remote (Over TCF/TE) Run/Debug Launcher
330 Remote System Explorer User Actions
331 TM Terminal
332 TCF Remote System Explorer add-in
333 TCF Target Explorer
334 </literallayout>
335 </para></listitem>
336 <listitem><para>
337 Expand the box next to "Programming Languages"
338 and select the following box:
339 <literallayout class='monospaced'>
340 C/C++ Development Tools SDK
341 </literallayout>
342 </para></listitem>
343 <listitem><para>
344 Complete the installation by clicking through
Brad Bishop316dfdd2018-06-25 12:45:53 -0400345 appropriate "Next" and "Finish" buttons and then
346 restart the Eclipse IDE.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500347 </para></listitem>
348 </orderedlist>
349 </para>
350 </section>
351
Brad Bishop316dfdd2018-06-25 12:45:53 -0400352 <section id='oxygen-installing-the-eclipse-yocto-plug-in'>
353 <title>Installing or Accessing the Oxygen Eclipse Yocto Plug-in</title>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500354
355 <para>
356 You can install the Eclipse Yocto Plug-in into the
357 Eclipse IDE one of two ways: use the Yocto Project's
Brad Bishop316dfdd2018-06-25 12:45:53 -0400358 Eclipse Update site to install the pre-built plug-in,
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500359 or build and install the plug-in from the latest
360 source code.
361 </para>
362
Brad Bishop316dfdd2018-06-25 12:45:53 -0400363 <section id='oxygen-new-software'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500364 <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
365
366 <para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400367 To install the Oxygen Eclipse Yocto Plug-in from the
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500368 update site, follow these steps:
369 <orderedlist>
370 <listitem><para>
371 Start up the Eclipse IDE.
372 </para></listitem>
373 <listitem><para>
374 In Eclipse, select "Install New
375 Software" from the "Help" menu.
376 </para></listitem>
377 <listitem><para>
378 Click "Add..." in the "Work with:" area.
379 </para></listitem>
380 <listitem><para>
381 Enter
Brad Bishop316dfdd2018-06-25 12:45:53 -0400382 <filename>&ECLIPSE_DL_PLUGIN_URL;/oxygen</filename>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500383 in the URL field and provide a meaningful
384 name in the "Name" field.
385 </para></listitem>
386 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400387 Click "OK" to have the entry automatically
388 populate the "Work with:" field and to have
389 the items for installation appear in the window
390 below.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500391 </para></listitem>
392 <listitem><para>
393 Check the boxes next to the following:
394 <literallayout class='monospaced'>
395 Yocto Project SDK Plug-in
396 Yocto Project Documentation plug-in
397 </literallayout>
398 </para></listitem>
399 <listitem><para>
400 Complete the remaining software
401 installation steps and then restart the
402 Eclipse IDE to finish the installation of
403 the plug-in.
404 <note>
405 You can click "OK" when prompted about
406 installing software that contains
407 unsigned content.
408 </note>
409 </para></listitem>
410 </orderedlist>
411 </para>
412 </section>
413
Brad Bishop316dfdd2018-06-25 12:45:53 -0400414 <section id='oxygen-zip-file-method'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500415 <title>Installing the Plug-in Using the Latest Source Code</title>
416
417 <para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400418 To install the Oxygen Eclipse Yocto Plug-in from the
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500419 latest source code, follow these steps:
420 <orderedlist>
421 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400422 Be sure your build host has JDK version 1.8
423 or greater.
424 On a Linux build host you can determine the
425 version using the following command:
426 <literallayout class='monospaced'>
427 $ java -version
428 </literallayout>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500429 </para></listitem>
430 <listitem><para>
431 Install X11-related packages:
432 <literallayout class='monospaced'>
433 $ sudo apt-get install xauth
434 </literallayout>
435 </para></listitem>
436 <listitem><para>
437 In a new terminal shell, create a
438 Git repository with:
439 <literallayout class='monospaced'>
440 $ cd ~
Brad Bishop316dfdd2018-06-25 12:45:53 -0400441 $ git clone git://git.yoctoproject.org/eclipse-yocto
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500442 </literallayout>
443 </para></listitem>
444 <listitem><para>
445 Use Git to create the correct tag:
446 <literallayout class='monospaced'>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400447 $ cd ~/eclipse-yocto
448 $ git checkout -b oxygen/&DISTRO_NAME_NO_CAP; remotes/origin/oxygen/&DISTRO_NAME_NO_CAP;
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500449 </literallayout>
450 This creates a local tag named
Brad Bishop316dfdd2018-06-25 12:45:53 -0400451 <filename>oxygen/&DISTRO_NAME_NO_CAP;</filename>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500452 based on the branch
Brad Bishop316dfdd2018-06-25 12:45:53 -0400453 <filename>origin/oxygen/&DISTRO_NAME_NO_CAP;</filename>.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500454 You are put into a detached HEAD state,
455 which is fine since you are only going to
456 be building and not developing.
457 </para></listitem>
458 <listitem><para>
459 Change to the <filename>scripts</filename>
460 directory within the Git repository:
461 <literallayout class='monospaced'>
462 $ cd scripts
463 </literallayout>
464 </para></listitem>
465 <listitem><para>
466 Set up the local build environment
467 by running the setup script:
468 <literallayout class='monospaced'>
469 $ ./setup.sh
470 </literallayout>
471 When the script finishes execution,
472 it prompts you with instructions on how to
473 run the <filename>build.sh</filename>
474 script, which is also in the
475 <filename>scripts</filename> directory of
476 the Git repository created earlier.
477 </para></listitem>
478 <listitem><para>
479 Run the <filename>build.sh</filename>
480 script as directed.
481 Be sure to provide the tag name,
482 documentation branch, and a release name.
483 </para>
484 <para>
485 Following is an example:
486 <literallayout class='monospaced'>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400487 $ ECLIPSE_HOME=/home/scottrif/eclipse-yocto/scripts/eclipse ./build.sh -l oxygen/&DISTRO_NAME_NO_CAP; master yocto-&DISTRO; 2>&amp;1 | tee build.log
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500488 </literallayout>
489 The previous example command adds the tag
490 you need for
Brad Bishop316dfdd2018-06-25 12:45:53 -0400491 <filename>oxygen/&DISTRO_NAME_NO_CAP;</filename>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500492 to <filename>HEAD</filename>, then tells
493 the build script to use the local (-l) Git
494 checkout for the build.
495 After running the script, the file
496 <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
497 is in the current directory.
498 </para></listitem>
499 <listitem><para>
500 If necessary, start the Eclipse IDE
501 and be sure you are in the Workbench.
502 </para></listitem>
503 <listitem><para>
504 Select "Install New Software" from
505 the "Help" pull-down menu.
506 </para></listitem>
507 <listitem><para>
508 Click "Add".
509 </para></listitem>
510 <listitem><para>
511 Provide anything you want in the
512 "Name" field.
513 </para></listitem>
514 <listitem><para>
515 Click "Archive" and browse to the
516 ZIP file you built earlier.
517 This ZIP file should not be "unzipped", and
518 must be the
519 <filename>*archive.zip</filename> file
520 created by running the
521 <filename>build.sh</filename> script.
522 </para></listitem>
523 <listitem><para>
524 Click the "OK" button.
525 </para></listitem>
526 <listitem><para>
527 Check the boxes that appear in
528 the installation window to install the
529 following:
530 <literallayout class='monospaced'>
531 Yocto Project SDK Plug-in
532 Yocto Project Documentation plug-in
533 </literallayout>
534 </para></listitem>
535 <listitem><para>
536 Finish the installation by clicking
537 through the appropriate buttons.
538 You can click "OK" when prompted about
539 installing software that contains unsigned
540 content.
541 </para></listitem>
542 <listitem><para>
543 Restart the Eclipse IDE if necessary.
544 </para></listitem>
545 </orderedlist>
546 </para>
547
548 <para>
549 At this point you should be able to configure the
550 Eclipse Yocto Plug-in as described in the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400551 "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500552 section.
553 </para>
554 </section>
555 </section>
556
Brad Bishop316dfdd2018-06-25 12:45:53 -0400557 <section id='oxygen-configuring-the-eclipse-yocto-plug-in'>
558 <title>Configuring the Oxygen Eclipse Yocto Plug-in</title>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500559
560 <para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400561 Configuring the Oxygen Eclipse Yocto Plug-in involves
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500562 setting the Cross Compiler options and the Target
563 options.
564 The configurations you choose become the default
565 settings for all projects.
566 You do have opportunities to change them later when
567 you configure the project (see the following section).
568 </para>
569
570 <para>
571 To start, you need to do the following from within the
572 Eclipse IDE:
Brad Bishop316dfdd2018-06-25 12:45:53 -0400573 <orderedlist>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500574 <listitem><para>
575 Choose "Preferences" from the "Window" menu to
576 display the Preferences Dialog.
577 </para></listitem>
578 <listitem><para>
579 Click "Yocto Project SDK" to display
580 the configuration screen.
581 </para></listitem>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400582 </orderedlist>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500583 The following sub-sections describe how to configure
584 the plug-in.
585 <note>
586 Throughout the descriptions, a start-to-finish
587 example for preparing a QEMU image for use with
588 Eclipse is referenced as the "wiki" and is linked
589 to the example on the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400590 "<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500591 wiki page.
592 </note>
593 </para>
594
Brad Bishop316dfdd2018-06-25 12:45:53 -0400595 <section id='oxygen-configuring-the-cross-compiler-options'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500596 <title>Configuring the Cross-Compiler Options</title>
597
598 <para>
599 Cross Compiler options enable Eclipse to use your
600 specific cross compiler toolchain.
601 To configure these options, you must select
602 the type of toolchain, point to the toolchain,
603 specify the sysroot location, and select the target
604 architecture.
605 <itemizedlist>
606 <listitem><para>
607 <emphasis>Selecting the Toolchain
608 Type:</emphasis>
609 Choose between
610 <filename>Standalone pre-built toolchain</filename>
611 and
612 <filename>Build system derived toolchain</filename>
613 for Cross Compiler Options.
614 <itemizedlist>
615 <listitem><para>
616 <emphasis>
617 <filename>Standalone Pre-built Toolchain:</filename>
618 </emphasis>
619 Select this type when you are using
620 a stand-alone cross-toolchain.
621 For example, suppose you are an
622 application developer and do not
623 need to build a target image.
624 Instead, you just want to use an
625 architecture-specific toolchain on
626 an existing kernel and target root
627 filesystem.
628 In other words, you have downloaded
629 and installed a pre-built toolchain
630 for an existing image.
631 </para></listitem>
632 <listitem><para>
633 <emphasis>
634 <filename>Build System Derived Toolchain:</filename>
635 </emphasis>
636 Select this type if you built the
637 toolchain as part of the
638 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
639 When you select
640 <filename>Build system derived toolchain</filename>,
641 you are using the toolchain built
642 and bundled inside the Build
643 Directory.
644 For example, suppose you created a
645 suitable image using the steps in the
646 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
647 In this situation, you would select
648 the
649 <filename>Build system derived toolchain</filename>.
650 </para></listitem>
651 </itemizedlist>
652 </para></listitem>
653 <listitem><para>
654 <emphasis>Specify the Toolchain Root
655 Location:</emphasis>
656 If you are using a stand-alone pre-built
657 toolchain, you should be pointing to where
658 it is installed (e.g.
659 <filename>/opt/poky/&DISTRO;</filename>).
660 See the
661 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
662 section for information about how the SDK is
663 installed.</para>
664 <para>If you are using a build system
665 derived toolchain, the path you provide for
666 the
667 <filename>Toolchain Root Location</filename>
668 field is the
669 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
670 from which you run the
671 <filename>bitbake</filename> command (e.g
672 <filename>/home/scottrif/poky/build</filename>).
673 </para>
674 <para>For more information, see the
675 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
676 section.
677 </para></listitem>
678 <listitem><para>
679 <emphasis>Specify Sysroot Location:
680 </emphasis>
681 This location is where the root filesystem
682 for the target hardware resides.
683 </para>
684 <para>This location depends on where you
685 separately extracted and installed the
686 target filesystem when you either built
687 it or downloaded it.
688 <note>
689 If you downloaded the root filesystem
690 for the target hardware rather than
691 built it, you must download the
692 <filename>sato-sdk</filename> image
693 in order to build any c/c++ projects.
694 </note>
695 As an example, suppose you prepared an
696 image using the steps in the
697 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
698 If so, the
699 <filename>MY_QEMU_ROOTFS</filename>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400700 directory is found in the Build Directory
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500701 and you would browse to and select that
702 directory (e.g.
703 <filename>/home/scottrif/poky/build/MY_QEMU_ROOTFS</filename>).
704 </para>
705 <para>For more information on how to
706 install the toolchain and on how to extract
707 and install the sysroot filesystem, see the
708 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
709 section.
710 </para></listitem>
711 <listitem><para>
712 <emphasis>Select the Target Architecture:
713 </emphasis>
714 The target architecture is the type of
715 hardware you are going to use or emulate.
716 Use the pull-down
717 <filename>Target Architecture</filename>
718 menu to make your selection.
719 The pull-down menu should have the
720 supported architectures.
721 If the architecture you need is not listed
722 in the menu, you will need to build the
723 image.
724 See the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400725 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image'>Building a Simple Image</ulink>"
726 section of the Yocto Project Development Tasks
727 Manual for more information.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500728 You can also see the
729 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
730 </para></listitem>
731 </itemizedlist>
732 </para>
733 </section>
734
Brad Bishop316dfdd2018-06-25 12:45:53 -0400735 <section id='oxygen-configuring-the-target-options'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500736 <title>Configuring the Target Options</title>
737
738 <para>
739 You can choose to emulate hardware using the QEMU
740 emulator, or you can choose to run your image on
741 actual hardware.
742 <itemizedlist>
743 <listitem><para>
744 <emphasis>QEMU:</emphasis>
745 Select this option if you will be using the
746 QEMU emulator.
747 If you are using the emulator, you also
748 need to locate the kernel and specify any
749 custom options.</para>
750 <para>If you selected the
751 <filename>Build system derived toolchain</filename>,
752 the target kernel you built will be located
753 in the
754 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
755 in
756 <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
757 directory.
758 As an example, suppose you performed the
759 steps in the
760 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
761 In this case, you specify your Build
762 Directory path followed by the image (e.g.
763 <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
764 </para>
765 <para>If you selected the standalone
766 pre-built toolchain, the pre-built image
767 you downloaded is located in the directory
768 you specified when you downloaded the
769 image.</para>
770 <para>Most custom options are for advanced
771 QEMU users to further customize their QEMU
772 instance.
773 These options are specified between paired
774 angled brackets.
775 Some options must be specified outside the
776 brackets.
777 In particular, the options
778 <filename>serial</filename>,
779 <filename>nographic</filename>, and
780 <filename>kvm</filename> must all be
781 outside the brackets.
782 Use the <filename>man qemu</filename>
783 command to get help on all the options and
784 their use.
785 The following is an example:
786 <literallayout class='monospaced'>
787 serial ‘&lt;-m 256 -full-screen&gt;’
788 </literallayout></para>
789 <para>
790 Regardless of the mode, Sysroot is already
791 defined as part of the Cross-Compiler
792 Options configuration in the
793 <filename>Sysroot Location:</filename>
794 field.
795 </para></listitem>
796 <listitem><para>
797 <emphasis>External HW:</emphasis>
798 Select this option if you will be using
799 actual hardware.</para></listitem>
800 </itemizedlist>
801 </para>
802
803 <para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400804 Click "Apply and Close" to save your plug-in
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500805 configurations.
806 </para>
807 </section>
808 </section>
809 </section>
810
Brad Bishop316dfdd2018-06-25 12:45:53 -0400811 <section id='oxygen-creating-the-project'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500812 <title>Creating the Project</title>
813
814 <para>
815 You can create two types of projects: Autotools-based, or
816 Makefile-based.
817 This section describes how to create Autotools-based
818 projects from within the Eclipse IDE.
819 For information on creating Makefile-based projects in a
820 terminal window, see the
821 "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
822 section.
823 <note>
824 Do not use special characters in project names
825 (e.g. spaces, underscores, etc.). Doing so can
826 cause configuration to fail.
827 </note>
828 </para>
829
830 <para>
831 To create a project based on a Yocto template and then
832 display the source code, follow these steps:
833 <orderedlist>
834 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400835 Select "C/C++ Project" from the "File -> New" menu.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500836 </para></listitem>
837 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400838 Select "C Managed Build" from the available options and
839 click "Next".
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500840 </para></listitem>
841 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400842 Expand "Yocto Project SDK Autotools Project".
843 </para></listitem>
844 <listitem><para>
845 Select "Hello World ANSI C Autotools Projects".
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500846 This is an Autotools-based project based on a Yocto
847 template.
848 </para></listitem>
849 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400850 Put a name in the "Project name:" field.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500851 Do not use hyphens as part of the name
852 (e.g. <filename>hello</filename>).
853 </para></listitem>
854 <listitem><para>
855 Click "Next".
856 </para></listitem>
857 <listitem><para>
858 Add appropriate information in the various fields.
859 </para></listitem>
860 <listitem><para>
861 Click "Finish".
862 </para></listitem>
863 <listitem><para>
864 If the "open perspective" prompt appears,
865 click "Yes" so that you in the C/C++ perspective.
866 </para></listitem>
867 <listitem><para>The left-hand navigation pane shows
868 your project.
869 You can display your source by double clicking the
870 project's source file.
871 </para></listitem>
872 </orderedlist>
873 </para>
874 </section>
875
Brad Bishop316dfdd2018-06-25 12:45:53 -0400876 <section id='oxygen-configuring-the-cross-toolchains'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500877 <title>Configuring the Cross-Toolchains</title>
878
879 <para>
880 The earlier section,
Brad Bishop316dfdd2018-06-25 12:45:53 -0400881 "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>",
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500882 sets up the default project configurations.
883 You can override these settings for a given project by
884 following these steps:
885 <orderedlist>
886 <listitem><para>
887 Select "Yocto Project Settings" from
888 the "Project -> Properties" menu.
889 This selection brings up the Yocto Project Settings
890 Dialog and allows you to make changes specific to
891 an individual project.</para>
892 <para>By default, the Cross Compiler Options and
893 Target Options for a project are inherited from
894 settings you provided using the Preferences Dialog
895 as described earlier in the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400896 "<link linkend='oxygen-configuring-the-eclipse-yocto-plug-in'>Configuring the Oxygen Eclipse Yocto Plug-in</link>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500897 section.
898 The Yocto Project Settings Dialog allows you to
899 override those default settings for a given
900 project.
901 </para></listitem>
902 <listitem><para>
903 Make or verify your configurations for the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400904 project and click "Apply and Close".
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500905 </para></listitem>
906 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400907 Right-click in the navigation pane and select
908 "Reconfigure Project" from the pop-up menu.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500909 This selection reconfigures the project by running
Brad Bishop316dfdd2018-06-25 12:45:53 -0400910 <ulink url='https://en.wikipedia.org/wiki/GNU_Build_System'>Autotools GNU utility programs</ulink>
911 such as Autoconf, Automake, and so forth in the
912 workspace for your project.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500913 Click on the "Console" tab beneath your source code
914 to see the results of reconfiguring your project.
915 </para></listitem>
916 </orderedlist>
917 </para>
918 </section>
919
Brad Bishop316dfdd2018-06-25 12:45:53 -0400920 <section id='oxygen-building-the-project'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500921 <title>Building the Project</title>
922 <para>
923 To build the project select "Build All" from the
924 "Project" menu.
925 The console should update and you can note the
Brad Bishop316dfdd2018-06-25 12:45:53 -0400926 cross-compiler you are using (i.e.
927 <filename>i586-poky-linux-gcc</filename> in this example).
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500928 <note>
929 When building "Yocto Project SDK Autotools" projects,
930 the Eclipse IDE might display error messages for
931 Functions/Symbols/Types that cannot be "resolved",
932 even when the related include file is listed at the
933 project navigator and when the project is able to
934 build.
935 For these cases only, it is recommended to add a new
936 linked folder to the appropriate sysroot.
937 Use these steps to add the linked folder:
938 <orderedlist>
939 <listitem><para>
940 Select the project.
941 </para></listitem>
942 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400943 Select "Folder" from the "File -> New" menu.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500944 </para></listitem>
945 <listitem><para>
Brad Bishop316dfdd2018-06-25 12:45:53 -0400946 In the "New Folder" Dialog, click the "Advanced"
947 button and then activate "Link to
948 alternate location (linked folder)" button.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500949 </para></listitem>
950 <listitem><para>
951 Click "Browse" to navigate to the include
952 folder inside the same sysroot location
953 selected in the Yocto Project
954 configuration preferences.
955 </para></listitem>
956 <listitem><para>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500957 Click "Finish" to save the linked folder.
958 </para></listitem>
959 </orderedlist>
960 </note>
961 </para>
962 </section>
963
Brad Bishop316dfdd2018-06-25 12:45:53 -0400964 <section id='oxygen-starting-qemu-in-user-space-nfs-mode'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500965 <title>Starting QEMU in User-Space NFS Mode</title>
966
967 <para>
968 To start the QEMU emulator from within Eclipse, follow
969 these steps:
970 <note>
971 See the
972 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
973 chapter in the Yocto Project Development Tasks Manual
974 for more information on using QEMU.
975 </note>
976 <orderedlist>
977 <listitem><para>Expose and select "External Tools
978 Configurations ..." from the "Run -> External
979 Tools" menu.
980 </para></listitem>
981 <listitem><para>
982 Locate and select your image in the navigation
983 panel to the left
984 (e.g. <filename>qemu_i586-poky-linux</filename>).
985 </para></listitem>
986 <listitem><para>
987 Click "Run" to launch QEMU.
988 <note>
989 The host on which you are running QEMU must
990 have the <filename>rpcbind</filename> utility
991 running to be able to make RPC calls on a
992 server on that machine.
993 If QEMU does not invoke and you receive error
994 messages involving
995 <filename>rpcbind</filename>, follow the
996 suggestions to get the service running.
997 As an example, on a new Ubuntu 16.04 LTS
Brad Bishop316dfdd2018-06-25 12:45:53 -0400998 installation, you must do the following in a new
999 shell in order to get QEMU to launch:
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001000 <literallayout class='monospaced'>
1001 $ sudo apt-get install rpcbind
1002 </literallayout>
1003 After installing <filename>rpcbind</filename>,
1004 you need to edit the
1005 <filename>/etc/init.d/rpcbind</filename> file
1006 to include the following line:
1007 <literallayout class='monospaced'>
1008 OPTIONS="-i -w"
1009 </literallayout>
1010 After modifying the file, you need to start the
1011 service:
1012 <literallayout class='monospaced'>
1013 $ sudo service portmap restart
1014 </literallayout>
1015 </note>
1016 </para></listitem>
1017 <listitem><para>
1018 If needed, enter your host root password in
1019 the shell window at the prompt.
1020 This sets up a <filename>Tap 0</filename>
1021 connection needed for running in user-space NFS
1022 mode.
1023 </para></listitem>
1024 <listitem><para>
1025 Wait for QEMU to launch.
1026 </para></listitem>
1027 <listitem><para>
1028 Once QEMU launches, you can begin operating
1029 within that environment.
1030 One useful task at this point would be to determine
1031 the IP Address for the user-space NFS by using the
1032 <filename>ifconfig</filename> command.
1033 The IP address of the QEMU machine appears in the
1034 xterm window.
1035 You can use this address to help you see which
1036 particular
1037 IP address the instance of QEMU is using.
1038 </para></listitem>
1039 </orderedlist>
1040 </para>
1041 </section>
1042
Brad Bishop316dfdd2018-06-25 12:45:53 -04001043 <section id='oxygen-deploying-and-debugging-the-application'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001044 <title>Deploying and Debugging the Application</title>
1045
1046 <para>
1047 Once the QEMU emulator is running the image, you can deploy
1048 your application using the Eclipse IDE and then use
1049 the emulator to perform debugging.
1050 Follow these steps to deploy the application.
1051 <note>
1052 Currently, Eclipse does not support SSH port
1053 forwarding.
1054 Consequently, if you need to run or debug a remote
1055 application using the host display, you must create a
1056 tunneling connection from outside Eclipse and keep
1057 that connection alive during your work.
1058 For example, in a new terminal, run the following:
1059 <literallayout class='monospaced'>
1060 $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
1061 </literallayout>
1062 Using the above form, here is an example:
1063 <literallayout class='monospaced'>
1064 $ ssh -XY root@192.168.7.2
1065 </literallayout>
1066 After running the command, add the command to be
1067 executed in Eclipse's run configuration before the
1068 application as follows:
1069 <literallayout class='monospaced'>
1070 export DISPLAY=:10.0
1071 </literallayout>
1072 Be sure to not destroy the connection during your QEMU
1073 session (i.e. do not
1074 exit out of or close that shell).
1075 </note>
1076 <orderedlist>
1077 <listitem><para>
1078 Select "Debug Configurations..." from the
1079 "Run" menu.
1080 </para></listitem>
1081 <listitem><para>
1082 In the left area, expand
1083 <filename>C/C++Remote Application</filename>.
1084 </para></listitem>
1085 <listitem><para>
1086 Locate your project and select it to bring
1087 up a new tabbed view in the Debug Configurations
1088 Dialog.
1089 </para></listitem>
1090 <listitem><para>
1091 Click on the "Debugger" tab to see the
1092 cross-tool debugger you are using.
1093 Be sure to change to the debugger perspective in
1094 Eclipse.
1095 </para></listitem>
1096 <listitem><para>
1097 Click on the "Main" tab.
1098 </para></listitem>
1099 <listitem><para>
1100 Create a new connection to the QEMU instance
1101 by clicking on "new".</para></listitem>
1102 <listitem><para>Select <filename>SSH</filename>, which
1103 means Secure Socket Shell and then click "OK".
1104 Optionally, you can select a TCF connection
1105 instead.
1106 </para></listitem>
1107 <listitem><para>
1108 Clear out the "Connection name" field and
1109 enter any name you want for the connection.
1110 </para></listitem>
1111 <listitem><para>
1112 Put the IP address for the connection in
1113 the "Host" field.
1114 For QEMU, the default is
1115 <filename>192.168.7.2</filename>.
1116 However, if a previous QEMU session did not exit
1117 cleanly, the IP address increments (e.g.
1118 <filename>192.168.7.3</filename>).
1119 <note>
1120 You can find the IP address for the current
1121 QEMU session by looking in the xterm that
1122 opens when you launch QEMU.
1123 </note>
1124 </para></listitem>
1125 <listitem><para>
1126 Enter <filename>root</filename>, which
1127 is the default for QEMU, for the "User" field.
1128 Be sure to leave the password field empty.
1129 </para></listitem>
1130 <listitem><para>
1131 Click "Finish" to close the New Connections Dialog.
1132 </para></listitem>
1133 <listitem><para>
1134 If necessary, use the drop-down menu now in the
1135 "Connection" field and pick the IP Address you
1136 entered.
1137 </para></listitem>
1138 <listitem><para>
1139 Assuming you are connecting as the root
1140 user, which is the default for QEMU x86-64 SDK
1141 images provided by the Yocto Project, in the
1142 "Remote Absolute File Path for C/C++ Application"
1143 field, browse to
1144 <filename>/home/root/</filename><replaceable>ProjectName</replaceable>
1145 (e.g. <filename>/home/root/hello</filename>).
1146 You could also browse to any other path you have
1147 write access to on the target such as
1148 <filename>/usr/bin</filename>.
1149 This location is where your application will be
1150 located on the QEMU system.
1151 If you fail to browse to and specify an appropriate
1152 location, QEMU will not understand what to remotely
1153 launch.
1154 Eclipse is helpful in that it auto fills your
1155 application name for you assuming you browsed to a
1156 directory.
1157 <note><title>Tips</title>
1158 <itemizedlist>
1159 <listitem><para>
1160 If you are prompted to provide a username
1161 and to optionally set a password, be sure
1162 you provide "root" as the username and you
1163 leave the password field blank.
1164 </para></listitem>
1165 <listitem><para>
1166 If browsing to a directory fails or times
1167 out, but you can
1168 <filename>ssh</filename> into your QEMU
1169 or target from the command line and you
1170 have proxies set up, it is likely that
1171 Eclipse is sending the SSH traffic to a
1172 proxy.
1173 In this case, either use TCF , or click on
1174 "Configure proxy settings" in the
1175 connection dialog and add the target IP
1176 address to the "bypass proxy" section.
1177 You might also need to change
1178 "Active Provider" from Native to Manual.
1179 </para></listitem>
1180 </itemizedlist>
1181 </note>
1182 </para></listitem>
1183 <listitem><para>
1184 Be sure you change to the "Debug" perspective in
1185 Eclipse.
1186 </para></listitem>
1187 <listitem><para>
1188 Click "Debug"
1189 </para></listitem>
1190 <listitem><para>
1191 Accept the debug perspective.
1192 </para></listitem>
1193 </orderedlist>
1194 </para>
1195 </section>
1196
Brad Bishop316dfdd2018-06-25 12:45:53 -04001197 <section id='oxygen-using-Linuxtools'>
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001198 <title>Using Linuxtools</title>
1199
1200 <para>
1201 As mentioned earlier in the manual, performance tools exist
1202 (Linuxtools) that enhance your development experience.
1203 These tools are aids in developing and debugging
1204 applications and images.
1205 You can run these tools from within the Eclipse IDE through
1206 the "Linuxtools" menu.
1207 </para>
1208
1209 <para>
1210 For information on how to configure and use these tools,
1211 see
1212 <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
1213 </para>
1214 </section>
1215 </section>
1216</chapter>
1217<!--
1218vim: expandtab tw=80 ts=4
1219-->