YOUR FEEDBACK
shirley wrote: As an ISV and service provider, we specialise in .NET based collaboration soluti...
Cloud Computing Conference
March 22-24, 2009, New York
Register Today and SAVE !..


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP LINKS YOU MUST CLICK ON


A Low-Cost Cross-Development Environment Using the Eclipse Framework
Scaling the barriers

The Eclipse development environment has become the de facto industry standard environment in which to host embedded development tools. Many of the traditional embedded tools vendors who used to sell their own proprietary development tools and environments have embraced Eclipse and ported their products to run within it to take advantage of the sophisticated, feature-rich framework it provides.

These tools and environments are powerful, but they can still be expensive. For projects on a tight budget, it's now possible to use the freely available, open source Eclipse IDE along with open source GNU tools (binutils, gcc, and gdb) to construct a complete cross-development environment at little or no cost.

However, piecing together all the components necessary to build a system such as this isn't easy. Eclipse wasn't built to handle cross-development, or even the C or C++ languages typically used in most embedded projects. So a significant amount of effort is needed to get Eclipse to do this adequately. Eclipse also doesn't have any concept of a remote debug connection of its own. If a debug interface such as JTAG, or even an Ethernet or serial connection to a target-resident debug monitor, is used, Eclipse must be reconfigured to handle the situation. And the GNU tools required are typically available only in source format, and must be built for the particular host and target processor being used by a project. Getting these tools to build for a particular host/target combination can be difficult, consuming engineering time better spent on application development.

This article describes how to construct a free or low-cost cross-development environment for Intel XScale processors based on Eclipse IDE and GNU toolsets.

Debugging Using Free Tools
To build a functional, free, cross-development environment, you have to get several components and integrate them. The Eclipse development environment is the framework in which the other necessary tools are integrated. Eclipse itself includes an editor, project manager, and debugger interface. Since the environment is intended for embedded cross-development, the C and C++ languages must be supported. This means using the CDT plug-in for Eclipse (www.eclipse.org/cdt/). The assembler, compiler, linker, and other code-generation utilities will be provided by open source GNU code.

If the goal were to develop native applications in C/C++ using Eclipse then these tools would suffice. However, for embedded cross-development, a few more pieces are needed. Eclipse with a CDT plug-in has no concept of a remote debug connection to connect to an embedded processor. Zylin AS Consulting (www.zylin.com) offers an open source embedded CDT and another plug-in that together let the Eclipse debugger connect to a remote target via any debug connection (see the Zylin plug-ins section below). This debug connection is typically a JTAG, Ethernet, or serial connection. And if a JTAG connection to the target is needed, a method must be provided for the GNU Project Debugger (GDB) to communicate with the target using this interface.

The completed development system using a JTAG target connection is shown in Figure 1.

Building on Eclipse According to the official Eclipse Web site (www.eclipse.org), the Eclipse Foundation manages open source development of projects that "are focused on providing a vendor-neutral open development platform and application frameworks for building software." The Eclipse Foundation has created the Eclipse Platform that provides a feature-rich integrated development environment with a well-defined interface that allows additional features to plug in and work seamlessly with existing code.

Eclipse has rapidly gained favor among embedded tools companies because it provides a sophisticated IDE into which they can plug their tools and no longer have to worry about building and maintaining their own proprietary environments. The Eclipse Public License lets the creator of derivative works based on Eclipse retain their distribution rights so companies can focus on their core embedded competencies and still profit from their efforts.

This is excellent news for those trying to put together a free development environment. It makes a commercial-quality IDE available that has the backing and support of a large number of both embedded and enterprise software tools companies. However, as mentioned above, Eclipse by itself provides only a framework and some generic tools, such as an editor, code/project manager, and debugger interface. To construct a cross-development system, several more packages must be obtained and integrated into Eclipse.

C/C++ Development Tooling
Eclipse was originally developed in and for the Java programming language, and the basic framework is still specific to Java. Most embedded cross-development projects still have device drivers, operating system (OS) code, and applications written in C, C++, or assembly language. To make Eclipse compatible with, and useable for, C/C++, a sub-project called C/C++ Development Tooling was created to build a plug-in that would add these features to the basic Eclipse framework. This plug-in is available as a free download from Eclipse at www.eclipse.org/cdt/downloads.php.

