From cb8f3b1ad784b45241c3e246d3c6b37e72dd1ead Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 15 Aug 2011 08:31:54 -0700 Subject: [PATCH] documentation/adt-manual/adt-eclipse.xml: general edits and formatting. (From yocto-docs rev: 31e2643b0c4205b8db0fb7a8082b5f7083a00745) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/adt-manual/adt-eclipse.xml | 234 +++++++++++++---------- 1 file changed, 129 insertions(+), 105 deletions(-) diff --git a/documentation/adt-manual/adt-eclipse.xml b/documentation/adt-manual/adt-eclipse.xml index 4dd90f52fd..f7f772e322 100644 --- a/documentation/adt-manual/adt-eclipse.xml +++ b/documentation/adt-manual/adt-eclipse.xml @@ -7,7 +7,7 @@ The Eclipse IDE is a popular development environment and it fully supports development using Yocto Project. When you install and configure the Eclipse Yocto Project Plug-in into - the Eclipse IDE you maximize your Yocto Project design experience. + 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 @@ -40,7 +40,7 @@ It is recommended that you have the Indigo 3.7 version of the Eclipse IDE installed on your development system. - If you don’t have this version you can find it at + If you don’t have this version, you can find it at . From that site, choose the Eclipse Classic version. This version contains the Eclipse Platform, the Java Development @@ -66,7 +66,8 @@ This error causes the application to hang. - To fix this issue you can use the ‐‐vmargs option when you start + To fix this issue, you can use the ‐‐vmargs + option when you start Eclipse to increase the size of the permanent generation space: eclipse ‐‐vmargs ‐‐XX:PermSize=256M @@ -77,34 +78,37 @@
Installing Required Plug-ins and the Eclipse Yocto Plug-in - Before installing the Yocto Plug-in you need to be sure that the - CDT 8.0, RSE 3.2, and Autotools plug-ins are all installed in the + Before installing the Yocto Plug-in, you need to be sure that the + CDT 8.0, RSE 3.2, and + Autotools plug-ins are all installed in the following order. After installing these three plug-ins, you can install the - Eclipse Yocto Plug-in. + Eclipse Yocto plug-in. Use the following URLs for the plug-ins: CDT 8.0: - For CDT main features select the checkbox so you get all items. - For CDT optional features expand the selections and check - “C/C++ Remote Launch”. + For CDT main features, select the checkbox so you get all items. + For CDT optional features expand the selections and check + C/C++ Remote Launch. RSE 3.2: - Check the box next to “TM and RSE Main Features” so you select all + Check the box next to TM and RSE Main Features so you select all those items. Note that all items in the main features depend on 3.2.1 version. - Expand the items under “TM and RSE Uncategorized 3.2.1” and - select the following: “Remote System Explorer End-User Runtime”, - “Remote System Explorer Extended SDK”, “Remote System Explorer User Actions”, - “RSE Core”, “RSE Terminals UI”, and “Target Management Terminal”. + Expand the items under TM and RSE Uncategorized 3.2.1 and + select the following: Remote System Explorer End-User Runtime, + Remote System Explorer Extended SDK, + Remote System Explorer User Actions, + RSE Core, RSE Terminals UI, + and Target Management Terminal. Autotools: Expand the items under “Linux Tools” and select “Autotools support for CDT (Incubation)”. Yocto Plug-in: - Check the box next to “Development tools & SDKs for Yocto Linux” + Check the box next to Development tools & SDKs for Yocto Linux to select all the items. @@ -112,9 +116,11 @@ Follow these general steps to install a plug-in: From within the Eclipse IDE select the - “Install New Software” item from the “Help” menu. - Click “Add…” in the “Work with:” area. - Enter the URL for the repository and leave the “Name” + Install New Software item from the Help + menu. + Click Add… in the + Work with: area. + Enter the URL for the repository and leave the Name field blank. Check the boxes next to the software you need to install and then complete the installation. @@ -132,42 +138,46 @@ 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 - you configure the project. - See “Configuring the Cross Toolchain” section later in the manual. + you configure the project (see the following section). To start, you need to do the following from within the Eclipse IDE: - Choose Windows -> Preferences to display + Choose Windows -> Preferences to display the Preferences Dialog - Click “Yocto SDK” + Click Yocto SDK
Configuring the Cross-Compiler Options - Choose between ‘Stand-alone Prebuilt Toolchain’ and ‘Build System Derived Toolchain’ for Cross + Choose between Stand-alone Prebuilt Toolchain + and Build System Derived Toolchain for Cross Compiler Options. - Stand-alone Prebuilt Toolchain – Select this mode + Stand-alone Prebuilt Toolchain – + 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. For example, suppose you are an application developer and do not 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 Stand-alone Prebuilt Toolchain you are using the toolchain installed + When you use Stand-alone Prebuilt Toolchain + you are using the toolchain installed in the /opt/poky directory. - Build System Derived Toolchain – Select this mode + Build System Derived Toolchain – + 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 installed on + 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 Build System Derived Toolchain you are using the toolchain bundled + When you select Build System Derived Toolchain + 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 - in the Preferences Dialog. + If you use this mode, you must also supply the Yocto Project build directory + in the Preferences Dialog.
@@ -179,24 +189,26 @@ 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 - regardless of wheather you select (Stand-alone Prebuilt Toolchain or Build System Derived Toolchain). + regardless of whether you select + (Stand-alone Prebuilt Toolchain or + Build System Derived Toolchain).
Selecting the Target Architecture - Use the pull-down Target Architecture menu and select the + Use the pull-down Target Architecture menu and select the target architecture. - The Target Architecture is the type of hardware you are + 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 - “Preparing to Use the Application Development Toolkit (ADT)” + Preparing to Use the Application Development Toolkit (ADT) section earlier in this document.
@@ -207,16 +219,17 @@ You can choose to emulate hardware using the QEMU emulator, or you can choose to use actual hardware. - External HW – Select this option + External HW – Select this option if you will be using actual hardware. - QEMU – Select this option if + QEMU – Select this option if you will be using the QEMU emulator. - If you are using the emulator you also need to locate the Kernel + If you are using the emulator, you also need to locate the kernel and specify any custom options. - If you select Build System Derived Toolchain the target kernel you built - will be located in the + If you select Build System Derived Toolchain, + the target kernel you built will be located in the Yocto Project build tree in tmp/deploy/images directory. - If you select Stand-alone Prebuilt Toolchain the pre-built kernel you downloaded is located + If you select Stand-alone Prebuilt Toolchain, the + pre-built kernel you downloaded is located in the directory you specified when you downloaded the image. Most custom options are for advanced QEMU users to further customize their QEMU instance. @@ -238,7 +251,7 @@
- Click the “OK” button to save your plug-in configurations. + Click the OK button to save your plug-in configurations. @@ -251,27 +264,28 @@ This section describes how to create autotools-based projects from within the Eclipse IDE. For information on creating projects in a terminal window see - “Using the Command Line” + Using the Command Line section. To create a project based on a Yocto template and then display the source code, follow these steps: - Select File -> New -> Project. - Double click “CC++”. - Double click “C Project” to create the project. - Double click “Yocto SDK Project”. - Select “Hello World ANSI C Autotools Project”. + Select File -> New -> Project. + Double click CC++. + Double click C Project to create the project. + Double click Yocto SDK Project. + Select Hello World ANSI C Autotools Project. This is an Autotools-based project based on a Yocto Project template. - Put a name in the “Project name:” field. - Click “Next”. - Add information in the “Author” field. - Use “GNU General Public License v2.0” for the License. - Click “Finish”. - Answer ‘Yes” to the open perspective prompt. + Put a name in the Project name: field. + Click Next. + Add information in the Author field. + Use GNU General Public License v2.0 + for the License. + Click Finish. + Answer Yes to the open perspective prompt. In the Project Explorer expand your project. - Expand ‘src’. + Expand src. Double click on your source file and the code appears in the window. This is the template. @@ -283,20 +297,23 @@ Configuring the Cross-Toolchains The previous section, - “Configuring the Cross-Compiler Options”, set up the default project + Configuring the Cross-Compiler Options, set up the default project configurations. You can change these settings for a given project by following these steps: - Select Project -> Invoke Yocto Tools -> Reconfigure Yocto. - This brings up the project's Yocto Settings Dialog. + Select Project -> Invoke Yocto Tools -> Reconfigure Yocto - + This selection brings up the project's Yocto Settings Dialog. Settings are inherited from the default project configuration. - The information in this dialogue is identical to that chosen earlier - for the Cross Compiler Option (Stand-alone Prebuilt Toolchain or Build System Derived Toolchain), - the Target Architecture, and the Target Options. + The information in this dialog is identical to that chosen earlier + for the Cross Compiler Option + (Stand-alone Prebuilt Toolchain or + Build System Derived Toolchain), + the Target Architecture, and the + Target Options. The settings are inherited from the Yocto Plug-in configuration performed after installing the plug-in. - Select Project -> Reconfigure Project. - This runs the autogen.sh in the workspace for your project. + Select Project -> Reconfigure Project - + This selection runs the autogen.sh in the workspace for your project. The script runs libtoolize, aclocal, autoconf, autoheader, automake ‐‐a, and @@ -308,7 +325,7 @@
Building the Project - To build the project, select Project -> Build Project. + To build the project, select Project -> Build Project. The console should update and you can note the cross-compiler you are using.
@@ -318,19 +335,20 @@ To start the QEMU emulator from within Eclipse, follow these steps: - Select Run -> External Tools -> External Tools Configurations... - This selection brings up the External Tools Configurations Dialogue. - Go to the left navigation area and expand ‘Program’. + Select Run -> External Tools -> External Tools Configurations... + - This selection brings up the External Tools Configurations Dialog. + Go to the left navigation area and expand Program. You should find the image listed. - For example, qemu-x86_64-poky-linux. + For example, qemu-x86_64-poky-linux. Click on the image. - This brings up a new environment in the main area of the External - Tools Configurations Dialogue. + This brings up a new environment in the main area of the + External Tools Configurations Dialog. The Main tab is selected. - Click “Run” next. + Click Run next. This brings up a shell window. Enter your host root password in the shell window at the prompt. - This sets up a Tap 0 connection needed for running in user-space NFS mode. + This sets up a Tap 0 connection needed for running in user-space + NFS mode. Wait for QEMU to launch. Once QEMU launches you need to determine the IP Address for the user-space NFS. @@ -343,30 +361,33 @@
Deploying and Debugging the Application - Once QEMU is running you can deploy your application and use the emulator + Once QEMU is running, you can deploy your application and use the emulator to perform debugging. Follow these steps to deploy the application. - Select Run -> Debug Configurations... - In the left area expand “C/C++Remote Application”. + Select Run -> Debug Configurations... + In the left area expand C/C++Remote Application. Locate your project and select it to bring up a new - tabbed view in the Debug Configurations dialogue. + tabbed view in the Debug Configurations Dialog. Enter the absolute path into which you want to deploy the application. - Use the Remote Absolute File Path for C/C++Application:. + Use the Remote Absolute File Path for C/C++Application:. For example, enter /usr/bin/<programname>. - Click on the Debugger tab to see the cross-tool debugger + Click on the Debugger tab to see the cross-tool debugger you are using. Create a new connection to the QEMU instance - by clicking on “new”. - Select “TCF, which means Target Communication Framework. - Click “Next”. - Clear out the “host name” field and enter the IP Address + by clicking on new. + Select TCF, which means Target Communication + Framework. + Click Next. + Clear out the host name field and enter the IP Address determined earlier. - Click Finish to close the new connections dialogue. - Use the drop-down menu now in the “Connection” field and pick + Click Finish to close the new connections + Dialog. + Use the drop-down menu now in the Connection field and pick the IP Address you entered. - Click “Debug” to bring up a login screen and login. + Click Debug to bring up a login screen + and login. Accept the debug perspective. @@ -379,49 +400,52 @@ 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 Window -> YoctoTools menu. + Plug-in through the Window -> YoctoTools menu. - Once you pick a tool you need to configure it for the remote target. + 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 "New" to create one. + If one does not exist, click New to create one. Here are some specifics about the remote tools: - OProfile: Selecting this tool causes - the oprofile-server on the remote target to launch on the local host machine. - The oprofile-viewer must be installed on the local host machine and the - oprofile-server must be installed on the remote target, respectively, in order - to use. + OProfile: Selecting this tool causes + the oprofile-server on the remote target to launch on + the local host machine. + The oprofile-viewer must be installed on the local host machine and the + oprofile-server must be installed on the remote target, + respectively, in order to use. You can locate both the viewer and server from . - You need to compile and install the oprofile-viewer from the source code + You need to compile and install the oprofile-viewer from the source code on your local host machine. - The oprofile-server is installed by default in the image. - Lttng-ust: Selecting this tool runs + The oprofile-server is installed by default in the image. + Lttng-ust: Selecting this tool runs usttrace on the remote target, transfers the output data back to the local host machine and uses lttv-gui to graphically display the output. The lttv-gui must be installed on the local host machine to use this tool. For information on how to use lttng to trace an application, see . - For "Application" you must supply the absolute path name of the - application to be traced by user mode lttng. + For Application, you must supply the absolute path name of the + application to be traced by user mode lttng. For example, typing /path/to/foo triggers usttrace /path/to/foo on the remote target to trace the program /path/to/foo. - "Argument" is passed to usttrace + Argument is passed to usttrace running on the remote target. - PowerTOP: Selecting this tool runs - "PowerTOP" on the remote target machine and displays the results in a - new view called "powertop". - "Time to gather data(sec):" is the time passed in seconds before data + PowerTOP: Selecting this tool runs + powertop on the remote target machine and displays the results in a + new view called powertop. + Time to gather data(sec): is the time passed in seconds before data is gathered from the remote target for analysis. - "show pids in wakeups list:" corresponds to the -p argument + show pids in wakeups list: corresponds to the + -p argument passed to powertop. - LatencyTOP and Perf: "LatencyTOP" - identifies system latency, while perf monitors the system's + LatencyTOP and Perf: + latencytop identifies system latency, while + perf monitors the system's performance counter registers. Selecting either of these tools causes an RSE terminal view to appear from which you can run the tools.