summaryrefslogtreecommitdiffstats
path: root/documentation/poky-ref-manual/development.xml
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2010-10-18 13:53:26 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-10-27 07:50:33 +0100
commit95a85f5688236dbe37ea7522e08d7718553c4378 (patch)
treee8d5fb0dd9ab3324aa382a090650afab3244279f /documentation/poky-ref-manual/development.xml
parent4999f788740b5cb2c4490c86e44ab5eac7b3dfe0 (diff)
downloadpoky-95a85f5688236dbe37ea7522e08d7718553c4378.tar.gz
Added the Anjuta Plug-in information
Added section 5.1.2.2 "The Anjuta Plug-in" into the Poky Reference Manual. This section consists of sub-sections 5.1.2.2.1 "Setting Up the Anjuta Plug-in", 5.1.2.2.2 "Configuring the Anjuta Plug-in", and 5.1.2.2.3 "Using the Anjuta Plug-in". This information was in the original Poky Handbook but had been removed by me since I thought it was not going to be supported for the 0.9 Yocto Release. It has now been restored with a note indicating that Anjuta will not be supported post 0.9 release. I did some general text editing in each section for readability. Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Diffstat (limited to 'documentation/poky-ref-manual/development.xml')
-rw-r--r--documentation/poky-ref-manual/development.xml204
1 files changed, 171 insertions, 33 deletions
diff --git a/documentation/poky-ref-manual/development.xml b/documentation/poky-ref-manual/development.xml
index 60fb984e44..0ae9e6f0fa 100644
--- a/documentation/poky-ref-manual/development.xml
+++ b/documentation/poky-ref-manual/development.xml
@@ -4,14 +4,14 @@
4<chapter id="platdev"> 4<chapter id="platdev">
5<title>Platform Development with Poky</title> 5<title>Platform Development with Poky</title>
6 6
7<section id="platdev-appdev"> 7 <section id="platdev-appdev">
8 <title>Software development</title> 8 <title>Software development</title>
9 <para> 9 <para>
10 Poky supports several methods of software development. You can use the method that is 10 Poky supports several methods of software development. You can use the method that is
11 best for you. This chapter describes each development method. 11 best for you. This chapter describes each development method.
12 </para> 12 </para>
13 13
14 <section id="platdev-appdev-external-sdk"> 14 <section id="platdev-appdev-external-sdk">
15 <title>External Development Using the Poky SDK</title> 15 <title>External Development Using the Poky SDK</title>
16 <para> 16 <para>
17 The meta-toolchain and meta-toolchain-sdk targets (<link linkend='ref-images'>see 17 The meta-toolchain and meta-toolchain-sdk targets (<link linkend='ref-images'>see
@@ -27,7 +27,6 @@
27 autotools are also set so that, for example, configure can find pre-generated test 27 autotools are also set so that, for example, configure can find pre-generated test
28 results for tests that need target hardware on which to run. 28 results for tests that need target hardware on which to run.
29 </para> 29 </para>
30
31 <para> 30 <para>
32 Using the toolchain with autotool-enabled packages is straightforward - just pass the 31 Using the toolchain with autotool-enabled packages is straightforward - just pass the
33 appropriate host option to configure as in the following example: 32 appropriate host option to configure as in the following example:
@@ -39,9 +38,9 @@
39 CC=arm-poky-linux-gnueabi-gcc and LD=arm-poky-linux-gnueabi-ld 38 CC=arm-poky-linux-gnueabi-gcc and LD=arm-poky-linux-gnueabi-ld
40 </literallayout> 39 </literallayout>
41 </para> 40 </para>
42 </section> 41 </section>
43 42
44 <section id="using-the-eclipse-and-anjuta-plug-ins"> 43 <section id="using-the-eclipse-and-anjuta-plug-ins">
45 <title>Using the Eclipse and Anjuta Plug-ins</title> 44 <title>Using the Eclipse and Anjuta Plug-ins</title>
46 <para> 45 <para>
47 Yocto Project supports both Anjuta and Eclipse IDE plug-ins to make developing software 46 Yocto Project supports both Anjuta and Eclipse IDE plug-ins to make developing software
@@ -54,7 +53,7 @@
54 power data, collection of latency data and collection of performance data. 53 power data, collection of latency data and collection of performance data.
55 </para> 54 </para>
56 55
57 <section id="the-eclipse-plug-in"> 56 <section id="the-eclipse-plug-in">
58 <title>The Eclipse Plug-in</title> 57 <title>The Eclipse Plug-in</title>
59 <para> 58 <para>
60 To use the Eclipse plug-in, a toolchain and SDK built by Poky is required along with 59 To use the Eclipse plug-in, a toolchain and SDK built by Poky is required along with
@@ -72,7 +71,7 @@
72 <ulink url="http://git.pokylinux.org/cgit.cgi/eclipse-poky"></ulink>. 71 <ulink url="http://git.pokylinux.org/cgit.cgi/eclipse-poky"></ulink>.
73 </para> 72 </para>
74 73
75 <section id="installing-and-setting-up-the-eclipse-ide"> 74 <section id="installing-and-setting-up-the-eclipse-ide">
76 <title>Installing and Setting up the Eclipse IDE</title> 75 <title>Installing and Setting up the Eclipse IDE</title>
77 <para> 76 <para>
78 If you don't have the Eclipse IDE (Helios 3.6) on your system you need to 77 If you don't have the Eclipse IDE (Helios 3.6) on your system you need to
@@ -127,9 +126,9 @@
127 RSE Main Features". Click "Next" and complete the update.</listitem> 126 RSE Main Features". Click "Next" and complete the update.</listitem>
128 </itemizedlist> 127 </itemizedlist>
129 </para> 128 </para>
130 </section> 129 </section>
131 130
132 <section id="installing-the-yocto-plug-in"> 131 <section id="installing-the-yocto-plug-in">
133 <title>Installing the Yocto Plug-in</title> 132 <title>Installing the Yocto Plug-in</title>
134 <para> 133 <para>
135 Once you have the Eclipse IDE installed and configure you need to install the 134 Once you have the Eclipse IDE installed and configure you need to install the
@@ -146,9 +145,9 @@
146 Eclipse plug-in.</listitem> 145 Eclipse plug-in.</listitem>
147 </itemizedlist> 146 </itemizedlist>
148 </para> 147 </para>
149 </section> 148 </section>
150 149
151 <section id="configuring-yocto-eclipse-plug-in"> 150 <section id="configuring-yocto-eclipse-plug-in">
152 <title>Configuring Yocto Eclipse plug-in</title> 151 <title>Configuring Yocto Eclipse plug-in</title>
153 <para> 152 <para>
154 To configure the Yocto Eclipse plug-in you need to select the mode and then the 153 To configure the Yocto Eclipse plug-in you need to select the mode and then the
@@ -175,9 +174,9 @@
175 Save all your settings and they become your defaults for every new Yocto project 174 Save all your settings and they become your defaults for every new Yocto project
176 created using the Eclipse IDE. 175 created using the Eclipse IDE.
177 </para> 176 </para>
178 </section> 177 </section>
179 178
180 <section id="using-the-yocto-eclipse-plug-in"> 179 <section id="using-the-yocto-eclipse-plug-in">
181 <title>Using the Yocto Eclipse Plug-in</title> 180 <title>Using the Yocto Eclipse Plug-in</title>
182 <para> 181 <para>
183 As an example, this section shows you how to cross-compile a Yocto C autotools 182 As an example, this section shows you how to cross-compile a Yocto C autotools
@@ -222,9 +221,9 @@
222 “Skip download to target path”. Finally, click "Debug” to start the remote 221 “Skip download to target path”. Finally, click "Debug” to start the remote
223 debugging session.</listitem> 222 debugging session.</listitem>
224 </orderedlist> 223 </orderedlist>
225 </section> 224 </section>
226 225
227 <section id="using-yocto-eclipse-plug-in-remote-tools-suite"> 226 <section id="using-yocto-eclipse-plug-in-remote-tools-suite">
228 <title>Using Yocto Eclipse plug-in Remote Tools Suite</title> 227 <title>Using Yocto Eclipse plug-in Remote Tools Suite</title>
229 <para> 228 <para>
230 Remote tools let you do things like perform system profiling, kernel tracing, 229 Remote tools let you do things like perform system profiling, kernel tracing,
@@ -278,20 +277,158 @@
278 entire screen to display results while they run.</listitem> 277 entire screen to display results while they run.</listitem>
279 </itemizedlist> 278 </itemizedlist>
280 </para> 279 </para>
280 </section>
281 </section> 281 </section>
282 </section>
283 282
284 <section id="external-development-using-the-anjuta-plug-in"> 283 <section id="the-anjuta-plug-in">
285 <title>External Development Using the Anjuta Plug-in</title> 284 <title>The Anjuta Plug-in</title>
286 <para> 285 <para>
287 (Note: We will stop Anjuta plug-in support after Yocto project 0.9 release. Its source 286 <emphasis>Note:</emphasis> We will stop Anjuta plug-in support after
287 Yocto project 0.9 release. Its source
288 code can be downloaded from git respository listed below, and free for the community to 288 code can be downloaded from git respository listed below, and free for the community to
289 continue supporting it moving forward.) 289 continue supporting it moving forward.
290 </para> 290 </para>
291 <para>
292 An Anjuta IDE plugin exists to make developing software within the Poky framework
293 easier for the application developer.
294 It presents a graphical IDE with which you can cross compile an application
295 then deploy and execute the output in a
296 QEMU emulation session.
297 It also supports cross debugging and profiling.
298 </para>
299 <para>
300 To use the plugin, a toolchain and SDK built by Poky is required,
301 Anjuta, it's development headers and the Anjuta plugin.
302 The Poky Anjuta plugin is available to download as a tarball at the
303 OpenedHand
304 labs <ulink url="http://labs.o-hand.com/anjuta-poky-sdk-plugin/"></ulink> page or
305 directly from the Poky Git repository located at
306 <ulink url="git://git.pokylinux.org/anjuta-poky"></ulink>.
307 You can also access a web interface to the repository at
308 <ulink url="http://git.pokylinux.org/?p=anjuta-poky.git;a=summary"></ulink>.
309 </para>
310 <para>
311 See the README file contained in the project for more information on
312 Anjuta dependencies and building the plugin.
313 If you want to disable remote gdb debugging,
314 please pass the <command>--diable-gdb-integration</command> switch when doing
315 configure.
316 </para>
317 <section id="setting-up-the-anjuta-plugin">
318 <title>Setting Up the Anjuta Plug-in</title>
319 <para>
320 Follow these steps to set up the plug-in:
321 <orderedlist>
322 <listitem>Extract the tarball for the toolchain into / as root.
323 The toolchain will be installed into <command>/opt/poky</command>.</listitem>
324 <listitem>To use the plug-in, first open or create an existing project.
325 If you are creating a new project, the "C GTK+"
326 project type will allow itself to be cross-compiled.
327 However you should be aware that this uses glade for the UI.</listitem>
328 <listitem>To activate the plug-in go to Edit -> Preferences, then choose
329 General from the left hand side.
330 Choose the Installed plug-ins tab, scroll down to Poky SDK and
331 check the box.</listitem>
332 </orderedlist>
333 The plug-in is now activated but not configured.
334 See the next section to learn how to configure it.
335 </para>
336 </section>
337 <section id="configuring-the-anjuta-plugin">
338 <title>Configuring the Anjuta Plugin</title>
339 <para>
340 You can find the configuration options for the SDK by choosing the Poky
341 SDK icon from the left hand side.
342 You need to set the following options:
343 <itemizedlist>
344 <listitem>SDK root: If you use an external toolchain you need to set
345 SDK root. This is the root directory of the
346 SDK's sysroot.
347 For an i586 SDK this will be <command>/opt/poky/</command>.
348 This directory will contain <command>bin</command>, <command>include
349 </command>, <command>var</command> and so forth under your
350 selected target architecture subdirectory
351 <command>/opt/poky/sysroot/i586-poky-linux/</command>.
352 The cross comple tools you need are in
353 <command>/opt/poky/sysroot/i586-pokysdk-linux/</command>.</listitem>
354 <listitem>Poky root: If you have a local poky build tree, you need to
355 set the Poky root.
356 This is the root directory of the poky build tree.
357 If you build your i586 target architecture under the subdirectory of
358 <command>build_x86</command> within your poky tree, the Poky root directory
359 should be <command>$&lt;poky_tree&gt;/build_x86/</command>.</listitem>
360 <listitem>Target Architecture: This is the cross compile triplet,
361 for example, "i586-poky-linux".
362 This target triplet is the prefix extracted from the set up script file
363 name.
364 For example, "i586-poky-linux" is extracted from the
365 set up script file
366 <command>/opt/poky/environment-setup-i586-poky-linux</command>.</listitem>
367 <listitem>Kernel: Use the file chooser to select the kernel to use
368 with QEMU.</listitem>
369 <listitem>Root filesystem: Use the file chooser to select the root
370 filesystem directory. This directory is where you use the
371 <command>poky-extract-sdk</command> to extract the poky-image-sdk
372 tarball.</listitem>
373 </itemizedlist>
374 </para>
375 </section>
376 <section id="using-the-anjuta-plug-in">
377 <title>Using the Anjuta Plug-in</title>
378 <para>
379 This section uses an example that cross-compiles a project, deploys it into
380 QEMU, runs a debugger against it and then does a system wide profile.
381 <orderedlist>
382 <listitem>Choose Build -> Run Configure or Build -> Run Autogenerate to run
383 "configure" or autogen, respectively for the project.
384 Either command passes command-line arguments to instruct the
385 cross-compile.</listitem>
386 <listitem>Select Build -> Build Project to build and compile the project.
387 If you have previously built the project in the same tree without using
388 the cross-compiler you might find that your project fails to link.
389 If this is the case, simply select Build -> Clean Project to remove the
390 old binaries.
391 After you clean the project you can then try building it again.</listitem>
392 <listitem>Start QEMU by selecting Tools -> Start QEMU. This menu selection
393 starts QEMU and will show any error messages in the message view.
394 Once Poky has fully booted within QEMU you can now deploy the project
395 into it.</listitem>
396 <listitem>Once the project is built and you have QEMU running choose
397 Tools -> Deploy.
398 This selection installs the package into a temporary
399 directory and then copies using rsync over SSH into the target.
400 Progress and messages appear in the message view.</listitem>
401 <listitem>To debug a program installed onto the target choose
402 Tools -> Debug remote.
403 This selection prompts you for the local binary to debug and also the
404 command line to run on the target.
405 The command line to run should include the full path to the to binary
406 installed in the target.
407 This will start a gdbserver over SSH on the target and also an instance
408 of a cross-gdb in a local terminal.
409 This will be preloaded to connect to the server and use the SDK root to
410 find symbols.
411 This gdb will connect to the target and load in various libraries and the
412 target program.
413 You should setup any breakpoints or watchpoints now since you might not
414 be able to interrupt the execution later.
415 You can stop the debugger on the target using Tools -> Stop debugger.</listitem>
416 <listitem>It is also possible to execute a command in the target over SSH,
417 the appropriate environment will be be set for the execution.
418 Choose Tools -> Run remote to do this.
419 This selection opens a terminal with the SSH command inside.</listitem>
420 <listitem>To do a system wide profile against the system running in QEMU choose
421 Tools -> Profile remote.
422 This selection starts up OProfileUI with the appropriate parameters to
423 connect to the server running inside QEMU and also supplies the path
424 to the debug information necessary to get a useful profile.</listitem>
425 </orderedlist>
426 </para>
427 </section>
428 </section>
291 </section> 429 </section>
292 </section>
293 430
294 <section id="platdev-appdev-qemu"> 431 <section id="platdev-appdev-qemu">
295 <title>Developing externally in QEMU</title> 432 <title>Developing externally in QEMU</title>
296 <para> 433 <para>
297 Running Poky QEMU images is covered in the <link 434 Running Poky QEMU images is covered in the <link
@@ -420,9 +557,9 @@ $ bitbake matchbox-desktop -c devshell
420 environmental variables such as CC to assist applications, such as make, 557 environmental variables such as CC to assist applications, such as make,
421 find the correct tools. 558 find the correct tools.
422 </para> 559 </para>
423 </section> 560 </section>
424 561
425 <section id="platdev-appdev-srcrev"> 562 <section id="platdev-appdev-srcrev">
426 <title>Developing within Poky with an external SCM based package</title> 563 <title>Developing within Poky with an external SCM based package</title>
427 564
428 <para> 565 <para>
@@ -441,8 +578,8 @@ $ bitbake matchbox-desktop -c devshell
441 is the name of the package for which you want to enable automatic source 578 is the name of the package for which you want to enable automatic source
442 revision updating. 579 revision updating.
443 </para> 580 </para>
581 </section>
444 </section> 582 </section>
445</section>
446 583
447<section id="platdev-gdb-remotedebug"> 584<section id="platdev-gdb-remotedebug">
448 <title>Debugging with GDB Remotely</title> 585 <title>Debugging with GDB Remotely</title>
@@ -530,8 +667,8 @@ $ bitbake matchbox-desktop -c devshell
530 A suitable gdb cross binary is required which runs on your host computer but 667 A suitable gdb cross binary is required which runs on your host computer but
531 knows about the the ABI of the remote target. This can be obtained from 668 knows about the the ABI of the remote target. This can be obtained from
532 the the Poky toolchain, e.g. 669 the the Poky toolchain, e.g.
533 <filename>/opt/poky/sysroots/x86_64-pokysdk-linux/usr/bin/armv5te-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb</filename> 670 <filename>/usr/local/poky/eabi-glibc/arm/bin/arm-poky-linux-gnueabi-gdb</filename>
534 which "x86_64" is the host architecture, "arm" is the target architecture and "linux-gnueabi" the target ABI. 671 which "arm" is the target architecture and "linux-gnueabi" the target ABI.
535 </para> 672 </para>
536 673
537 <para> 674 <para>
@@ -539,8 +676,7 @@ $ bitbake matchbox-desktop -c devshell
539 the gdb-cross package so for example you would run: 676 the gdb-cross package so for example you would run:
540 <programlisting>bitbake gdb-cross</programlisting> 677 <programlisting>bitbake gdb-cross</programlisting>
541 Once built, the cross gdb binary can be found at 678 Once built, the cross gdb binary can be found at
542 <programlisting>tmp/sysroots/&lt;host-arch&gt;/usr/bin/\ 679 <programlisting>tmp/sysroots/&lt;host-arch&lt;/usr/bin/&lt;target-abi&gt;-gdb </programlisting>
543&lt;target-arch&gt;-poky-&lt;target-abi&gt;/&lt;target-arch&gt;-poky-&lt;target-abi&gt;-gdb </programlisting>
544 </para> 680 </para>
545 681
546 </section> 682 </section>
@@ -577,17 +713,17 @@ $ bitbake matchbox-desktop -c devshell
577 by doing: 713 by doing:
578 </para> 714 </para>
579 <programlisting>tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \ 715 <programlisting>tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \
580tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/opkg.conf -o \ 716tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/temp/opkg.conf -o \
581tmp/rootfs/ update</programlisting> 717tmp/rootfs/ update</programlisting>
582 <para> 718 <para>
583 then, 719 then,
584 </para> 720 </para>
585 <programlisting>tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \ 721 <programlisting>tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \
586tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/opkg.conf \ 722tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/temp/opkg.conf \
587-o tmp/rootfs install foo 723-o tmp/rootfs install foo
588 724
589tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \ 725tmp/sysroots/i686-linux/usr/bin/opkg-cl -f \
590tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/opkg.conf \ 726tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/temp/opkg.conf \
591-o tmp/rootfs install foo-dbg</programlisting> 727-o tmp/rootfs install foo-dbg</programlisting>
592 <para> 728 <para>
593 which installs the debugging information too. 729 which installs the debugging information too.
@@ -600,7 +736,7 @@ tmp/work/&lt;target-abi&gt;/poky-image-sato-1.0-r0/opkg.conf \
600 <para> 736 <para>
601 To launch the host GDB, run the cross gdb binary identified above with 737 To launch the host GDB, run the cross gdb binary identified above with
602 the inferior binary specified on the commandline: 738 the inferior binary specified on the commandline:
603 <programlisting>&lt;target-arch&gt;-poky-&lt;target-abi&gt;-gdb rootfs/usr/bin/foo</programlisting> 739 <programlisting>&lt;target-abi&gt;-gdb rootfs/usr/bin/foo</programlisting>
604 This loads the binary of program <emphasis>foo</emphasis> 740 This loads the binary of program <emphasis>foo</emphasis>
605 as well as its debugging information. Once the gdb prompt 741 as well as its debugging information. Once the gdb prompt
606 appears, you must instruct GDB to load all the libraries 742 appears, you must instruct GDB to load all the libraries
@@ -891,6 +1027,8 @@ $ opreport -cl
891 </section> 1027 </section>
892</section> 1028</section>
893 1029
1030
1031
894</chapter> 1032</chapter>
895<!-- 1033<!--
896vim: expandtab tw=80 ts=4 1034vim: expandtab tw=80 ts=4