summaryrefslogtreecommitdiffstats
path: root/documentation/sdk-manual/sdk-appendix-neon.xml
diff options
context:
space:
mode:
authorKristi Rifenbark <kristi@buzzcollectivemarketing.com>2018-03-27 10:11:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-24 17:16:02 +0100
commit6ee6a144918ed141bb1da2fca7d98ca465539be0 (patch)
tree2462d10d8c6461fa9a3963ea0933a9467a242b84 /documentation/sdk-manual/sdk-appendix-neon.xml
parent840dbbfff9f7d6a64f89f9719f48e830dfa3f175 (diff)
downloadpoky-6ee6a144918ed141bb1da2fca7d98ca465539be0.tar.gz
sdk-manual: Added new appendix for Neon
Fixed [YOCTO #12417] (From yocto-docs rev: 9f6b874740b98c5b3eed1c06dcf5fbe687279ca8) Signed-off-by: Kristi Rifenbark <kristi@buzzcollectivemarketing.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sdk-manual/sdk-appendix-neon.xml')
-rw-r--r--documentation/sdk-manual/sdk-appendix-neon.xml920
1 files changed, 920 insertions, 0 deletions
diff --git a/documentation/sdk-manual/sdk-appendix-neon.xml b/documentation/sdk-manual/sdk-appendix-neon.xml
new file mode 100644
index 0000000000..ca6198cadc
--- /dev/null
+++ b/documentation/sdk-manual/sdk-appendix-neon.xml
@@ -0,0 +1,920 @@
1<!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<appendix id='sdk-appendix-neon-yp-eclipse-plug-in'>
6 <title>Using Eclipse Neon</title>
7
8 <para>
9 This release of the Yocto Project supports both the Oxygen and Neon
10 versions of the Eclipse IDE.
11 This appendix presents information that describes how to obtain and
12 configure the Neon version of Eclipse.
13 It also provides a basic project example that you can work through
14 from start to finish.
15 For general information on using the Eclipse IDE and the Yocto
16 Project Eclipse Plug-In, see the
17 "<link linkend='sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
18 Chapter.
19 </para>
20
21 <section id='neon-setting-up-the-eclipse-ide'>
22 <title>Setting Up the Neon Version of the Eclipse IDE</title>
23
24 <para>
25 To develop within the Eclipse IDE, you need to do the following:
26 <orderedlist>
27 <listitem><para>Install the Neon version of the Eclipse
28 IDE.</para></listitem>
29 <listitem><para>Configure the Eclipse IDE.
30 </para></listitem>
31 <listitem><para>Install the Eclipse Yocto Plug-in.
32 </para></listitem>
33 <listitem><para>Configure the Eclipse Yocto Plug-in.
34 </para></listitem>
35 </orderedlist>
36 <note>
37 Do not install Eclipse from your distribution's package
38 repository.
39 Be sure to install Eclipse from the official Eclipse
40 download site as directed in the next section.
41 </note>
42 </para>
43
44 <section id='neon-installing-eclipse-ide'>
45 <title>Installing the Neon Eclipse IDE</title>
46
47 <para>
48 Follow these steps to locate, install, and configure
49 Neon Eclipse:
50 <orderedlist>
51 <listitem><para><emphasis>Locate the Neon Download:</emphasis>
52 Open a browser and go to
53 <ulink url='http://www.eclipse.org/neon/'>http://www.eclipse.org/neon/</ulink>.
54 </para></listitem>
55 <listitem><para><emphasis>Download the Tarball:</emphasis>
56 Click the "Download" button and then use the "Linux
57 for Eclipse IDE for C++ Developers"
58 appropriate for your development system
59 (e.g.
60 <ulink url='http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/2/eclipse-cpp-neon-2-linux-gtk-x86_64.tar.gz'>64-bit under Linux for Eclipse IDE for C++ Developers</ulink>
61 if your development system is a Linux 64-bit machine.
62 </para></listitem>
63 <listitem><para><emphasis>Unpack the Tarball:</emphasis>
64 Move to a clean directory and unpack the tarball.
65 Here is an example:
66 <literallayout class='monospaced'>
67 $ cd ~
68 $ tar -xzvf ~/Downloads/eclipse-cpp-neon-2-linux-gtk-x86_64.tar.gz
69 </literallayout>
70 Everything unpacks into a folder named "Eclipse".
71 </para></listitem>
72 <listitem><para><emphasis>Launch the Installer:</emphasis>
73 Use the following commands to launch the installer:
74 <literallayout class='monospaced'>
75 $ cd ~/eclipse-installer
76 $ ./eclipse-inst
77 </literallayout>
78 </para></listitem>
79 <listitem><para><emphasis>Select Your IDE:</emphasis>
80 From the list, select the "Eclipse IDE for C/C++
81 Developers".
82 </para></listitem>
83 <listitem><para><emphasis>Install the Software:</emphasis>
84 Accept the default "cpp-neon" directory and click
85 "Install".
86 Accept any license agreements and approve any
87 certificates.
88 </para></listitem>
89 <listitem><para><emphasis>Launch Neon:</emphasis>
90 Click the "Launch" button and accept the default
91 "workspace".
92 </para></listitem>
93 </orderedlist>
94 </para>
95 </section>
96
97 <section id='neon-configuring-the-neon-eclipse-ide'>
98 <title>Configuring the Neon Eclipse IDE</title>
99
100 <para>
101 Follow these steps to configure the Neon Eclipse IDE.
102 <note>
103 Depending on how you installed Eclipse and what you have
104 already done, some of the options will not appear.
105 If you cannot find an option as directed by the manual,
106 it has already been installed.
107 </note>
108 <orderedlist>
109 <listitem><para>Be sure Eclipse is running and
110 you are in your workbench.
111 </para></listitem>
112 <listitem><para>Select "Install New Software" from
113 the "Help" pull-down menu.
114 </para></listitem>
115 <listitem><para>Select
116 "Neon - http://download.eclipse.org/releases/neon"
117 from the "Work with:" pull-down menu.
118 </para></listitem>
119 <listitem><para>Expand the box next to
120 "Linux Tools" and select the following
121 <literallayout class='monospaced'>
122 C/C++ Remote (Over TCF/TE) Run/Debug Launcher
123 TM Terminal
124 </literallayout>
125 </para></listitem>
126 <listitem><para>Expand the box next to "Mobile and
127 Device Development" and select the following
128 boxes:
129 <literallayout class='monospaced'>
130 C/C++ Remote (Over TCF/TE) Run/Debug Launcher
131 Remote System Explorer User Actions
132 TM Terminal
133 TCF Remote System Explorer add-in
134 TCF Target Explorer
135 </literallayout>
136 </para></listitem>
137 <listitem><para>Expand the box next to
138 "Programming Languages" and select the
139 following box:
140 <literallayout class='monospaced'>
141 C/C++ Development Tools SDK
142 </literallayout>
143 </para></listitem>
144 <listitem><para>
145 Complete the installation by clicking through
146 appropriate "Next" and "Finish" buttons.
147 </para></listitem>
148 </orderedlist>
149 </para>
150 </section>
151
152 <section id='neon-installing-the-eclipse-yocto-plug-in'>
153 <title>Installing or Accessing the Neon Eclipse Yocto Plug-in</title>
154
155 <para>
156 You can install the Eclipse Yocto Plug-in into the Eclipse
157 IDE one of two ways: use the Yocto Project's Eclipse
158 Update site to install the pre-built plug-in or build and
159 install the plug-in from the latest source code.
160 </para>
161
162 <section id='neon-new-software'>
163 <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
164
165 <para>
166 To install the Neon Eclipse Yocto Plug-in from the update
167 site, follow these steps:
168 <orderedlist>
169 <listitem><para>Start up the Eclipse IDE.
170 </para></listitem>
171 <listitem><para>In Eclipse, select "Install New
172 Software" from the "Help" menu.
173 </para></listitem>
174 <listitem><para>Click "Add..." in the "Work with:"
175 area.
176 </para></listitem>
177 <listitem><para>Enter
178 <filename>&ECLIPSE_DL_PLUGIN_URL;/neon</filename>
179 in the URL field and provide a meaningful name
180 in the "Name" field.
181 </para></listitem>
182 <listitem><para>Click "OK" to have the entry added
183 to the "Work with:" drop-down list.
184 </para></listitem>
185 <listitem><para>Select the entry for the plug-in
186 from the "Work with:" drop-down list.
187 </para></listitem>
188 <listitem><para>Check the boxes next to the following:
189 <literallayout class='monospaced'>
190 Yocto Project SDK Plug-in
191 Yocto Project Documentation plug-in
192 </literallayout>
193 </para></listitem>
194 <listitem><para>Complete the remaining software
195 installation steps and then restart the Eclipse
196 IDE to finish the installation of the plug-in.
197 <note>
198 You can click "OK" when prompted about
199 installing software that contains unsigned
200 content.
201 </note>
202 </para></listitem>
203 </orderedlist>
204 </para>
205 </section>
206
207 <section id='neon-zip-file-method'>
208 <title>Installing the Plug-in Using the Latest Source Code</title>
209
210 <para>
211 To install the Neon Eclipse Yocto Plug-in from the latest
212 source code, follow these steps:
213 <orderedlist>
214 <listitem><para>Be sure your development system
215 has JDK 1.8+
216 </para></listitem>
217 <listitem><para>install X11-related packages:
218 <literallayout class='monospaced'>
219 $ sudo apt-get install xauth
220 </literallayout>
221 </para></listitem>
222 <listitem><para>In a new terminal shell, create a Git
223 repository with:
224 <literallayout class='monospaced'>
225 $ cd ~
226 $ git clone git://git.yoctoproject.org/eclipse-yocto
227 </literallayout>
228 </para></listitem>
229 <listitem><para>Use Git to checkout the correct
230 tag:
231 <literallayout class='monospaced'>
232 $ cd ~/eclipse-yocto
233 $ git checkout neon/yocto-&DISTRO;
234 </literallayout>
235 This creates a local tag named
236 <filename>neon/yocto-&DISTRO;</filename> based on
237 the branch <filename>origin/neon-master</filename>.
238 This puts you in a detached HEAD state, which
239 is fine since you are only going to be building
240 and not developing.
241 </para></listitem>
242 <listitem><para>Change to the
243 <filename>scripts</filename>
244 directory within the Git repository:
245 <literallayout class='monospaced'>
246 $ cd scripts
247 </literallayout>
248 </para></listitem>
249 <listitem><para>Set up the local build environment
250 by running the setup script:
251 <literallayout class='monospaced'>
252 $ ./setup.sh
253 </literallayout>
254 When the script finishes execution,
255 it prompts you with instructions on how to run
256 the <filename>build.sh</filename> script, which
257 is also in the <filename>scripts</filename>
258 directory of the Git repository created
259 earlier.
260 </para></listitem>
261 <listitem><para>Run the <filename>build.sh</filename>
262 script as directed.
263 Be sure to provide the tag name, documentation
264 branch, and a release name.</para>
265 <para>
266 Following is an example:
267 <literallayout class='monospaced'>
268 $ ECLIPSE_HOME=/home/scottrif/eclipse-yocto/scripts/eclipse ./build.sh -l neon/yocto-&DISTRO; master yocto-&DISTRO; 2>&amp;1 | tee build.log
269 </literallayout>
270 The previous example command adds the tag you
271 need for <filename>neon/yocto-&DISTRO;</filename>
272 to <filename>HEAD</filename>, then tells the
273 build script to use the local (-l) Git checkout
274 for the build.
275 After running the script, the file
276 <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
277 is in the current directory.
278 </para></listitem>
279 <listitem><para>If necessary, start the Eclipse IDE
280 and be sure you are in the Workbench.
281 </para></listitem>
282 <listitem><para>Select "Install New Software" from
283 the "Help" pull-down menu.
284 </para></listitem>
285 <listitem><para>Click "Add".
286 </para></listitem>
287 <listitem><para>Provide anything you want in the
288 "Name" field.
289 </para></listitem>
290 <listitem><para>Click "Archive" and browse to the
291 ZIP file you built earlier.
292 This ZIP file should not be "unzipped", and must
293 be the <filename>*archive.zip</filename> file
294 created by running the
295 <filename>build.sh</filename> script.
296 </para></listitem>
297 <listitem><para>Click the "OK" button.
298 </para></listitem>
299 <listitem><para>Check the boxes that appear in
300 the installation window to install the
301 following:
302 <literallayout class='monospaced'>
303 Yocto Project SDK Plug-in
304 Yocto Project Documentation plug-in
305 </literallayout>
306 </para></listitem>
307 <listitem><para>Finish the installation by clicking
308 through the appropriate buttons.
309 You can click "OK" when prompted about
310 installing software that contains unsigned
311 content.
312 </para></listitem>
313 <listitem><para>Restart the Eclipse IDE if
314 necessary.
315 </para></listitem>
316 </orderedlist>
317 </para>
318
319 <para>
320 At this point you should be able to configure the
321 Eclipse Yocto Plug-in as described in the
322 "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>"
323 section.</para>
324 </section>
325 </section>
326
327 <section id='neon-configuring-the-eclipse-yocto-plug-in'>
328 <title>Configuring the Neon Eclipse Yocto Plug-in</title>
329
330 <para>
331 Configuring the Neon Eclipse Yocto Plug-in involves setting the
332 Cross Compiler options and the Target options.
333 The configurations you choose become the default settings
334 for all projects.
335 You do have opportunities to change them later when
336 you configure the project (see the following section).
337 </para>
338
339 <para>
340 To start, you need to do the following from within the
341 Eclipse IDE:
342 <itemizedlist>
343 <listitem><para>Choose "Preferences" from the
344 "Window" menu to display the Preferences Dialog.
345 </para></listitem>
346 <listitem><para>Click "Yocto Project SDK" to display
347 the configuration screen.
348 </para></listitem>
349 </itemizedlist>
350 The following sub-sections describe how to configure the
351 the plug-in.
352 <note>
353 Throughout the descriptions, a start-to-finish example for
354 preparing a QEMU image for use with Eclipse is referenced
355 as the "wiki" and is linked to the example on the
356 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'> Cookbook guide to Making an Eclipse Debug Capable Image</ulink>
357 wiki page.
358 </note>
359 </para>
360
361 <section id='neon-configuring-the-cross-compiler-options'>
362 <title>Configuring the Cross-Compiler Options</title>
363
364 <para>
365 Cross Compiler options enable Eclipse to use your specific
366 cross compiler toolchain.
367 To configure these options, you must select
368 the type of toolchain, point to the toolchain, specify
369 the sysroot location, and select the target
370 architecture.
371 <itemizedlist>
372 <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
373 Choose between
374 <filename>Standalone pre-built toolchain</filename>
375 and
376 <filename>Build system derived toolchain</filename>
377 for Cross Compiler Options.
378 <itemizedlist>
379 <listitem><para><emphasis>
380 <filename>Standalone Pre-built Toolchain:</filename></emphasis>
381 Select this type when you are using
382 a stand-alone cross-toolchain.
383 For example, suppose you are an
384 application developer and do not
385 need to build a target image.
386 Instead, you just want to use an
387 architecture-specific toolchain on
388 an existing kernel and target root
389 filesystem.
390 In other words, you have downloaded
391 and installed a pre-built toolchain
392 for an existing image.
393 </para></listitem>
394 <listitem><para><emphasis>
395 <filename>Build System Derived Toolchain:</filename></emphasis>
396 Select this type if you built the
397 toolchain as part of the
398 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
399 When you select
400 <filename>Build system derived toolchain</filename>,
401 you are using the toolchain built and
402 bundled inside the Build Directory.
403 For example, suppose you created a
404 suitable image using the steps in the
405 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
406 In this situation, you would select the
407 <filename>Build system derived toolchain</filename>.
408 </para></listitem>
409 </itemizedlist>
410 </para></listitem>
411 <listitem><para><emphasis>Specify the Toolchain Root Location:</emphasis>
412 If you are using a stand-alone pre-built
413 toolchain, you should be pointing to where it is
414 installed (e.g.
415 <filename>/opt/poky/&DISTRO;</filename>).
416 See the
417 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
418 section for information about how the SDK is
419 installed.</para>
420 <para>If you are using a build system derived
421 toolchain, the path you provide for the
422 <filename>Toolchain Root Location</filename>
423 field is the
424 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
425 from which you run the
426 <filename>bitbake</filename> command (e.g
427 <filename>/home/scottrif/poky/build</filename>).</para>
428 <para>For more information, see the
429 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
430 section.
431 </para></listitem>
432 <listitem><para><emphasis>Specify Sysroot Location:</emphasis>
433 This location is where the root filesystem for
434 the target hardware resides.
435 </para>
436 <para>This location depends on where you
437 separately extracted and installed the
438 target filesystem when you either built
439 it or downloaded it.
440 <note>
441 If you downloaded the root filesystem
442 for the target hardware rather than
443 built it, you must download the
444 <filename>sato-sdk</filename> image
445 in order to build any c/c++ projects.
446 </note>
447 As an example, suppose you prepared an image
448 using the steps in the
449 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
450 If so, the <filename>MY_QEMU_ROOTFS</filename>
451 directory is found in the
452 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
453 and you would browse to and select that directory
454 (e.g. <filename>/home/scottrif/build/MY_QEMU_ROOTFS</filename>).
455 </para>
456 <para>For more information on how to install the
457 toolchain and on how to extract and install the
458 sysroot filesystem, see the
459 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
460 section.
461 </para></listitem>
462 <listitem><para><emphasis>Select the Target Architecture:</emphasis>
463 The target architecture is the type of hardware
464 you are going to use or emulate.
465 Use the pull-down
466 <filename>Target Architecture</filename> menu
467 to make your selection.
468 The pull-down menu should have the supported
469 architectures.
470 If the architecture you need is not listed in
471 the menu, you will need to build the image.
472 See the
473 "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
474 section of the Yocto Project Quick Start for
475 more information.
476 You can also see the
477 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
478 </para></listitem>
479 </itemizedlist>
480 </para>
481 </section>
482
483 <section id='neon-configuring-the-target-options'>
484 <title>Configuring the Target Options</title>
485
486 <para>
487 You can choose to emulate hardware using the QEMU
488 emulator, or you can choose to run your image on actual
489 hardware.
490 <itemizedlist>
491 <listitem><para><emphasis>QEMU:</emphasis>
492 Select this option if you will be using the
493 QEMU emulator.
494 If you are using the emulator, you also need to
495 locate the kernel and specify any custom
496 options.</para>
497 <para>If you selected the
498 <filename>Build system derived toolchain</filename>,
499 the target kernel you built will be located in
500 the
501 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
502 in
503 <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
504 directory.
505 As an example, suppose you performed the steps in
506 the
507 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
508 In this case, you specify your Build Directory path
509 followed by the image (e.g.
510 <filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
511 </para>
512 <para>If you selected the standalone pre-built
513 toolchain, the pre-built image you downloaded is
514 located in the directory you specified when you
515 downloaded the image.</para>
516 <para>Most custom options are for advanced QEMU
517 users to further customize their QEMU instance.
518 These options are specified between paired
519 angled brackets.
520 Some options must be specified outside the
521 brackets.
522 In particular, the options
523 <filename>serial</filename>,
524 <filename>nographic</filename>, and
525 <filename>kvm</filename> must all be outside the
526 brackets.
527 Use the <filename>man qemu</filename> command
528 to get help on all the options and their use.
529 The following is an example:
530 <literallayout class='monospaced'>
531 serial ‘&lt;-m 256 -full-screen&gt;’
532 </literallayout></para>
533 <para>
534 Regardless of the mode, Sysroot is already
535 defined as part of the Cross-Compiler Options
536 configuration in the
537 <filename>Sysroot Location:</filename> field.
538 </para></listitem>
539 <listitem><para><emphasis>External HW:</emphasis>
540 Select this option if you will be using actual
541 hardware.</para></listitem>
542 </itemizedlist>
543 </para>
544
545 <para>
546 Click the "Apply" and "OK" to save your plug-in
547 configurations.
548 </para>
549 </section>
550 </section>
551 </section>
552
553 <section id='neon-creating-the-project'>
554 <title>Creating the Project</title>
555
556 <para>
557 You can create two types of projects: Autotools-based, or
558 Makefile-based.
559 This section describes how to create Autotools-based projects
560 from within the Eclipse IDE.
561 For information on creating Makefile-based projects in a
562 terminal window, see the
563 "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
564 section.
565 <note>
566 Do not use special characters in project names
567 (e.g. spaces, underscores, etc.). Doing so can
568 cause the configuration to fail.
569 </note>
570 </para>
571
572 <para>
573 To create a project based on a Yocto template and then display
574 the source code, follow these steps:
575 <orderedlist>
576 <listitem><para>Select "C Project" from the "File -> New" menu.
577 </para></listitem>
578 <listitem><para>Expand <filename>Yocto Project SDK Autotools Project</filename>.
579 </para></listitem>
580 <listitem><para>Select <filename>Hello World ANSI C Autotools Projects</filename>.
581 This is an Autotools-based project based on a Yocto
582 template.
583 </para></listitem>
584 <listitem><para>Put a name in the <filename>Project name:</filename>
585 field.
586 Do not use hyphens as part of the name
587 (e.g. <filename>hello</filename>).
588 </para></listitem>
589 <listitem><para>Click "Next".
590 </para></listitem>
591 <listitem><para>Add appropriate information in the various
592 fields.
593 </para></listitem>
594 <listitem><para>Click "Finish".
595 </para></listitem>
596 <listitem><para>If the "open perspective" prompt appears,
597 click "Yes" so that you are in the C/C++ perspective.
598 </para></listitem>
599 <listitem><para>The left-hand navigation pane shows your
600 project.
601 You can display your source by double clicking the
602 project's source file.
603 </para></listitem>
604 </orderedlist>
605 </para>
606 </section>
607
608 <section id='neon-configuring-the-cross-toolchains'>
609 <title>Configuring the Cross-Toolchains</title>
610
611 <para>
612 The earlier section,
613 "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>",
614 sets up the default project configurations.
615 You can override these settings for a given project by following
616 these steps:
617 <orderedlist>
618 <listitem><para>Select "Yocto Project Settings" from
619 the "Project -> Properties" menu.
620 This selection brings up the Yocto Project Settings
621 Dialog and allows you to make changes specific to an
622 individual project.</para>
623 <para>By default, the Cross Compiler Options and Target
624 Options for a project are inherited from settings you
625 provided using the Preferences Dialog as described
626 earlier in the
627 "<link linkend='neon-configuring-the-eclipse-yocto-plug-in'>Configuring the Neon Eclipse Yocto Plug-in</link>" section.
628 The Yocto Project Settings Dialog allows you to override
629 those default settings for a given project.
630 </para></listitem>
631 <listitem><para>Make or verify your configurations for the
632 project and click "OK".
633 </para></listitem>
634 <listitem><para>Right-click in the navigation pane and
635 select "Reconfigure Project" from the pop-up menu.
636 This selection reconfigures the project by running
637 <filename>autogen.sh</filename> in the workspace for
638 your project.
639 The script also runs <filename>libtoolize</filename>,
640 <filename>aclocal</filename>,
641 <filename>autoconf</filename>,
642 <filename>autoheader</filename>,
643 <filename>automake --a</filename>, and
644 <filename>./configure</filename>.
645 Click on the "Console" tab beneath your source code to
646 see the results of reconfiguring your project.
647 </para></listitem>
648 </orderedlist>
649 </para>
650 </section>
651
652 <section id='neon-building-the-project'>
653 <title>Building the Project</title>
654
655 <para>
656 To build the project select "Build All" from the
657 "Project" menu.
658 The console should update and you can note the cross-compiler
659 you are using.
660 <note>
661 When building "Yocto Project SDK Autotools" projects, the
662 Eclipse IDE might display error messages for
663 Functions/Symbols/Types that cannot be "resolved", even when
664 the related include file is listed at the project navigator and
665 when the project is able to build.
666 For these cases only, it is recommended to add a new linked
667 folder to the appropriate sysroot.
668 Use these steps to add the linked folder:
669 <orderedlist>
670 <listitem><para>
671 Select the project.
672 </para></listitem>
673 <listitem><para>
674 Select "Folder" from the
675 <filename>File > New</filename> menu.
676 </para></listitem>
677 <listitem><para>
678 In the "New Folder" Dialog, select "Link to alternate
679 location (linked folder)".
680 </para></listitem>
681 <listitem><para>
682 Click "Browse" to navigate to the include folder inside
683 the same sysroot location selected in the Yocto Project
684 configuration preferences.
685 </para></listitem>
686 <listitem><para>
687 Click "OK".
688 </para></listitem>
689 <listitem><para>
690 Click "Finish" to save the linked folder.
691 </para></listitem>
692 </orderedlist>
693 </note>
694 </para>
695 </section>
696
697 <section id='neon-starting-qemu-in-user-space-nfs-mode'>
698 <title>Starting QEMU in User-Space NFS Mode</title>
699
700 <para>
701 To start the QEMU emulator from within Eclipse, follow these
702 steps:
703 <note>
704 See the
705 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
706 chapter in the Yocto Project Development Tasks Manual
707 for more information on using QEMU.
708 </note>
709 <orderedlist>
710 <listitem><para>Expose and select "External Tools
711 Configurations ..." from the "Run -> External Tools" menu.
712 </para></listitem>
713 <listitem><para>
714 Locate and select your image in the navigation panel to
715 the left (e.g. <filename>qemu_i586-poky-linux</filename>).
716 </para></listitem>
717 <listitem><para>
718 Click "Run" to launch QEMU.
719 <note>
720 The host on which you are running QEMU must have
721 the <filename>rpcbind</filename> utility running to be
722 able to make RPC calls on a server on that machine.
723 If QEMU does not invoke and you receive error messages
724 involving <filename>rpcbind</filename>, follow the
725 suggestions to get the service running.
726 As an example, on a new Ubuntu 16.04 LTS installation,
727 you must do the following in order to get QEMU to
728 launch:
729 <literallayout class='monospaced'>
730 $ sudo apt-get install rpcbind
731 </literallayout>
732 After installing <filename>rpcbind</filename>, you
733 need to edit the
734 <filename>/etc/init.d/rpcbind</filename> file to
735 include the following line:
736 <literallayout class='monospaced'>
737 OPTIONS="-i -w"
738 </literallayout>
739 After modifying the file, you need to start the
740 service:
741 <literallayout class='monospaced'>
742 $ sudo service portmap restart
743 </literallayout>
744 </note>
745 </para></listitem>
746 <listitem><para>If needed, enter your host root password in
747 the shell window at the prompt.
748 This sets up a <filename>Tap 0</filename> connection
749 needed for running in user-space NFS mode.
750 </para></listitem>
751 <listitem><para>Wait for QEMU to launch.
752 </para></listitem>
753 <listitem><para>Once QEMU launches, you can begin operating
754 within that environment.
755 One useful task at this point would be to determine the
756 IP Address for the user-space NFS by using the
757 <filename>ifconfig</filename> command.
758 The IP address of the QEMU machine appears in the
759 xterm window.
760 You can use this address to help you see which particular
761 IP address the instance of QEMU is using.
762 </para></listitem>
763 </orderedlist>
764 </para>
765 </section>
766
767 <section id='neon-deploying-and-debugging-the-application'>
768 <title>Deploying and Debugging the Application</title>
769
770 <para>
771 Once the QEMU emulator is running the image, you can deploy
772 your application using the Eclipse IDE and then use
773 the emulator to perform debugging.
774 Follow these steps to deploy the application.
775 <note>
776 Currently, Eclipse does not support SSH port forwarding.
777 Consequently, if you need to run or debug a remote
778 application using the host display, you must create a
779 tunneling connection from outside Eclipse and keep
780 that connection alive during your work.
781 For example, in a new terminal, run the following:
782 <literallayout class='monospaced'>
783 $ ssh -XY <replaceable>user_name</replaceable>@<replaceable>remote_host_ip</replaceable>
784 </literallayout>
785 Using the above form, here is an example:
786 <literallayout class='monospaced'>
787 $ ssh -XY root@192.168.7.2
788 </literallayout>
789 After running the command, add the command to be executed
790 in Eclipse's run configuration before the application
791 as follows:
792 <literallayout class='monospaced'>
793 export DISPLAY=:10.0
794 </literallayout>
795 Be sure to not destroy the connection during your QEMU
796 session (i.e. do not
797 exit out of or close that shell).
798 </note>
799 <orderedlist>
800 <listitem><para>Select "Debug Configurations..." from the
801 "Run" menu.</para></listitem>
802 <listitem><para>In the left area, expand
803 <filename>C/C++Remote Application</filename>.
804 </para></listitem>
805 <listitem><para>Locate your project and select it to bring
806 up a new tabbed view in the Debug Configurations Dialog.
807 </para></listitem>
808 <listitem><para>Click on the "Debugger" tab to see the
809 cross-tool debugger you are using.
810 Be sure to change to the debugger perspective in Eclipse.
811 </para></listitem>
812 <listitem><para>Click on the "Main" tab.
813 </para></listitem>
814 <listitem><para>Create a new connection to the QEMU instance
815 by clicking on "new".</para></listitem>
816 <listitem><para>Select <filename>SSH</filename>, which means
817 Secure Socket Shell.
818 Optionally, you can select a TCF connection instead.
819 </para></listitem>
820 <listitem><para>Click "Next".
821 </para></listitem>
822 <listitem><para>Clear out the "Connection name" field and
823 enter any name you want for the connection.
824 </para></listitem>
825 <listitem><para>Put the IP address for the connection in
826 the "Host" field.
827 For QEMU, the default is <filename>192.168.7.2</filename>.
828 However, if a previous QEMU session did not exit
829 cleanly, the IP address increments (e.g.
830 <filename>192.168.7.3</filename>).
831 <note>
832 You can find the IP address for the current QEMU
833 session by looking in the xterm that opens when
834 you launch QEMU.
835 </note>
836 </para></listitem>
837 <listitem><para>Enter <filename>root</filename>, which
838 is the default for QEMU, for the "User" field.
839 Be sure to leave the password field empty.
840 </para></listitem>
841 <listitem><para>Click "Finish" to close the
842 New Connections Dialog.
843 </para></listitem>
844 <listitem><para>If necessary, use the drop-down menu now in the
845 "Connection" field and pick the IP Address you entered.
846 </para></listitem>
847 <listitem><para>Assuming you are connecting as the root user,
848 which is the default for QEMU x86-64 SDK images provided by
849 the Yocto Project, in the "Remote Absolute File Path for
850 C/C++ Application" field, browse to
851 <filename>/home/root/</filename><replaceable>ProjectName</replaceable>
852 (e.g. <filename>/home/root/hello</filename>).
853 You could also browse to any other path you have write
854 access to on the target such as
855 <filename>/usr/bin</filename>.
856 This location is where your application will be located on
857 the QEMU system.
858 If you fail to browse to and specify an appropriate
859 location, QEMU will not understand what to remotely
860 launch.
861 Eclipse is helpful in that it auto fills your application
862 name for you assuming you browsed to a directory.
863 <note><title>Tips</title>
864 <itemizedlist>
865 <listitem><para>
866 If you are prompted to provide a username
867 and to optionally set a password, be sure
868 you provide "root" as the username and you
869 leave the password field blank.
870 </para></listitem>
871 <listitem><para>
872 If browsing to a directory fails or times
873 out, but you can
874 <filename>ssh</filename> into your QEMU
875 or target from the command line and you
876 have proxies set up, it is likely that
877 Eclipse is sending the SSH traffic to a
878 proxy.
879 In this case, either use TCF , or click on
880 "Configure proxy settings" in the
881 connection dialog and add the target IP
882 address to the "bypass proxy" section.
883 You might also need to change
884 "Active Provider" from Native to Manual.
885 </para></listitem>
886 </itemizedlist>
887 </note>
888 </para></listitem>
889 <listitem><para>
890 Be sure you change to the "Debug" perspective in Eclipse.
891 </para></listitem>
892 <listitem><para>Click "Debug"
893 </para></listitem>
894 <listitem><para>Accept the debug perspective.
895 </para></listitem>
896 </orderedlist>
897 </para>
898 </section>
899
900 <section id='neon-using-Linuxtools'>
901 <title>Using Linuxtools</title>
902
903 <para>
904 As mentioned earlier in the manual, performance tools exist
905 (Linuxtools) that enhance your development experience.
906 These tools are aids in developing and debugging applications and
907 images.
908 You can run these tools from within the Eclipse IDE through the
909 "Linuxtools" menu.
910 </para>
911
912 <para>
913 For information on how to configure and use these tools, see
914 <ulink url='http://www.eclipse.org/linuxtools/'>http://www.eclipse.org/linuxtools/</ulink>.
915 </para>
916 </section>
917</appendix>
918<!--
919vim: expandtab tw=80 ts=4
920-->