diff options
-rw-r--r-- | documentation/adt-manual/adt-eclipse.xml | 419 |
1 files changed, 222 insertions, 197 deletions
diff --git a/documentation/adt-manual/adt-eclipse.xml b/documentation/adt-manual/adt-eclipse.xml index cb46598910..dee8e1fb1a 100644 --- a/documentation/adt-manual/adt-eclipse.xml +++ b/documentation/adt-manual/adt-eclipse.xml | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | <chapter id='adt-eclipse'> | 4 | <chapter id='adt-eclipse'> |
5 | <title>Working Within Eclipse</title> | 5 | <title>Working Within Eclipse</title> |
6 | |||
6 | <para> | 7 | <para> |
7 | The Eclipse IDE is a popular development environment and it fully supports | 8 | The Eclipse IDE is a popular development environment and it fully supports |
8 | development using Yocto Project. | 9 | development using Yocto Project. |
@@ -10,10 +11,10 @@ | |||
10 | the Eclipse IDE, you maximize your Yocto Project design experience. | 11 | the Eclipse IDE, you maximize your Yocto Project design experience. |
11 | Installing and configuring the Plug-in results in an environment that | 12 | Installing and configuring the Plug-in results in an environment that |
12 | has extensions specifically designed to let you more easily develop software. | 13 | has extensions specifically designed to let you more easily develop software. |
13 | These extensions allow for cross-compilation and deployment and execution of | 14 | These extensions allow for cross-compilation, deployment, and execution of |
14 | your output into a QEMU emulation session. | 15 | your output into a QEMU emulation session. |
15 | You can also perform cross-debugging and profiling. | 16 | You can also perform cross-debugging and profiling. |
16 | The environment also has a suite of tools that allows you to perform | 17 | The environment also supports a suite of tools that allows you to perform |
17 | remote profiling, tracing, collection of power data, collection of | 18 | remote profiling, tracing, collection of power data, collection of |
18 | latency data, and collection of performance data. | 19 | latency data, and collection of performance data. |
19 | </para> | 20 | </para> |
@@ -24,19 +25,21 @@ | |||
24 | 25 | ||
25 | <section id='setting-up-the-eclipse-ide'> | 26 | <section id='setting-up-the-eclipse-ide'> |
26 | <title>Setting Up the Eclipse IDE</title> | 27 | <title>Setting Up the Eclipse IDE</title> |
28 | |||
27 | <para> | 29 | <para> |
28 | To develop within the Eclipse IDE you need to do the following: | 30 | To develop within the Eclipse IDE, you need to do the following: |
29 | <orderedlist> | 31 | <orderedlist> |
30 | <listitem><para>Be sure the optimal version of Eclipse IDE | 32 | <listitem><para>Be sure the optimal version of Eclipse IDE |
31 | is installed.</para></listitem> | 33 | is installed.</para></listitem> |
32 | <listitem><para>Install Eclipse plug-in requirements prior to installing | 34 | <listitem><para>Install the Eclipse Plug-in requirements prior to installing |
33 | the Eclipse Yocto Plug-in.</para></listitem> | 35 | the Eclipse Yocto Plug-in.</para></listitem> |
34 | <listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem> | 36 | <listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem> |
35 | </orderedlist> | 37 | </orderedlist> |
36 | </para> | 38 | </para> |
37 | 39 | ||
38 | <section id='installing-eclipse-ide'> | 40 | <section id='installing-eclipse-ide'> |
39 | <title>Installing Eclipse IDE</title> | 41 | <title>Installing Eclipse IDE</title> |
42 | |||
40 | <para> | 43 | <para> |
41 | It is recommended that you have the Indigo 3.7 version of the | 44 | It is recommended that you have the Indigo 3.7 version of the |
42 | Eclipse IDE installed on your development system. | 45 | Eclipse IDE installed on your development system. |
@@ -46,29 +49,32 @@ | |||
46 | This version contains the Eclipse Platform, the Java Development | 49 | This version contains the Eclipse Platform, the Java Development |
47 | Tools (JDT), and the Plug-in Development Environment. | 50 | Tools (JDT), and the Plug-in Development Environment. |
48 | </para> | 51 | </para> |
52 | |||
49 | <para> | 53 | <para> |
50 | Once you have downloaded the tarball, extract it into a clean | 54 | Once you have downloaded the tarball, extract it into a clean |
51 | directory and complete the installation. | 55 | directory and complete the installation. |
52 | </para> | 56 | </para> |
57 | |||
53 | <para> | 58 | <para> |
54 | One issue exists that you need to be aware of regarding the Java | 59 | One issue exists that you need to be aware of regarding the Java |
55 | Virtual machine’s garbage collection (GC) process. | 60 | Virtual machine’s garbage collection (GC) process. |
56 | The GC process does not clean up the permanent generation | 61 | The GC process does not clean up the permanent generation |
57 | space (PermGen). | 62 | space (PermGen). |
58 | This space stores meta-data descriptions of classes. | 63 | This space stores metadata descriptions of classes. |
59 | The default value is set too small and it could trigger an | 64 | The default value is set too small and it could trigger an |
60 | out-of-memory error such as the following: | 65 | out-of-memory error such as the following: |
61 | <literallayout class='monospaced'> | 66 | <literallayout class='monospaced'> |
62 | Java.lang.OutOfMemoryError: PermGen space | 67 | Java.lang.OutOfMemoryError: PermGen space |
63 | </literallayout> | 68 | </literallayout> |
64 | </para> | 69 | </para> |
70 | |||
65 | <para> | 71 | <para> |
66 | This error causes the application to hang. | 72 | This error causes the application to hang. |
67 | </para> | 73 | </para> |
74 | |||
68 | <para> | 75 | <para> |
69 | To fix this issue, you can use the <filename>--vmargs</filename> | 76 | To fix this issue, you can use the <filename>--vmargs</filename> |
70 | option when you start | 77 | option when you start Eclipse to increase the size of the permanent generation space: |
71 | Eclipse to increase the size of the permanent generation space: | ||
72 | <literallayout class='monospaced'> | 78 | <literallayout class='monospaced'> |
73 | eclipse --vmargs --XX:PermSize=256M | 79 | eclipse --vmargs --XX:PermSize=256M |
74 | </literallayout> | 80 | </literallayout> |
@@ -77,118 +83,125 @@ | |||
77 | 83 | ||
78 | <section id='installing-required-plug-ins-and-the-eclipse-yocto-plug-in'> | 84 | <section id='installing-required-plug-ins-and-the-eclipse-yocto-plug-in'> |
79 | <title>Installing Required Plug-ins and the Eclipse Yocto Plug-in</title> | 85 | <title>Installing Required Plug-ins and the Eclipse Yocto Plug-in</title> |
86 | |||
80 | <para> | 87 | <para> |
81 | Before installing the Yocto Plug-in, you need to be sure that the | 88 | Before installing the Yocto Plug-in, you need to be sure that the |
82 | <filename>CDT 8.0</filename>, <filename>RSE 3.2</filename>, and | 89 | <filename>CDT 8.0</filename>, <filename>RSE 3.2</filename>, and |
83 | <filename>Autotools</filename> plug-ins are all installed in the | 90 | <filename>Autotools</filename> plug-ins are all installed in the |
84 | following order. | 91 | following order. |
85 | After installing these three plug-ins, you can install the | 92 | After installing these three plug-ins, you can install the Eclipse Yocto Plug-in. |
86 | <filename>Eclipse Yocto</filename> plug-in. | ||
87 | Use the following URLs for the plug-ins: | 93 | Use the following URLs for the plug-ins: |
88 | <orderedlist> | 94 | <orderedlist> |
89 | <listitem><para><emphasis>CDT 8.0</emphasis> – | 95 | <listitem><para><emphasis> |
90 | <ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'></ulink>: | 96 | <ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'>CDT 8.0:</ulink> |
91 | For <filename>CDT main features</filename>, select the checkbox so you get all items. | 97 | </emphasis> For <filename>CDT main features</filename>, select the |
92 | For <filename>CDT optional features</filename> expand the selections and check | 98 | checkbox so you get all items. |
93 | <filename>C/C++ Remote Launch</filename>.</para></listitem> | 99 | For <filename>CDT optional features</filename> expand the selections and check |
94 | <listitem><para><emphasis>RSE 3.2</emphasis> – | 100 | <filename>C/C++ Remote Launch</filename>.</para></listitem> |
95 | <ulink url='http://download.eclipse.org/tm/updates/3.2'></ulink>: | 101 | <listitem><para><emphasis> |
96 | Check the box next to <filename>TM and RSE Main Features</filename> so you select all | 102 | <ulink url='http://download.eclipse.org/tm/updates/3.2'>RSE 3.2:</ulink></emphasis> |
97 | those items. | 103 | Check the box next to <filename>TM and RSE Main Features</filename> so you select all |
98 | Note that all items in the main features depend on 3.2.1 version. | 104 | those items. |
99 | Expand the items under <filename>TM and RSE Uncategorized 3.2.1</filename> and | 105 | Note that all items in the main features depend on 3.2.1 version. |
100 | select the following: <filename>Remote System Explorer End-User Runtime</filename>, | 106 | Expand the items under <filename>TM and RSE Uncategorized 3.2.1</filename> and |
101 | <filename>Remote System Explorer Extended SDK</filename>, | 107 | select the following: <filename>Remote System Explorer End-User Runtime</filename>, |
102 | <filename>Remote System Explorer User Actions</filename>, | 108 | <filename>Remote System Explorer Extended SDK</filename>, |
103 | <filename>RSE Core</filename>, <filename>RSE Terminals UI</filename>, | 109 | <filename>Remote System Explorer User Actions</filename>, |
104 | and <filename>Target Management Terminal</filename>.</para></listitem> | 110 | <filename>RSE Core</filename>, <filename>RSE Terminals UI</filename>, |
105 | <listitem><para><emphasis>Autotools</emphasis> – | 111 | and <filename>Target Management Terminal</filename>.</para></listitem> |
106 | <ulink url='http://download.eclipse.org/technology/linuxtools/update/'></ulink>: | 112 | <listitem><para><emphasis> |
107 | Expand the items under “Linux Tools” and select “Autotools support for | 113 | <ulink url='http://download.eclipse.org/technology/linuxtools/update/'>Autotools:</ulink> |
108 | CDT (Incubation)”.</para></listitem> | 114 | </emphasis> Expand the items under “Linux Tools” and select “Autotools support for |
109 | <listitem><para><emphasis>Yocto Plug-in</emphasis> – | 115 | CDT (Incubation)”.</para></listitem> |
110 | <ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.0'></ulink>: | 116 | <listitem><para><emphasis> |
111 | Check the box next to <filename>Development tools & SDKs for Yocto Linux</filename> | 117 | <ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.1'>Yocto Plug-in: |
112 | to select all the items.</para></listitem> | 118 | </ulink></emphasis> Check the box next to |
119 | <filename>Development tools & SDKs for Yocto Linux</filename> | ||
120 | to select all the items.</para></listitem> | ||
113 | </orderedlist> | 121 | </orderedlist> |
114 | </para> | 122 | </para> |
123 | |||
115 | <para> | 124 | <para> |
116 | Follow these general steps to install a plug-in: | 125 | Follow these general steps to install an Eclipse plug-in: |
117 | <orderedlist> | 126 | <orderedlist> |
118 | <listitem><para>From within the Eclipse IDE select the | 127 | <listitem><para>From within the Eclipse IDE, select the |
119 | <filename>Install New Software</filename> item from the <filename>Help</filename> | 128 | <filename>Install New Software</filename> item from the <filename>Help</filename> |
120 | menu.</para></listitem> | 129 | menu.</para></listitem> |
121 | <listitem><para>Click <filename>Add…</filename> in the | 130 | <listitem><para>Click <filename>Add…</filename> in the |
122 | <filename>Work with:</filename> area.</para></listitem> | 131 | <filename>Work with:</filename> area.</para></listitem> |
123 | <listitem><para>Enter the URL for the repository and leave the <filename>Name</filename> | 132 | <listitem><para>Enter the URL for the repository and leave the <filename>Name</filename> |
124 | field blank.</para></listitem> | 133 | field blank.</para></listitem> |
125 | <listitem><para>Check the boxes next to the software you need to | 134 | <listitem><para>Check the boxes next to the software you need to |
126 | install and then complete the installation. | 135 | install and then complete the installation. |
127 | For information on the specific software packages you need to include, | 136 | For information on the specific software packages you need to include, |
128 | see the previous list.</para></listitem> | 137 | see the previous list.</para></listitem> |
129 | </orderedlist> | 138 | </orderedlist> |
130 | </para> | 139 | </para> |
131 | </section> | 140 | </section> |
132 | 141 | ||
133 | <section id='configuring-the-plug-in'> | 142 | <section id='configuring-the-plug-in'> |
134 | <title>Configuring the Plug-in</title> | 143 | <title>Configuring the Plug-in</title> |
144 | |||
135 | <para> | 145 | <para> |
136 | Configuring the Eclipse Yocto Plug-in involves choosing the Cross | 146 | Configuring the Eclipse Yocto Plug-in involves choosing the Cross |
137 | Compiler Options, selecting the Target Architecture, and choosing | 147 | Compiler Options, selecting the Target Architecture, and choosing |
138 | the Target Options. | 148 | the Target Options. |
139 | These settings are the default settings for all projects. | 149 | The settings you choose become the default settings for all projects. |
140 | You do have opportunities to change them later if you choose to when | 150 | You do have opportunities to change them later when |
141 | you configure the project (see the following section). | 151 | you configure the project (see the following section). |
142 | </para> | 152 | </para> |
153 | |||
143 | <para> | 154 | <para> |
144 | To start, you need to do the following from within the Eclipse IDE: | 155 | To start, you need to do the following from within the Eclipse IDE: |
145 | <itemizedlist> | 156 | <itemizedlist> |
146 | <listitem><para>Choose <filename>Windows -> Preferences</filename> to display | 157 | <listitem><para>Choose <filename>Windows -> Preferences</filename> to display |
147 | the Preferences Dialog</para></listitem> | 158 | the Preferences Dialog</para></listitem> |
148 | <listitem><para>Click <filename>Yocto SDK</filename></para></listitem> | 159 | <listitem><para>Click <filename>Yocto SDK</filename></para></listitem> |
149 | </itemizedlist> | 160 | </itemizedlist> |
150 | </para> | 161 | </para> |
151 | 162 | ||
152 | <section id='configuring-the-cross-compiler-options'> | 163 | <section id='configuring-the-cross-compiler-options'> |
153 | <title>Configuring the Cross-Compiler Options</title> | 164 | <title>Configuring the Cross-Compiler Options</title> |
165 | |||
154 | <para> | 166 | <para> |
155 | Choose between <filename>Stand-alone Prebuilt Toolchain</filename> | 167 | Choose between <filename>Stand-alone Prebuilt Toolchain</filename> |
156 | and <filename>Build System Derived Toolchain</filename> for Cross | 168 | and <filename>Build System Derived Toolchain</filename> for Cross |
157 | Compiler Options. | 169 | Compiler Options. |
158 | <itemizedlist> | 170 | <itemizedlist> |
159 | <listitem><para><emphasis><filename>Stand-alone Prebuilt Toolchain</filename></emphasis> – | 171 | <listitem><para><emphasis><filename>Stand-alone Prebuilt Toolchain:</filename></emphasis> |
160 | Select this mode | 172 | Select this mode |
161 | when you are not concerned with building a target image or you do not have | 173 | when you are not concerned with building a target image or you do not have |
162 | a Yocto Project build tree on your development system. | 174 | a Yocto Project build tree on your development system. |
163 | For example, suppose you are an application developer and do not | 175 | For example, suppose you are an application developer and do not |
164 | need to build a target image. | 176 | need to build a target image. |
165 | Instead, you just want to use an architecture-specific toolchain on an | 177 | Instead, you just want to use an architecture-specific toolchain on an |
166 | existing kernel and target root filesystem. | 178 | existing kernel and target root filesystem. |
167 | When you use <filename>Stand-alone Prebuilt Toolchain</filename> | 179 | When you use <filename>Stand-alone Prebuilt Toolchain</filename>, |
168 | you are using the toolchain installed | 180 | you are using the toolchain installed |
169 | in the <filename>/opt/poky</filename> directory.</para></listitem> | 181 | in the <filename>/opt/poky</filename> directory.</para></listitem> |
170 | <listitem><para><emphasis><filename>Build System Derived Toolchain</filename></emphasis> – | 182 | <listitem><para><emphasis><filename>Build System Derived Toolchain:</filename></emphasis> |
171 | Select this mode | 183 | Select this mode |
172 | if you are building images for target hardware or your | 184 | if you are building images for target hardware or your |
173 | development environment already has a Yocto Project build tree. | 185 | development environment already has a Yocto Project build tree. |
174 | In this case, you likely already have a Yocto Project build tree on | 186 | In this case, you likely already have a Yocto Project build tree on |
175 | your system or you (or someone else) will be building one. | 187 | your system or you (or someone else) will be building one. |
176 | When you select <filename>Build System Derived Toolchain</filename> | 188 | When you select <filename>Build System Derived Toolchain</filename>, |
177 | you are using the toolchain bundled | 189 | you are using the toolchain bundled |
178 | inside the Yocto Project build tree. | 190 | inside the Yocto Project build tree. |
179 | If you use this mode, you must also supply the Yocto Project build directory | 191 | If you use this mode, you must also supply the Yocto Project build directory |
180 | in the <filename>Preferences Dialog</filename>.</para></listitem> | 192 | in the <filename>Preferences Dialog</filename>.</para></listitem> |
181 | </itemizedlist> | 193 | </itemizedlist> |
182 | </para> | 194 | </para> |
183 | </section> | 195 | </section> |
184 | 196 | ||
185 | <section id='configuring-the-sysroot'> | 197 | <section id='configuring-the-sysroot'> |
186 | <title>Configuring the Sysroot</title> | 198 | <title>Configuring the Sysroot</title> |
199 | |||
187 | <para> | 200 | <para> |
188 | Specify the sysroot location, which is where the root filesystem for the | 201 | Specify the sysroot location, which is where the root filesystem for the |
189 | target hardware is created on the development system by the ADT Installer. | 202 | target hardware is created on the development system by the ADT Installer. |
190 | The QEMU user-space tools, the | 203 | The QEMU user-space tools, the |
191 | NFS boot process and the cross-toolchain all use the sysroot location | 204 | NFS boot process, and the cross-toolchain all use the sysroot location |
192 | regardless of whether you select | 205 | regardless of whether you select |
193 | (<filename>Stand-alone Prebuilt Toolchain</filename> or | 206 | (<filename>Stand-alone Prebuilt Toolchain</filename> or |
194 | <filename>Build System Derived Toolchain</filename>). | 207 | <filename>Build System Derived Toolchain</filename>). |
@@ -197,59 +210,60 @@ | |||
197 | 210 | ||
198 | <section id='selecting-the-target-architecture'> | 211 | <section id='selecting-the-target-architecture'> |
199 | <title>Selecting the Target Architecture</title> | 212 | <title>Selecting the Target Architecture</title> |
213 | |||
200 | <para> | 214 | <para> |
201 | Use the pull-down <filename>Target Architecture</filename> menu and select the | 215 | Use the pull-down <filename>Target Architecture</filename> menu and select the |
202 | target architecture. | 216 | target architecture. |
203 | </para> | 217 | </para> |
218 | |||
204 | <para> | 219 | <para> |
205 | The target architecture is the type of hardware you are | 220 | The target architecture is the type of hardware you are |
206 | going to use or emulate. | 221 | going to use or emulate. |
207 | This pull-down menu should have the supported architectures. | 222 | This pull-down menu should have the supported architectures. |
208 | If the architecture you need is not listed in the menu then you | 223 | If the architecture you need is not listed in the menu, you |
209 | will need to re-visit | 224 | will need to re-visit the section "<link linkend='adt-prepare'>Preparing to Use |
210 | <xref linkend='adt-prepare'> | 225 | the Application Development Toolkit (ADT)</link>" earlier in this document. |
211 | Preparing to Use the Application Development Toolkit (ADT)</xref> | ||
212 | section earlier in this document. | ||
213 | </para> | 226 | </para> |
214 | </section> | 227 | </section> |
215 | 228 | ||
216 | <section id='choosing-the-target-options'> | 229 | <section id='choosing-the-target-options'> |
217 | <title>Choosing the Target Options</title> | 230 | <title>Choosing the Target Options</title> |
231 | |||
218 | <para> | 232 | <para> |
219 | You can choose to emulate hardware using the QEMU emulator, or you | 233 | You can choose to emulate hardware using the QEMU emulator, or you |
220 | can choose to use actual hardware. | 234 | can choose to use actual hardware. |
221 | <itemizedlist> | 235 | <itemizedlist> |
222 | <listitem><para><emphasis><filename>External HW</filename></emphasis> – Select this option | 236 | <listitem><para><emphasis><filename>External HW:</filename></emphasis> Select this option |
223 | if you will be using actual hardware.</para></listitem> | 237 | if you will be using actual hardware.</para></listitem> |
224 | <listitem><para><emphasis><filename>QEMU</filename></emphasis> – Select this option if | 238 | <listitem><para><emphasis><filename>QEMU:</filename></emphasis> Select this option if |
225 | you will be using the QEMU emulator. | 239 | you will be using the QEMU emulator. |
226 | If you are using the emulator, you also need to locate the kernel | 240 | If you are using the emulator, you also need to locate the kernel |
227 | and specify any custom options.</para> | 241 | and specify any custom options.</para> |
228 | <para>If you select <filename>Build System Derived Toolchain</filename>, | 242 | <para>If you select <filename>Build System Derived Toolchain</filename>, |
229 | the target kernel you built will be located in the | 243 | the target kernel you built will be located in the |
230 | Yocto Project build tree in <filename>tmp/deploy/images</filename> directory. | 244 | Yocto Project build tree in <filename>tmp/deploy/images</filename> directory. |
231 | If you select <filename>Stand-alone Prebuilt Toolchain</filename>, the | 245 | If you select <filename>Stand-alone Prebuilt Toolchain</filename>, the |
232 | pre-built kernel you downloaded is located | 246 | pre-built kernel you downloaded is located |
233 | in the directory you specified when you downloaded the image.</para> | 247 | in the directory you specified when you downloaded the image.</para> |
234 | <para>Most custom options are for advanced QEMU users to further | 248 | <para>Most custom options are for advanced QEMU users to further |
235 | customize their QEMU instance. | 249 | customize their QEMU instance. |
236 | These options are specified between paired angled brackets. | 250 | These options are specified between paired angled brackets. |
237 | Some options must be specified outside the brackets. | 251 | Some options must be specified outside the brackets. |
238 | In particular, the options <filename>serial</filename>, | 252 | In particular, the options <filename>serial</filename>, |
239 | <filename>nographic</filename>, and <filename>kvm</filename> must all | 253 | <filename>nographic</filename>, and <filename>kvm</filename> must all |
240 | be outside the brackets. | 254 | be outside the brackets. |
241 | Use the <filename>man qemu</filename> command to get help on all the options | 255 | Use the <filename>man qemu</filename> command to get help on all the options |
242 | and their use. | 256 | and their use. |
243 | The following is an example: | 257 | The following is an example: |
244 | <literallayout class='monospaced'> | 258 | <literallayout class='monospaced'> |
245 | serial ‘<-m 256 -full-screen>’ | 259 | serial ‘<-m 256 -full-screen>’ |
246 | </literallayout> | 260 | </literallayout></para> |
247 | </para> | 261 | <para> |
248 | <para> | 262 | Regardless of the mode, Sysroot is already defined in the “Sysroot” |
249 | Regardless of the mode, Sysroot is already defined in the “Sysroot” | 263 | field.</para></listitem> |
250 | field.</para></listitem> | ||
251 | </itemizedlist> | 264 | </itemizedlist> |
252 | </para> | 265 | </para> |
266 | |||
253 | <para> | 267 | <para> |
254 | Click the <filename>OK</filename> button to save your plug-in configurations. | 268 | Click the <filename>OK</filename> button to save your plug-in configurations. |
255 | </para> | 269 | </para> |
@@ -259,14 +273,15 @@ | |||
259 | 273 | ||
260 | <section id='creating-the-project'> | 274 | <section id='creating-the-project'> |
261 | <title>Creating the Project</title> | 275 | <title>Creating the Project</title> |
276 | |||
262 | <para> | 277 | <para> |
263 | You can create two types of projects: Autotools-based, or Makefile-based. | 278 | You can create two types of projects: Autotools-based, or Makefile-based. |
264 | This section describes how to create autotools-based projects from within | 279 | This section describes how to create autotools-based projects from within |
265 | the Eclipse IDE. | 280 | the Eclipse IDE. |
266 | For information on creating projects in a terminal window see | 281 | For information on creating Makefile-based projects in a terminal window see the section |
267 | <xref linkend='using-the-command-line'>Using the Command Line</xref> | 282 | "<link linkend='using-the-command-line'>Using the Command Line</link>". |
268 | section. | ||
269 | </para> | 283 | </para> |
284 | |||
270 | <para> | 285 | <para> |
271 | To create a project based on a Yocto template and then display the source code, | 286 | To create a project based on a Yocto template and then display the source code, |
272 | follow these steps: | 287 | follow these steps: |
@@ -276,54 +291,56 @@ | |||
276 | <listitem><para>Double click <filename>C Project</filename> to create the project.</para></listitem> | 291 | <listitem><para>Double click <filename>C Project</filename> to create the project.</para></listitem> |
277 | <listitem><para>Double click <filename>Yocto SDK Project</filename>.</para></listitem> | 292 | <listitem><para>Double click <filename>Yocto SDK Project</filename>.</para></listitem> |
278 | <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>. | 293 | <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>. |
279 | This is an Autotools-based project based on a Yocto Project template.</para></listitem> | 294 | This is an Autotools-based project based on a Yocto Project template.</para></listitem> |
280 | <listitem><para>Put a name in the <filename>Project name:</filename> field.</para></listitem> | 295 | <listitem><para>Put a name in the <filename>Project name:</filename> field.</para></listitem> |
281 | <listitem><para>Click <filename>Next</filename>.</para></listitem> | 296 | <listitem><para>Click <filename>Next</filename>.</para></listitem> |
282 | <listitem><para>Add information in the <filename>Author</filename> field.</para></listitem> | 297 | <listitem><para>Add information in the <filename>Author</filename> field.</para></listitem> |
283 | <listitem><para>Use <filename>GNU General Public License v2.0</filename> | 298 | <listitem><para>Use <filename>GNU General Public License v2.0</filename> |
284 | for the License.</para></listitem> | 299 | for the License.</para></listitem> |
285 | <listitem><para>Click <filename>Finish</filename>.</para></listitem> | 300 | <listitem><para>Click <filename>Finish</filename>.</para></listitem> |
286 | <listitem><para>Answer <filename>Yes</filename> to the open perspective prompt.</para></listitem> | 301 | <listitem><para>Answer <filename>Yes</filename> to the open perspective prompt.</para></listitem> |
287 | <listitem><para>In the Project Explorer expand your project.</para></listitem> | 302 | <listitem><para>In the Project Explorer expand your project.</para></listitem> |
288 | <listitem><para>Expand <filename>src</filename>.</para></listitem> | 303 | <listitem><para>Expand <filename>src</filename>.</para></listitem> |
289 | <listitem><para>Double click on your source file and the code appears | 304 | <listitem><para>Double click on your source file and the code appears |
290 | in the window. | 305 | in the window. |
291 | This is the template.</para></listitem> | 306 | This is the template.</para></listitem> |
292 | </orderedlist> | 307 | </orderedlist> |
293 | </para> | 308 | </para> |
294 | </section> | 309 | </section> |
295 | 310 | ||
296 | <section id='configuring-the-cross-toolchains'> | 311 | <section id='configuring-the-cross-toolchains'> |
297 | <title>Configuring the Cross-Toolchains</title> | 312 | <title>Configuring the Cross-Toolchains</title> |
313 | |||
298 | <para> | 314 | <para> |
299 | The previous section, <xref linkend='configuring-the-cross-compiler-options'> | 315 | The previous section, "<link linkend='configuring-the-cross-compiler-options'> |
300 | Configuring the Cross-Compiler Options</xref>, set up the default project | 316 | Configuring the Cross-Compiler Options</link>", set up the default project |
301 | configurations. | 317 | configurations. |
302 | You can change these settings for a given project by following these steps: | 318 | You can change these settings for a given project by following these steps: |
303 | <orderedlist> | 319 | <orderedlist> |
304 | <listitem><para>Select <filename>Project -> Invoke Yocto Tools -> Reconfigure Yocto</filename> - | 320 | <listitem><para>Select <filename>Project -> Invoke Yocto Tools -> Reconfigure Yocto</filename>: |
305 | This selection brings up the project's <filename>Yocto Settings</filename> Dialog. | 321 | This selection brings up the project's <filename>Yocto Settings</filename> Dialog. |
306 | Settings are inherited from the default project configuration. | 322 | Settings are inherited from the default project configuration. |
307 | The information in this dialog is identical to that chosen earlier | 323 | The information in this dialog is identical to that chosen earlier |
308 | for the <filename>Cross Compiler Option</filename> | 324 | for the <filename>Cross Compiler Option</filename> |
309 | (<filename>Stand-alone Prebuilt Toolchain</filename> or | 325 | (<filename>Stand-alone Prebuilt Toolchain</filename> or |
310 | <filename>Build System Derived Toolchain</filename>), | 326 | <filename>Build System Derived Toolchain</filename>), |
311 | the <filename>Target Architecture</filename>, and the | 327 | the <filename>Target Architecture</filename>, and the |
312 | <filename>Target Options</filename>. | 328 | <filename>Target Options</filename>. |
313 | The settings are inherited from the Yocto Plug-in configuration performed | 329 | The settings are inherited from the Yocto Plug-in configuration performed |
314 | after installing the plug-in.</para></listitem> | 330 | after installing the plug-in.</para></listitem> |
315 | <listitem><para><filename>Select Project -> Reconfigure Project</filename> - | 331 | <listitem><para><filename>Select Project -> Reconfigure Project</filename>: |
316 | This selection runs the <filename>autogen.sh</filename> in the workspace for your project. | 332 | This selection runs the <filename>autogen.sh</filename> in the workspace for your project. |
317 | The script runs <filename>libtoolize</filename>, <filename>aclocal</filename>, | 333 | The script runs <filename>libtoolize</filename>, <filename>aclocal</filename>, |
318 | <filename>autoconf</filename>, <filename>autoheader</filename>, | 334 | <filename>autoconf</filename>, <filename>autoheader</filename>, |
319 | <filename>automake --a</filename>, and | 335 | <filename>automake --a</filename>, and |
320 | <filename>./configure</filename>.</para></listitem> | 336 | <filename>./configure</filename>.</para></listitem> |
321 | </orderedlist> | 337 | </orderedlist> |
322 | </para> | 338 | </para> |
323 | </section> | 339 | </section> |
324 | 340 | ||
325 | <section id='building-the-project'> | 341 | <section id='building-the-project'> |
326 | <title>Building the Project</title> | 342 | <title>Building the Project</title> |
343 | |||
327 | <para> | 344 | <para> |
328 | To build the project, select <filename>Project -> Build Project</filename>. | 345 | To build the project, select <filename>Project -> Build Project</filename>. |
329 | The console should update and you can note the cross-compiler you are using. | 346 | The console should update and you can note the cross-compiler you are using. |
@@ -332,27 +349,30 @@ | |||
332 | 349 | ||
333 | <section id='starting-qemu-in-user-space-nfs-mode'> | 350 | <section id='starting-qemu-in-user-space-nfs-mode'> |
334 | <title>Starting QEMU in User Space NFS Mode</title> | 351 | <title>Starting QEMU in User Space NFS Mode</title> |
352 | |||
335 | <para> | 353 | <para> |
336 | To start the QEMU emulator from within Eclipse, follow these steps: | 354 | To start the QEMU emulator from within Eclipse, follow these steps: |
337 | <orderedlist> | 355 | <orderedlist> |
338 | <listitem><para>Select <filename>Run -> External Tools -> External Tools Configurations...</filename> | 356 | <listitem><para>Select <filename>Run -> External Tools -> External Tools |
339 | - This selection brings up the <filename>External Tools Configurations</filename> Dialog.</para></listitem> | 357 | Configurations...</filename>. |
358 | This selection brings up the <filename>External Tools Configurations</filename> | ||
359 | Dialog.</para></listitem> | ||
340 | <listitem><para>Go to the left navigation area and expand <filename>Program</filename>. | 360 | <listitem><para>Go to the left navigation area and expand <filename>Program</filename>. |
341 | You should find the image listed. | 361 | You should find the image listed. |
342 | For example, <filename>qemu-x86_64-poky-linux</filename>.</para></listitem> | 362 | For example, <filename>qemu-x86_64-poky-linux</filename>.</para></listitem> |
343 | <listitem><para>Click on the image. | 363 | <listitem><para>Click on the image. |
344 | This brings up a new environment in the main area of the | 364 | This brings up a new environment in the main area of the |
345 | <filename>External Tools Configurations</filename> Dialog. | 365 | <filename>External Tools Configurations</filename> Dialog. |
346 | The Main tab is selected.</para></listitem> | 366 | The Main tab is selected.</para></listitem> |
347 | <listitem><para>Click <filename>Run</filename> next. | 367 | <listitem><para>Click <filename>Run</filename> next. |
348 | This brings up a shell window.</para></listitem> | 368 | This brings up a shell window.</para></listitem> |
349 | <listitem><para>Enter your host root password in the shell window at the prompt. | 369 | <listitem><para>Enter your host root password in the shell window at the prompt. |
350 | This sets up a <filename>Tap 0</filename> connection needed for running in user-space | 370 | This sets up a <filename>Tap 0</filename> connection needed for running in user-space |
351 | NFS mode.</para></listitem> | 371 | NFS mode.</para></listitem> |
352 | <listitem><para>Wait for QEMU to launch.</para></listitem> | 372 | <listitem><para>Wait for QEMU to launch.</para></listitem> |
353 | <listitem><para>Once QEMU launches you need to determine the IP Address | 373 | <listitem><para>Once QEMU launches you need to determine the IP Address |
354 | for the user-space NFS. | 374 | for the user-space NFS. |
355 | You can do that by going to a terminal in the QEMU and entering the | 375 | You can do that by going to a terminal in the QEMU and entering the |
356 | <filename>ipconfig</filename> command.</para></listitem> | 376 | <filename>ipconfig</filename> command.</para></listitem> |
357 | </orderedlist> | 377 | </orderedlist> |
358 | </para> | 378 | </para> |
@@ -360,34 +380,35 @@ | |||
360 | 380 | ||
361 | <section id='deploying-and-debugging-the-application'> | 381 | <section id='deploying-and-debugging-the-application'> |
362 | <title>Deploying and Debugging the Application</title> | 382 | <title>Deploying and Debugging the Application</title> |
383 | |||
363 | <para> | 384 | <para> |
364 | Once QEMU is running, you can deploy your application and use the emulator | 385 | Once QEMU is running, you can deploy your application and use the emulator |
365 | to perform debugging. | 386 | to perform debugging. |
366 | Follow these steps to deploy the application. | 387 | Follow these steps to deploy the application. |
367 | <orderedlist> | 388 | <orderedlist> |
368 | <listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem> | 389 | <listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem> |
369 | <listitem><para>In the left area expand <filename>C/C++Remote Application</filename>.</para></listitem> | 390 | <listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem> |
370 | <listitem><para>Locate your project and select it to bring up a new | 391 | <listitem><para>Locate your project and select it to bring up a new |
371 | tabbed view in the <filename>Debug Configurations</filename> Dialog.</para></listitem> | 392 | tabbed view in the <filename>Debug Configurations</filename> Dialog.</para></listitem> |
372 | <listitem><para>Enter the absolute path into which you want to deploy | 393 | <listitem><para>Enter the absolute path into which you want to deploy |
373 | the application. | 394 | the application. |
374 | Use the <filename>Remote Absolute File Path</filename> for <filename>C/C++Application:</filename>. | 395 | Use the <filename>Remote Absolute File Path</filename> for <filename>C/C++Application:</filename>. |
375 | For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem> | 396 | For example, enter <filename>/usr/bin/<programname></filename>.</para></listitem> |
376 | <listitem><para>Click on the <filename>Debugger</filename> tab to see the cross-tool debugger | 397 | <listitem><para>Click on the <filename>Debugger</filename> tab to see the cross-tool debugger |
377 | you are using.</para></listitem> | 398 | you are using.</para></listitem> |
378 | <listitem><para>Create a new connection to the QEMU instance | 399 | <listitem><para>Create a new connection to the QEMU instance |
379 | by clicking on <filename>new</filename>.</para></listitem> | 400 | by clicking on <filename>new</filename>.</para></listitem> |
380 | <listitem><para>Select <filename>TCF</filename>, which means Target Communication | 401 | <listitem><para>Select <filename>TCF</filename>, which means Target Communication |
381 | Framework.</para></listitem> | 402 | Framework.</para></listitem> |
382 | <listitem><para>Click <filename>Next</filename>.</para></listitem> | 403 | <listitem><para>Click <filename>Next</filename>.</para></listitem> |
383 | <listitem><para>Clear out the <filename>host name</filename> field and enter the IP Address | 404 | <listitem><para>Clear out the <filename>host name</filename> field and enter the IP Address |
384 | determined earlier.</para></listitem> | 405 | determined earlier.</para></listitem> |
385 | <listitem><para>Click <filename>Finish</filename> to close the new connections | 406 | <listitem><para>Click <filename>Finish</filename> to close the new connections |
386 | Dialog.</para></listitem> | 407 | Dialog.</para></listitem> |
387 | <listitem><para>Use the drop-down menu now in the <filename>Connection</filename> field and pick | 408 | <listitem><para>Use the drop-down menu now in the <filename>Connection</filename> field and pick |
388 | the IP Address you entered.</para></listitem> | 409 | the IP Address you entered.</para></listitem> |
389 | <listitem><para>Click <filename>Debug</filename> to bring up a login screen | 410 | <listitem><para>Click <filename>Debug</filename> to bring up a login screen |
390 | and login.</para></listitem> | 411 | and login.</para></listitem> |
391 | <listitem><para>Accept the debug perspective.</para></listitem> | 412 | <listitem><para>Accept the debug perspective.</para></listitem> |
392 | </orderedlist> | 413 | </orderedlist> |
393 | </para> | 414 | </para> |
@@ -395,64 +416,68 @@ | |||
395 | 416 | ||
396 | <section id='running-user-space-tools'> | 417 | <section id='running-user-space-tools'> |
397 | <title>Running User-Space Tools</title> | 418 | <title>Running User-Space Tools</title> |
419 | |||
398 | <para> | 420 | <para> |
399 | As mentioned earlier in the manual several tools exist that enhance | 421 | As mentioned earlier in the manual, several tools exist that enhance |
400 | your development experience. | 422 | your development experience. |
401 | These tools are aids in developing and debugging applications and images. | 423 | These tools are aids in developing and debugging applications and images. |
402 | You can run these user-space tools from within the Yocto Eclipse | 424 | You can run these user-space tools from within the Eclipse IDE through the |
403 | Plug-in through the <filename>Window -> YoctoTools</filename> menu. | 425 | <filename>Window -> YoctoTools</filename> menu. |
404 | </para> | 426 | </para> |
427 | |||
405 | <para> | 428 | <para> |
406 | Once you pick a tool, you need to configure it for the remote target. | 429 | Once you pick a tool, you need to configure it for the remote target. |
407 | Every tool needs to have the connection configured. | 430 | Every tool needs to have the connection configured. |
408 | You must select an existing TCF-based RSE connection to the remote target. | 431 | You must select an existing TCF-based RSE connection to the remote target. |
409 | If one does not exist, click <filename>New</filename> to create one. | 432 | If one does not exist, click <filename>New</filename> to create one. |
410 | </para> | 433 | </para> |
434 | |||
411 | <para> | 435 | <para> |
412 | Here are some specifics about the remote tools: | 436 | Here are some specifics about the remote tools: |
413 | <itemizedlist> | 437 | <itemizedlist> |
414 | <listitem><para><emphasis><filename>OProfile</filename>:</emphasis> Selecting this tool causes | 438 | <listitem><para><emphasis><filename>OProfile</filename>:</emphasis> Selecting this tool causes |
415 | the <filename>oprofile-server</filename> on the remote target to launch on | 439 | the <filename>oprofile-server</filename> on the remote target to launch on |
416 | the local host machine. | 440 | the local host machine. |
417 | The <filename>oprofile-viewer</filename> must be installed on the local host machine and the | 441 | The <filename>oprofile-viewer</filename> must be installed on the local host machine and the |
418 | <filename>oprofile-server</filename> must be installed on the remote target, | 442 | <filename>oprofile-server</filename> must be installed on the remote target, |
419 | respectively, in order to use. | 443 | respectively, in order to use. |
420 | You must compile and install the <filename>oprofile-viewer</filename> from the source code | 444 | You must compile and install the <filename>oprofile-viewer</filename> from the source code |
421 | on your local host machine. | 445 | on your local host machine. |
422 | Furthermore, in order to convert the target's sample format data into a form that the | 446 | Furthermore, in order to convert the target's sample format data into a form that the |
423 | host can use, you must have <filename>oprofile-viewer</filename> version 0.9.4 or | 447 | host can use, you must have <filename>oprofile</filename> version 0.9.4 or |
424 | greater installed on the host. | 448 | greater installed on the host.</para> |
425 | The <filename>oprofile-server</filename> is installed by default in the image.</para> | 449 | <para>You can locate both the viewer and server from |
426 | <para>You can locate both the viewer and server from | 450 | <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>. |
427 | <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.</para></listitem> | 451 | <note>The <filename>oprofile-server</filename> is installed by default on |
428 | <listitem><para><emphasis><filename>Lttng-ust</filename>:</emphasis> Selecting this tool runs | 452 | the <filename>core-image-sato-sdk</filename> image.</note></para></listitem> |
429 | <filename>usttrace</filename> on the remote target, transfers the output data back to the | 453 | <listitem><para><emphasis><filename>Lttng-ust</filename>:</emphasis> Selecting this tool runs |
430 | local host machine and uses <filename>lttv-gui</filename> to graphically display the output. | 454 | <filename>usttrace</filename> on the remote target, transfers the output data back to the |
431 | The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool. | 455 | local host machine, and uses <filename>lttv-gui</filename> to graphically display the output. |
432 | For information on how to use <filename>lttng</filename> to trace an application, see | 456 | The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool. |
433 | <ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para> | 457 | For information on how to use <filename>lttng</filename> to trace an application, see |
434 | <para>For <filename>Application</filename>, you must supply the absolute path name of the | 458 | <ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para> |
435 | application to be traced by user mode <filename>lttng</filename>. | 459 | <para>For <filename>Application</filename>, you must supply the absolute path name of the |
436 | For example, typing <filename>/path/to/foo</filename> triggers | 460 | application to be traced by user mode <filename>lttng</filename>. |
437 | <filename>usttrace /path/to/foo</filename> on the remote target to trace the | 461 | For example, typing <filename>/path/to/foo</filename> triggers |
438 | program <filename>/path/to/foo</filename>.</para> | 462 | <filename>usttrace /path/to/foo</filename> on the remote target to trace the |
439 | <para><filename>Argument</filename> is passed to <filename>usttrace</filename> | 463 | program <filename>/path/to/foo</filename>.</para> |
440 | running on the remote target.</para></listitem> | 464 | <para><filename>Argument</filename> is passed to <filename>usttrace</filename> |
441 | <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis> Selecting this tool runs | 465 | running on the remote target.</para></listitem> |
442 | <filename>powertop</filename> on the remote target machine and displays the results in a | 466 | <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis> Selecting this tool runs |
443 | new view called <filename>powertop</filename>.</para> | 467 | <filename>powertop</filename> on the remote target machine and displays the results in a |
444 | <para><filename>Time to gather data(sec):</filename> is the time passed in seconds before data | 468 | new view called <filename>powertop</filename>.</para> |
445 | is gathered from the remote target for analysis.</para> | 469 | <para><filename>Time to gather data(sec):</filename> is the time passed in seconds before data |
446 | <para><filename>show pids in wakeups list:</filename> corresponds to the | 470 | is gathered from the remote target for analysis.</para> |
447 | <filename>-p</filename> argument | 471 | <para><filename>show pids in wakeups list:</filename> corresponds to the |
448 | passed to <filename>powertop</filename>.</para></listitem> | 472 | <filename>-p</filename> argument |
449 | <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis> | 473 | passed to <filename>powertop</filename>.</para></listitem> |
450 | <filename>latencytop</filename> identifies system latency, while | 474 | <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis> |
451 | <filename>perf</filename> monitors the system's | 475 | <filename>latencytop</filename> identifies system latency, while |
452 | performance counter registers. | 476 | <filename>perf</filename> monitors the system's |
453 | Selecting either of these tools causes an RSE terminal view to appear | 477 | performance counter registers. |
454 | from which you can run the tools. | 478 | Selecting either of these tools causes an RSE terminal view to appear |
455 | Both tools refresh the entire screen to display results while they run.</para></listitem> | 479 | from which you can run the tools. |
480 | Both tools refresh the entire screen to display results while they run.</para></listitem> | ||
456 | </itemizedlist> | 481 | </itemizedlist> |
457 | </para> | 482 | </para> |
458 | </section> | 483 | </section> |