With the Eclipse framework and CDT in place, the environment is capable of supporting and enabling code development in C/C++. However this environment will only work for native application development. For embedded cross-development, there are still some issues that must be addressed, primarily the handling of remote debug connections to a target processor. The Zylin plug-ins section discusses this problem further. An assembler, compiler, linker, and loader are also still required to generate downloadable code for the XScale target processor. The next section discusses using GNU tools that provide these utilities.

Free Software Foundation
GNU Tools

The Free Software Foundation makes free source code available for a wide range of programs and utilities, including a set of tools that together can provide everything necessary to build, link, load, and debug an embedded application. The combination of GNU binutils (www.gnu.org/software/binutils/), the GNU Compiler Collection (GCC) (http://gcc.gnu.org/), and GDB (http://sources.redhat.com/gdb/) provide a fairly complete toolset for building and debugging embedded applications. These tools can be used on their own for this purpose. The binutils package provides an assembler, linker, archiver, and several other utilities for code development, the GCC provides the C/C++ compiler, and the GDB allows the code to be downloaded to and debugged on the target processor.

The downside of using these tools as they are is that there's no graphical user interface (GUI) and no real integration of the tools. Used by themselves they basically provide a command-line interface. However, Eclipse with the CDT is capable of sufficiently integrating these tools into an environment with a GUI so most of the command-line use of the tools can be avoided.

The other problem with using the GNU tools for code development is that they generally come only in source form. Although the tools support a huge array of various target processors and just about any host OS and hardware one could imagine, the user usually has to configure and build them. This build process can be a time-consuming, frustrating experience, especially for someone who hasn't done it before.

Fortunately, several embedded tools vendors make available free pre-built versions of the GNU tools for ARM/XScale that can simply be downloaded and installed.

Zylin Embedded CDT Plug-Ins
An environment consisting of Eclipse, the CDT plug-in, and the appropriate GNU tools is close to being a functional embedded cross-development system. As mentioned above, however, Eclipse and the CDT don't support remote target connections to an embedded processor. They assume that debugging is occurring on the host machine. To download the embedded code from the host to the target and then connect to a debug agent of some type running on the target hardware, some changes must be made in the way the CDT handles debugging.


About Brian Handley
Brian Handley is a senior engineer at Macraigor Systems LLC. He has over 20 years of experience working with embedded systems. Brian holds BS in computer science and engineering from MIT.

ENTERPRISE OPEN SOURCE MAGAZINE LATEST STORIES . . .
Nathan Myhrvold's Intellectual Ventures (IV), the great patent vacuum, has a piece of Novafora's deal to buy Transmeta, according to a filing dropped off with the SEC. IV was apparently there at the bargaining table with Novafora, which makes digital video processors. It’s putting $1...
The two-year anniversary of the Novell-Microsoft alliance that scandalized the open source community passed quietly enough earlier this month. The pair waited a couple of weeks to mark the occasion and then said that in the second year of their arrangement they added upwards of 200 new...
Besides SUSE and its own brand of Linux, rPath is now supporting the Ubuntu and CentOS Linux operating systems as part of its rBuilder and rPath Lifecycle Management Platform. The move broadens the start-up’s options for deploying and managing applications in traditional, virtualized...
SCO filed a notice of appeal with the United States Court of Appeals for the 10th Circuit in Denver Tuesday. Yes, miracle of miracles it finally got a final judgment out of Utah District Court Judge Dale Kimball. That's the hall pass it needs to challenge his devastating summary judgme...
Fedora 10 is out and about. Fedora of course is Red Hat's freebie community OS and testbed for coming attractions in Red Hat Enterprise Linux. The new rev is supposed to have substantial virtualization improvements for remotely installing and managing storage provisioning and includes ...
The Fedora Project, a Red Hat sponsored and community-supported open source collaboration project, has announced the availability of Fedora 10, the latest version of its free open source operating system distribution. Fedora 10 features numerous leading-edge technologies and continues ...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE