Jan Axelson's Lakeview Research

LVR.COM is moving to JANAXELSON.COM

JANAXELSON.COM is live now. (Try it!).
Please update your bookmarks and links.
After June 1, 2014, this site will be available ONLY at janaxelson.com and links to content at lvr.com will no longer work.

Home > USB Central > USB OTG and Embedded Hosts > BeagleBoard Code for Accessing USB Devices > Using Eclipse to Cross-compile Applications for Embedded Systems

Using Eclipse to Cross-compile Applications for Embedded Systems

Jan Axelson

These instructions show how to use the Eclipse IDE to compile C/C++ Linux programs for the BeagleBoard-xM embedded system.

The instructions assume a Linux PC running Ubuntu 11.10 (Oneiric Ocelot) and the Eclipse Platform version 3.7.0. If you’re using a different Linux distribution or edition or a different Eclipse version, the menus and other details may vary.

I gleaned much of the information in this tutorial from a BeagleBoard Google groups post by Derek Kane.

Part 1: Install a Toolchain
Part 2: Install Eclipse and C/C++ Development Tools
Part 3: Create and Configure a Project
Part 4: Compile and Run an Application
Part 5: Set Up Remote Debugging

Click the images to enlarge.

Send comments, suggestions, etc. to jan (at) Lvr.com.

Part 1: Install a Toolchain

To cross-compile programs, you'll need a toolchain with a cross-compiler for your target architecture. This example installs an Ångström toolchain for the Armv7a architecture to create programs that run on the BeagleBoard-xM.

If you already have a toolchain installed, skip to Part 2: Install Eclipse and C/C++ Development Tools.

In a browser on the development PC, go to:

http://www.angstrom-distribution.org/toolchains/

To install a toolchain to run on a Pentium-II-series development PC (i686), select:

angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain.tar.bz2 

The filename may vary with new releases. For 64-bit systems, select an option with x86_64. To include support for the Qt framework, select an option with qte.

In the dialog box that appears, select Save File and click OK.

Save Toolchain

The default location for saving files is /home/username/Downloads/. This example uses the username jan.

Open a Terminal application by clicking the dash button (the Ubuntu logo) in the upper left, entering terminal in the search box, and clicking the Terminal icon that appears.

Run Terminal

In the terminal application, change to the directory to extract the files to:

cd /

Extract the files, specifying the path of the compressed file:

sudo tar -xjvf /home/jan/Downloads/angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain.tar.bz2        

Go to Part 2: Install Eclipse and C/C++ Development Tools.

Partner Links

***