summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-linux-user-guide/doc/using_eclipse.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book-enea-linux-user-guide/doc/using_eclipse.xml')
-rw-r--r--doc/book-enea-linux-user-guide/doc/using_eclipse.xml114
1 files changed, 78 insertions, 36 deletions
diff --git a/doc/book-enea-linux-user-guide/doc/using_eclipse.xml b/doc/book-enea-linux-user-guide/doc/using_eclipse.xml
index 878b46b..f493d43 100644
--- a/doc/book-enea-linux-user-guide/doc/using_eclipse.xml
+++ b/doc/book-enea-linux-user-guide/doc/using_eclipse.xml
@@ -23,10 +23,17 @@
23 23
24 <listitem> 24 <listitem>
25 <para>In <emphasis role="bold">step 3</emphasis> from chapter 25 <para>In <emphasis role="bold">step 3</emphasis> from chapter
26 4.3.2.1.2. the correct option in the drop-down menu should look like: 26 4.3.2.1.2, the correct option in the drop-down menu should look like:
27 <emphasis>Oxygen - 27 <emphasis>Oxygen -
28 http://download.eclipse.org/releases/oxygen</emphasis>.</para> 28 http://download.eclipse.org/releases/oxygen</emphasis>.</para>
29 </listitem> 29 </listitem>
30
31 <listitem>
32 <para>In <emphasis role="bold">step 5</emphasis> from chapter
33 4.3.2.1.2, under the category <emphasis role="bold">Mobile and Device
34 Development</emphasis>, select <emphasis role="bold">C/C++ GDB
35 Hardware Debugging</emphasis> as well.</para>
36 </listitem>
30 </itemizedlist> 37 </itemizedlist>
31 </section> 38 </section>
32 39
@@ -36,21 +43,37 @@
36 <para>Retrieve the archive containing the Yocto Plug-ins from the Enea 43 <para>Retrieve the archive containing the Yocto Plug-ins from the Enea
37 Linux release location and save it on your local machine. The archive file 44 Linux release location and save it on your local machine. The archive file
38 has the following format: 45 has the following format:
39 <filename>org.yocto.sdk-&lt;release&gt;-&lt;date&gt;-archive.zip</filename>. 46 <filename>org.yocto.sdk-&lt;release&gt;-&lt;date&gt;-archive.zip</filename>.</para>
40 To install the Yocto Plugins in Eclipse, follow the instructions in <ulink 47
48 <para>To install the Yocto Plugins in Eclipse, follow the instructions in
49 <ulink
41 url="http://www.yoctoproject.org/docs/2.3.2/sdk-manual/sdk-manual.html#adt-eclipse">chapter 50 url="http://www.yoctoproject.org/docs/2.3.2/sdk-manual/sdk-manual.html#adt-eclipse">chapter
42 4.3.2.1.3.2</ulink>. of the Yocto Manual, starting with <emphasis 51 4.3.2.1.3.2</ulink>. of the Yocto Manual, starting with <emphasis
43 role="bold">step 8</emphasis>. In <emphasis role="bold">step 12</emphasis> 52 role="bold">step 8</emphasis>. In <emphasis role="bold">step 12</emphasis>
44 use the local archive that you downloaded previously.</para> 53 use the local archive that you downloaded previously.</para>
54
55 <para>To make sure that all required packages have been installed, go to
56 the menu <emphasis role="bold">Help &gt; Install New Software &gt; Eclipse
57 version</emphasis>, and select the version you use (e.g. Oxygen), to add
58 any missing packages. You can also check what packages are currently
59 installed by pressing the <emphasis role="bold">What is Already
60 Installed?</emphasis> link, as seen below.</para>
61
62 <mediaobject>
63 <imageobject>
64 <imagedata align="center" contentwidth="650"
65 fileref="images/install_new_sw.svg" />
66 </imageobject>
67 </mediaobject>
45 </section> 68 </section>
46 69
47 <section id="eclipse_remote_connection"> 70 <section id="eclipse_remote_connection">
48 <title>Setting up a TCF Connection from Eclipse</title> 71 <title>Setting up a TCF Connection from Eclipse</title>
49 72
50 <para>Eclipse supports several types of remote connections to reference 73 <para>Eclipse supports several types of remote connections to reference
51 boards, among these is the TCF type of connection. Throughout this guide, 74 boards. Among these is the Target Communication Framework (TCF) type of
52 this information will be referenced as it is used by several 75 connection. This information will be referenced throughout this guide, as
53 features.</para> 76 it is used by several features.</para>
54 77
55 <para><emphasis role="bold">How to set up a TCF connection to the target 78 <para><emphasis role="bold">How to set up a TCF connection to the target
56 to be used later on</emphasis><remark>Should we add images to this 79 to be used later on</emphasis><remark>Should we add images to this
@@ -61,7 +84,7 @@
61 <para>Make sure the <literal>tcf-agent</literal> is running on the 84 <para>Make sure the <literal>tcf-agent</literal> is running on the
62 target:</para> 85 target:</para>
63 86
64 <programlisting>aux | grep tcf-agent 87 <programlisting>ps aux | grep tcf-agent
65root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</programlisting> 88root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</programlisting>
66 </listitem> 89 </listitem>
67 90
@@ -437,6 +460,12 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
437 460
438 <itemizedlist> 461 <itemizedlist>
439 <listitem> 462 <listitem>
463 <para>Retrieve the debug sources from the target, and store them
464 in a dedicated folder on the local host. They are found in
465 <literal>/usr/src/debug</literal> in the target rootfs.</para>
466 </listitem>
467
468 <listitem>
440 <para>Set a path mapping your debug configuration. In the 469 <para>Set a path mapping your debug configuration. In the
441 <emphasis role="bold">Source</emphasis> tab, click <emphasis 470 <emphasis role="bold">Source</emphasis> tab, click <emphasis
442 role="bold">Add</emphasis>, select <emphasis role="bold">Path 471 role="bold">Add</emphasis>, select <emphasis role="bold">Path
@@ -447,10 +476,9 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
447 <filename>/usr/src/debug</filename></member> 476 <filename>/usr/src/debug</filename></member>
448 477
449 <member><emphasis role="bold">Local file system 478 <member><emphasis role="bold">Local file system
450 path</emphasis>: <filename>(&lt;path to build 479 path</emphasis> (path to the debug sources retrieved from the
451 directory&gt;/tmp/work/&lt;target&gt;-enea-linux/&lt;image 480 target):<filename>
452 name&gt;/&lt;version&gt;/rootfs/usr/src/debug)----------NEEDS 481 &lt;path_to_chosen_folder&gt;/usr/src/debug</filename></member>
453 TO BE CONFIRMED</filename></member>
454 </simplelist> 482 </simplelist>
455 </listitem> 483 </listitem>
456 484
@@ -579,11 +607,19 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
579 them. The current thread filter in Eclipse is ineffective.</para> 607 them. The current thread filter in Eclipse is ineffective.</para>
580 </note> 608 </note>
581 609
582 <para>Use the run/debug configuration to connect the Eclipse GDB client 610 <para><emphasis role="bold">Use the run/debug configuration to connect
583 to the remote target:</para> 611 the Eclipse GDB client to the remote target</emphasis>:</para>
584 612
585 <orderedlist> 613 <orderedlist>
586 <listitem> 614 <listitem>
615 <para>Go to <emphasis role="bold">Window &gt; Preferences &gt;
616 Run/Debug &gt; Launching &gt; Default Launchers</emphasis>. Under
617 <emphasis role="bold">C/C++ Attach to Applicaton &gt;
618 Debug</emphasis> select the checkbox <emphasis role="bold">GDB (DSF)
619 Attach to Process via TCF/TE Launcher</emphasis>.</para>
620 </listitem>
621
622 <listitem>
587 <para>Select <emphasis role="bold">Run &gt; Debug Configurations... 623 <para>Select <emphasis role="bold">Run &gt; Debug Configurations...
588 </emphasis> from the menu and choose the run/debug configuration 624 </emphasis> from the menu and choose the run/debug configuration
589 from the instances under <literal>C/C++ Attach to 625 from the instances under <literal>C/C++ Attach to
@@ -592,9 +628,15 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
592 </listitem> 628 </listitem>
593 629
594 <listitem> 630 <listitem>
595 <para>In the lower part of the dialog, make sure that <emphasis 631 <para>If you followed <emphasis role="bold">step 1</emphasis>, in
596 role="bold">Using GDB (DSF) Attach to Process Launcher</emphasis> is 632 the lower part of the dialog you will see that <emphasis
597 selected.</para> 633 role="bold">Using GDB (DSF) Attach to Process via TCF/TE
634 Launcher</emphasis> is selected. If not, redo <emphasis
635 role="bold">step 1</emphasis> or click the <emphasis
636 role="bold">Select Other...</emphasis> link, and use configuration
637 specific settings by selecting the checkbox <emphasis
638 role="bold">GDB (DSF) Attach to Process via TCF/TE
639 Launcher</emphasis>.</para>
598 </listitem> 640 </listitem>
599 641
600 <listitem> 642 <listitem>
@@ -679,7 +721,7 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
679 </section> 721 </section>
680 722
681 <section id="eclipse_postmortem"> 723 <section id="eclipse_postmortem">
682 <title>Using Postmortem Debugger</title> 724 <title>Using the Postmortem Debugger</title>
683 725
684 <para>When a program crashes<indexterm> 726 <para>When a program crashes<indexterm>
685 <primary>post-mortem debugging</primary> 727 <primary>post-mortem debugging</primary>
@@ -721,8 +763,9 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
721 763
722 <para>The next step is to specify the core pattern which defines the 764 <para>The next step is to specify the core pattern which defines the
723 core dump file pattern name. The core pattern is defined in the 765 core dump file pattern name. The core pattern is defined in the
724 <literal>/proc/sys/kernel/core_pattern</literal>. The format of a core 766 <literal>/proc/sys/kernel/core_pattern</literal>.</para>
725 pattern follows certain rules:</para> 767
768 <para>The format of a core pattern follows certain rules:</para>
726 769
727 <itemizedlist> 770 <itemizedlist>
728 <listitem> 771 <listitem>
@@ -774,15 +817,17 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
774 <literal>core_uses_pid</literal> is set, and no 817 <literal>core_uses_pid</literal> is set, and no
775 <literal>core_pattern</literal> is defined.</para> 818 <literal>core_pattern</literal> is defined.</para>
776 </listitem> 819 </listitem>
777
778 <listitem>
779 <para>To make the core dump file name permanent across a reboot,
780 configure this choice in <filename>/etc/sysctl.conf</filename>. An
781 example:
782 <literal>kernel.core_pattern=&lt;suitable_directory&gt;/core.%e.%p.%h.%t</literal></para>
783 </listitem>
784 </itemizedlist> 820 </itemizedlist>
785 821
822 <para>Specify a core pattern by writing it to
823 <literal>/proc/sys/kernel/core_pattern</literal>. For example:
824 <programlisting><literal>echo "&lt;suitable_directory&gt;/core.%e.%p.%h.%t" &gt; /proc/sys/kernel/core_pattern</literal></programlisting></para>
825
826 <para>To make the core dump file name permanent across a reboot,
827 configure <filename>/etc/sysctl.conf</filename>. to reflect this choice,
828 by adding a line like in the following example:
829 <literal>kernel.core_pattern=&lt;suitable_directory&gt;/core.%e.%p.%h.%t</literal>.</para>
830
786 <para>How to use the Eclipse post mortem debug configuration in order to 831 <para>How to use the Eclipse post mortem debug configuration in order to
787 view the call trace, for the core dump in the Eclipse GDB 832 view the call trace, for the core dump in the Eclipse GDB
788 interface:</para> 833 interface:</para>
@@ -851,11 +896,11 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
851 <para>In this section you learn to set up Eclipse for KGDB<indexterm> 896 <para>In this section you learn to set up Eclipse for KGDB<indexterm>
852 <primary>KGDB</primary> 897 <primary>KGDB</primary>
853 </indexterm> kernel debugging over the serial port, with examples for 898 </indexterm> kernel debugging over the serial port, with examples for
854 the <literal>p2020rdb</literal> target. This is only given as an example, 899 the <literal>raspberrypi3</literal> target. This is only given as an
855 your Enea Linux distribution may contain other targets. The corresponding 900 example, your Enea Linux distribution may contain other targets. The
856 instruction for debugging outside Eclipse is available in Debugging the 901 corresponding instruction for debugging outside Eclipse is available in
857 Linux Kernel (KGDB) from Command Line.<remark>LATER: Merge the two 902 Debugging the Linux Kernel (KGDB) from Command Line.<remark>LATER: Merge
858 instructions to shrink the amount of text; most of it is the 903 the two instructions to shrink the amount of text; most of it is the
859 same.</remark></para> 904 same.</remark></para>
860 905
861 <para>How to set up Eclipse for KGDB kernel debugging over a serial 906 <para>How to set up Eclipse for KGDB kernel debugging over a serial
@@ -883,11 +928,8 @@ root 329 0.0 0.2 1864824 2600 ? Ssl 12:47 0:08 /usr/sbin/tcf-agent -d -L- -l0</p
883 928
884 <para>If you are using the default kernel delivered with Enea Linux, 929 <para>If you are using the default kernel delivered with Enea Linux,
885 you can find it in the rootfs under the <literal>/boot</literal> 930 you can find it in the rootfs under the <literal>/boot</literal>
886 folder, or in the SDK under 931 folder. If you build your own kernel using bitbake, it should be
887 <filename>&lt;extsdkdir&gt;/tmp/sysroots/x86_64-linux/usr/bin/&lt;arch&gt;-enea-linux/&lt;arch&gt;-enea-linux-gdb-------------------------<remark>are 932 available in your build folder. Located in, for example:
888 there supposed to be so many hyphens in this arch
889 name?</remark></filename>. If you build your own kernel using bitbake,
890 it should be available in your build folder. For example, located in:
891 <filename><filename>tmp/work/raspberrypi3_64-enea-linux/linux-raspberrypi/1_4.9.59+gitAUTOINC+meta_machine-r0/image/boot/vmlinux-4.9.59</filename></filename></para> 933 <filename><filename>tmp/work/raspberrypi3_64-enea-linux/linux-raspberrypi/1_4.9.59+gitAUTOINC+meta_machine-r0/image/boot/vmlinux-4.9.59</filename></filename></para>
892 </listitem> 934 </listitem>
893 935