YOCTO #1419: General edits and fix for oprofile-server rev requirements.
I performed general edits to this chapter as well as addressed the two items for the YOCTO #1419, which was re-opened. These included specifying oprofile version 0.9.4 required and the note that oprofile-server is only installed by default in the core-image-sato-sdk image. (From yocto-docs rev: fdca6458d9cd431052126d31f6eb4396c3327982) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
77d1ba446c
commit
04ca8b2862
|
@ -3,6 +3,7 @@
|
|||
|
||||
<chapter id='adt-eclipse'>
|
||||
<title>Working Within Eclipse</title>
|
||||
|
||||
<para>
|
||||
The Eclipse IDE is a popular development environment and it fully supports
|
||||
development using Yocto Project.
|
||||
|
@ -10,10 +11,10 @@
|
|||
the Eclipse IDE, you maximize your Yocto Project design experience.
|
||||
Installing and configuring the Plug-in results in an environment that
|
||||
has extensions specifically designed to let you more easily develop software.
|
||||
These extensions allow for cross-compilation and deployment and execution of
|
||||
These extensions allow for cross-compilation, deployment, and execution of
|
||||
your output into a QEMU emulation session.
|
||||
You can also perform cross-debugging and profiling.
|
||||
The environment also has a suite of tools that allows you to perform
|
||||
The environment also supports a suite of tools that allows you to perform
|
||||
remote profiling, tracing, collection of power data, collection of
|
||||
latency data, and collection of performance data.
|
||||
</para>
|
||||
|
@ -24,12 +25,13 @@
|
|||
|
||||
<section id='setting-up-the-eclipse-ide'>
|
||||
<title>Setting Up the Eclipse IDE</title>
|
||||
|
||||
<para>
|
||||
To develop within the Eclipse IDE you need to do the following:
|
||||
To develop within the Eclipse IDE, you need to do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Be sure the optimal version of Eclipse IDE
|
||||
is installed.</para></listitem>
|
||||
<listitem><para>Install Eclipse plug-in requirements prior to installing
|
||||
<listitem><para>Install the Eclipse Plug-in requirements prior to installing
|
||||
the Eclipse Yocto Plug-in.</para></listitem>
|
||||
<listitem><para>Configure the Eclipse Yocto Plug-in.</para></listitem>
|
||||
</orderedlist>
|
||||
|
@ -37,6 +39,7 @@
|
|||
|
||||
<section id='installing-eclipse-ide'>
|
||||
<title>Installing Eclipse IDE</title>
|
||||
|
||||
<para>
|
||||
It is recommended that you have the Indigo 3.7 version of the
|
||||
Eclipse IDE installed on your development system.
|
||||
|
@ -46,29 +49,32 @@
|
|||
This version contains the Eclipse Platform, the Java Development
|
||||
Tools (JDT), and the Plug-in Development Environment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you have downloaded the tarball, extract it into a clean
|
||||
directory and complete the installation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One issue exists that you need to be aware of regarding the Java
|
||||
Virtual machine’s garbage collection (GC) process.
|
||||
The GC process does not clean up the permanent generation
|
||||
space (PermGen).
|
||||
This space stores meta-data descriptions of classes.
|
||||
This space stores metadata descriptions of classes.
|
||||
The default value is set too small and it could trigger an
|
||||
out-of-memory error such as the following:
|
||||
<literallayout class='monospaced'>
|
||||
Java.lang.OutOfMemoryError: PermGen space
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This error causes the application to hang.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To fix this issue, you can use the <filename>--vmargs</filename>
|
||||
option when you start
|
||||
Eclipse to increase the size of the permanent generation space:
|
||||
option when you start Eclipse to increase the size of the permanent generation space:
|
||||
<literallayout class='monospaced'>
|
||||
eclipse --vmargs --XX:PermSize=256M
|
||||
</literallayout>
|
||||
|
@ -77,22 +83,23 @@
|
|||
|
||||
<section id='installing-required-plug-ins-and-the-eclipse-yocto-plug-in'>
|
||||
<title>Installing Required Plug-ins and the Eclipse Yocto Plug-in</title>
|
||||
|
||||
<para>
|
||||
Before installing the Yocto Plug-in, you need to be sure that the
|
||||
<filename>CDT 8.0</filename>, <filename>RSE 3.2</filename>, and
|
||||
<filename>Autotools</filename> plug-ins are all installed in the
|
||||
following order.
|
||||
After installing these three plug-ins, you can install the
|
||||
<filename>Eclipse Yocto</filename> plug-in.
|
||||
After installing these three plug-ins, you can install the Eclipse Yocto Plug-in.
|
||||
Use the following URLs for the plug-ins:
|
||||
<orderedlist>
|
||||
<listitem><para><emphasis>CDT 8.0</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'></ulink>:
|
||||
For <filename>CDT main features</filename>, select the checkbox so you get all items.
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://download.eclipse.org/tools/cdt/releases/indigo/'>CDT 8.0:</ulink>
|
||||
</emphasis> For <filename>CDT main features</filename>, select the
|
||||
checkbox so you get all items.
|
||||
For <filename>CDT optional features</filename> expand the selections and check
|
||||
<filename>C/C++ Remote Launch</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>RSE 3.2</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/tm/updates/3.2'></ulink>:
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://download.eclipse.org/tm/updates/3.2'>RSE 3.2:</ulink></emphasis>
|
||||
Check the box next to <filename>TM and RSE Main Features</filename> so you select all
|
||||
those items.
|
||||
Note that all items in the main features depend on 3.2.1 version.
|
||||
|
@ -102,20 +109,22 @@
|
|||
<filename>Remote System Explorer User Actions</filename>,
|
||||
<filename>RSE Core</filename>, <filename>RSE Terminals UI</filename>,
|
||||
and <filename>Target Management Terminal</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>Autotools</emphasis> –
|
||||
<ulink url='http://download.eclipse.org/technology/linuxtools/update/'></ulink>:
|
||||
Expand the items under “Linux Tools” and select “Autotools support for
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://download.eclipse.org/technology/linuxtools/update/'>Autotools:</ulink>
|
||||
</emphasis> Expand the items under “Linux Tools” and select “Autotools support for
|
||||
CDT (Incubation)”.</para></listitem>
|
||||
<listitem><para><emphasis>Yocto Plug-in</emphasis> –
|
||||
<ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.0'></ulink>:
|
||||
Check the box next to <filename>Development tools & SDKs for Yocto Linux</filename>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='http://www.yoctoproject.org/downloads/eclipse-plugin/1.1'>Yocto Plug-in:
|
||||
</ulink></emphasis> Check the box next to
|
||||
<filename>Development tools & SDKs for Yocto Linux</filename>
|
||||
to select all the items.</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Follow these general steps to install a plug-in:
|
||||
Follow these general steps to install an Eclipse plug-in:
|
||||
<orderedlist>
|
||||
<listitem><para>From within the Eclipse IDE select the
|
||||
<listitem><para>From within the Eclipse IDE, select the
|
||||
<filename>Install New Software</filename> item from the <filename>Help</filename>
|
||||
menu.</para></listitem>
|
||||
<listitem><para>Click <filename>Add…</filename> in the
|
||||
|
@ -132,14 +141,16 @@
|
|||
|
||||
<section id='configuring-the-plug-in'>
|
||||
<title>Configuring the Plug-in</title>
|
||||
|
||||
<para>
|
||||
Configuring the Eclipse Yocto Plug-in involves choosing the Cross
|
||||
Compiler Options, selecting the Target Architecture, and choosing
|
||||
the Target Options.
|
||||
These settings are the default settings for all projects.
|
||||
You do have opportunities to change them later if you choose to when
|
||||
The settings you choose become the default settings for all projects.
|
||||
You do have opportunities to change them later when
|
||||
you configure the project (see the following section).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To start, you need to do the following from within the Eclipse IDE:
|
||||
<itemizedlist>
|
||||
|
@ -151,12 +162,13 @@
|
|||
|
||||
<section id='configuring-the-cross-compiler-options'>
|
||||
<title>Configuring the Cross-Compiler Options</title>
|
||||
|
||||
<para>
|
||||
Choose between <filename>Stand-alone Prebuilt Toolchain</filename>
|
||||
and <filename>Build System Derived Toolchain</filename> for Cross
|
||||
Compiler Options.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><filename>Stand-alone Prebuilt Toolchain</filename></emphasis> –
|
||||
<listitem><para><emphasis><filename>Stand-alone Prebuilt Toolchain:</filename></emphasis>
|
||||
Select this mode
|
||||
when you are not concerned with building a target image or you do not have
|
||||
a Yocto Project build tree on your development system.
|
||||
|
@ -164,16 +176,16 @@
|
|||
need to build a target image.
|
||||
Instead, you just want to use an architecture-specific toolchain on an
|
||||
existing kernel and target root filesystem.
|
||||
When you use <filename>Stand-alone Prebuilt Toolchain</filename>
|
||||
When you use <filename>Stand-alone Prebuilt Toolchain</filename>,
|
||||
you are using the toolchain installed
|
||||
in the <filename>/opt/poky</filename> directory.</para></listitem>
|
||||
<listitem><para><emphasis><filename>Build System Derived Toolchain</filename></emphasis> –
|
||||
<listitem><para><emphasis><filename>Build System Derived Toolchain:</filename></emphasis>
|
||||
Select this mode
|
||||
if you are building images for target hardware or your
|
||||
development environment already has a Yocto Project build tree.
|
||||
In this case, you likely already have a Yocto Project build tree on
|
||||
your system or you (or someone else) will be building one.
|
||||
When you select <filename>Build System Derived Toolchain</filename>
|
||||
When you select <filename>Build System Derived Toolchain</filename>,
|
||||
you are using the toolchain bundled
|
||||
inside the Yocto Project build tree.
|
||||
If you use this mode, you must also supply the Yocto Project build directory
|
||||
|
@ -184,11 +196,12 @@
|
|||
|
||||
<section id='configuring-the-sysroot'>
|
||||
<title>Configuring the Sysroot</title>
|
||||
|
||||
<para>
|
||||
Specify the sysroot location, which is where the root filesystem for the
|
||||
target hardware is created on the development system by the ADT Installer.
|
||||
The QEMU user-space tools, the
|
||||
NFS boot process and the cross-toolchain all use the sysroot location
|
||||
NFS boot process, and the cross-toolchain all use the sysroot location
|
||||
regardless of whether you select
|
||||
(<filename>Stand-alone Prebuilt Toolchain</filename> or
|
||||
<filename>Build System Derived Toolchain</filename>).
|
||||
|
@ -197,31 +210,32 @@
|
|||
|
||||
<section id='selecting-the-target-architecture'>
|
||||
<title>Selecting the Target Architecture</title>
|
||||
|
||||
<para>
|
||||
Use the pull-down <filename>Target Architecture</filename> menu and select the
|
||||
target architecture.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The target architecture is the type of hardware you are
|
||||
going to use or emulate.
|
||||
This pull-down menu should have the supported architectures.
|
||||
If the architecture you need is not listed in the menu then you
|
||||
will need to re-visit
|
||||
<xref linkend='adt-prepare'>
|
||||
Preparing to Use the Application Development Toolkit (ADT)</xref>
|
||||
section earlier in this document.
|
||||
If the architecture you need is not listed in the menu, you
|
||||
will need to re-visit the section "<link linkend='adt-prepare'>Preparing to Use
|
||||
the Application Development Toolkit (ADT)</link>" earlier in this document.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='choosing-the-target-options'>
|
||||
<title>Choosing the Target Options</title>
|
||||
|
||||
<para>
|
||||
You can choose to emulate hardware using the QEMU emulator, or you
|
||||
can choose to use actual hardware.
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><filename>External HW</filename></emphasis> – Select this option
|
||||
<listitem><para><emphasis><filename>External HW:</filename></emphasis> Select this option
|
||||
if you will be using actual hardware.</para></listitem>
|
||||
<listitem><para><emphasis><filename>QEMU</filename></emphasis> – Select this option if
|
||||
<listitem><para><emphasis><filename>QEMU:</filename></emphasis> Select this option if
|
||||
you will be using the QEMU emulator.
|
||||
If you are using the emulator, you also need to locate the kernel
|
||||
and specify any custom options.</para>
|
||||
|
@ -243,13 +257,13 @@
|
|||
The following is an example:
|
||||
<literallayout class='monospaced'>
|
||||
serial ‘<-m 256 -full-screen>’
|
||||
</literallayout>
|
||||
</para>
|
||||
</literallayout></para>
|
||||
<para>
|
||||
Regardless of the mode, Sysroot is already defined in the “Sysroot”
|
||||
field.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Click the <filename>OK</filename> button to save your plug-in configurations.
|
||||
</para>
|
||||
|
@ -259,14 +273,15 @@
|
|||
|
||||
<section id='creating-the-project'>
|
||||
<title>Creating the Project</title>
|
||||
|
||||
<para>
|
||||
You can create two types of projects: Autotools-based, or Makefile-based.
|
||||
This section describes how to create autotools-based projects from within
|
||||
the Eclipse IDE.
|
||||
For information on creating projects in a terminal window see
|
||||
<xref linkend='using-the-command-line'>Using the Command Line</xref>
|
||||
section.
|
||||
For information on creating Makefile-based projects in a terminal window see the section
|
||||
"<link linkend='using-the-command-line'>Using the Command Line</link>".
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To create a project based on a Yocto template and then display the source code,
|
||||
follow these steps:
|
||||
|
@ -295,13 +310,14 @@
|
|||
|
||||
<section id='configuring-the-cross-toolchains'>
|
||||
<title>Configuring the Cross-Toolchains</title>
|
||||
|
||||
<para>
|
||||
The previous section, <xref linkend='configuring-the-cross-compiler-options'>
|
||||
Configuring the Cross-Compiler Options</xref>, set up the default project
|
||||
The previous section, "<link linkend='configuring-the-cross-compiler-options'>
|
||||
Configuring the Cross-Compiler Options</link>", set up the default project
|
||||
configurations.
|
||||
You can change these settings for a given project by following these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select <filename>Project -> Invoke Yocto Tools -> Reconfigure Yocto</filename> -
|
||||
<listitem><para>Select <filename>Project -> Invoke Yocto Tools -> Reconfigure Yocto</filename>:
|
||||
This selection brings up the project's <filename>Yocto Settings</filename> Dialog.
|
||||
Settings are inherited from the default project configuration.
|
||||
The information in this dialog is identical to that chosen earlier
|
||||
|
@ -312,7 +328,7 @@
|
|||
<filename>Target Options</filename>.
|
||||
The settings are inherited from the Yocto Plug-in configuration performed
|
||||
after installing the plug-in.</para></listitem>
|
||||
<listitem><para><filename>Select Project -> Reconfigure Project</filename> -
|
||||
<listitem><para><filename>Select Project -> Reconfigure Project</filename>:
|
||||
This selection runs the <filename>autogen.sh</filename> in the workspace for your project.
|
||||
The script runs <filename>libtoolize</filename>, <filename>aclocal</filename>,
|
||||
<filename>autoconf</filename>, <filename>autoheader</filename>,
|
||||
|
@ -324,6 +340,7 @@
|
|||
|
||||
<section id='building-the-project'>
|
||||
<title>Building the Project</title>
|
||||
|
||||
<para>
|
||||
To build the project, select <filename>Project -> Build Project</filename>.
|
||||
The console should update and you can note the cross-compiler you are using.
|
||||
|
@ -332,11 +349,14 @@
|
|||
|
||||
<section id='starting-qemu-in-user-space-nfs-mode'>
|
||||
<title>Starting QEMU in User Space NFS Mode</title>
|
||||
|
||||
<para>
|
||||
To start the QEMU emulator from within Eclipse, follow these steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Select <filename>Run -> External Tools -> External Tools Configurations...</filename>
|
||||
- This selection brings up the <filename>External Tools Configurations</filename> Dialog.</para></listitem>
|
||||
<listitem><para>Select <filename>Run -> External Tools -> External Tools
|
||||
Configurations...</filename>.
|
||||
This selection brings up the <filename>External Tools Configurations</filename>
|
||||
Dialog.</para></listitem>
|
||||
<listitem><para>Go to the left navigation area and expand <filename>Program</filename>.
|
||||
You should find the image listed.
|
||||
For example, <filename>qemu-x86_64-poky-linux</filename>.</para></listitem>
|
||||
|
@ -360,13 +380,14 @@
|
|||
|
||||
<section id='deploying-and-debugging-the-application'>
|
||||
<title>Deploying and Debugging the Application</title>
|
||||
|
||||
<para>
|
||||
Once QEMU is running, you can deploy your application and use the emulator
|
||||
to perform debugging.
|
||||
Follow these steps to deploy the application.
|
||||
<orderedlist>
|
||||
<listitem><para>Select <filename>Run -> Debug Configurations...</filename></para></listitem>
|
||||
<listitem><para>In the left area expand <filename>C/C++Remote Application</filename>.</para></listitem>
|
||||
<listitem><para>In the left area, expand <filename>C/C++Remote Application</filename>.</para></listitem>
|
||||
<listitem><para>Locate your project and select it to bring up a new
|
||||
tabbed view in the <filename>Debug Configurations</filename> Dialog.</para></listitem>
|
||||
<listitem><para>Enter the absolute path into which you want to deploy
|
||||
|
@ -395,19 +416,22 @@
|
|||
|
||||
<section id='running-user-space-tools'>
|
||||
<title>Running User-Space Tools</title>
|
||||
|
||||
<para>
|
||||
As mentioned earlier in the manual several tools exist that enhance
|
||||
As mentioned earlier in the manual, several tools exist that enhance
|
||||
your development experience.
|
||||
These tools are aids in developing and debugging applications and images.
|
||||
You can run these user-space tools from within the Yocto Eclipse
|
||||
Plug-in through the <filename>Window -> YoctoTools</filename> menu.
|
||||
You can run these user-space tools from within the Eclipse IDE through the
|
||||
<filename>Window -> YoctoTools</filename> menu.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you pick a tool, you need to configure it for the remote target.
|
||||
Every tool needs to have the connection configured.
|
||||
You must select an existing TCF-based RSE connection to the remote target.
|
||||
If one does not exist, click <filename>New</filename> to create one.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here are some specifics about the remote tools:
|
||||
<itemizedlist>
|
||||
|
@ -420,14 +444,15 @@
|
|||
You must compile and install the <filename>oprofile-viewer</filename> from the source code
|
||||
on your local host machine.
|
||||
Furthermore, in order to convert the target's sample format data into a form that the
|
||||
host can use, you must have <filename>oprofile-viewer</filename> version 0.9.4 or
|
||||
greater installed on the host.
|
||||
The <filename>oprofile-server</filename> is installed by default in the image.</para>
|
||||
host can use, you must have <filename>oprofile</filename> version 0.9.4 or
|
||||
greater installed on the host.</para>
|
||||
<para>You can locate both the viewer and server from
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.</para></listitem>
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/oprofileui/'></ulink>.
|
||||
<note>The <filename>oprofile-server</filename> is installed by default on
|
||||
the <filename>core-image-sato-sdk</filename> image.</note></para></listitem>
|
||||
<listitem><para><emphasis><filename>Lttng-ust</filename>:</emphasis> Selecting this tool runs
|
||||
<filename>usttrace</filename> on the remote target, transfers the output data back to the
|
||||
local host machine and uses <filename>lttv-gui</filename> to graphically display the output.
|
||||
local host machine, and uses <filename>lttv-gui</filename> to graphically display the output.
|
||||
The <filename>lttv-gui</filename> must be installed on the local host machine to use this tool.
|
||||
For information on how to use <filename>lttng</filename> to trace an application, see
|
||||
<ulink url='http://lttng.org/files/ust/manual/ust.html'></ulink>.</para>
|
||||
|
|
Loading…
Reference in New Issue