5.1. Application Development Workflow Using Eclipse

The following figure and supporting list summarize a general workflow for application development that uses the SDK within the Eclipse IDE. The application developed runs on top of an image created using the Yocto Project.

  1. Prepare the Host System for the Yocto Project: Because this example workflow assumes development on a system set up to use the Yocto Project, you need to be sure your build host can use the Yocto Project. See the "Preparing a Build Host" section in the Yocto Project Development Tasks Manual for information on how to set up your build host.

    Note

    Be sure you install the "xterm" package, which is a graphical and Eclipse plug-in extra needed by Eclipse.

  2. Secure the Yocto Project Kernel Target Image: This example workflow assumes application development on top of an image built using the Yocto Project. Depending on whether you are using a pre-built image that matches your target architecture or you are using an image you build using the OpenEmbedded Build System and where you are going to run the image while you develop your application (QEMU or real hardware), the area from which you get the image differs.

    • Download the image from machines if your target architecture is supported and you are going to develop and test your application on actual hardware.

    • Download the image from machines/qemu if your target architecture is supported and you are going to develop and test your application using the QEMU Emulator.

    • Build your image if you cannot find a pre-built image that matches your target architecture. If your target architecture is similar to a supported architecture, you can modify the kernel image before you build it. See the "Using devtool to Patch the Kernel" section in the Yocto Project Linux Kernel Development Manual for an example. You can also see the "Making a Suitable Qemux86 Image" wiki for steps needed to build an image suitable for QEMU and for debugging within the Eclipse IDE.

  3. Install the SDK: The SDK provides a target-specific cross-development toolchain, the root filesystem, the QEMU emulator, and other tools that can help you develop your application. For information on how to install the SDK, see the "Installing the SDK" section.

  4. Secure the Target Root Filesystem and the Cross-Development Toolchain: You need to find and download the appropriate root filesystem and the cross-development toolchain.

    You can find the tarballs for the root filesystem in the same area used for the kernel image. Depending on the type of image you are running, the root filesystem you need differs. For example, if you are developing an application that runs on an image that supports Sato, you need to get a root filesystem that supports Sato.

    You can find the cross-development toolchains at toolchains. Be sure to get the correct toolchain for your development host and your target architecture. See the "Locating Pre-Built SDK Installers" section for information and the "Installing the SDK" section for installation information.

    Note

    As an alternative to downloading an SDK, you can build the SDK installer. For information on building the installer, see the "Building an SDK Installer" section. Another helpful resource for building an installer is the "Cookbook guide to Making an Eclipse Debug Capable Image" wiki page.

  5. Create and Build Your Application: You need to have source files for your application. Once you have the files, you can use the Eclipse IDE to import them and build the project.

  6. Deploy the Image With the Application: Using the Eclipse IDE, you can deploy your image to the hardware or to QEMU through the project's preferences. You can also use Eclipse to load and test your image under QEMU. See the "Using the Quick EMUlator (QEMU)" chapter in the Yocto Project Development Tasks Manual for information on using QEMU.

  7. Test and Debug the Application: Once your application is deployed, you need to test it. Within the Eclipse IDE, you can use the debugging environment along with supported performance enhancing Linux Tools.