Unlocked: embedding open-source software
A growing list of vendors is encouraging the use of open-source software, and embedded-system designers are now considering free, open-source software for operating systems, development tools, and applications.
By Warren Webb, Technical Editor -- EDN, May 15, 2003
|

Following the lead of start-ups and low-budget projects, the embedded-system-development community has now adopted the use of open-source software, which has gained a substantial foothold in that area. People have developed scores of high-volume consumer products with free software that anyone can download from the Internet. Readily available source code, innovative programming, easy adaptability, and zero recurring costs are a few of the reasons adopters cite for basing their projects on this alternative to proprietary software. Although free software may seem like a panacea, skeptics point to licensing and support issues that may dim the hopes of some product developers.
Open-source software programs are available free to the general public to use as they are or to modify for applications. Programmers typically create open-source projects as collaborative efforts in which the programmers improve the code and share the changes within the community. These projects rely on peer review of the software to locate and remove bugs. The most famous example and possibly the beginning of the popular open-source movement was Linus Torvald's Unix kernel clone, Linux. Torvald was the project leader and used the Internet to communicate with developers and update the code. With other open-source software from the GNU (GNU's not Unix) project, the Linux operating system has evolved into multiple projects encompassing dozens of commercial vendors and thousands of developers.
Though people once considered open-source-software development to be a part-time intellectual challenge for programmer hobbyists, it has become highly organized with collaborative participation from both individuals and some of the world's largest companies. These companies contribute the efforts of their employees to ensure that the future direction of software development matches their needs. For example, IBM, Apple, and Sun participate in open-source projects and also base several hardware and software products on the resulting code. IBM's Linux Technology Center employs more than 200 full-time programmers working on open-source projects, and longtime proprietary proponent Apple based its latest operating system on a free software core.
Free downloads
Linux and other operating systems are not the only open-source projects. Sourceforge.net, the largest Internet repository of open-source code and applications, lists more than 58,000 active development projects that you can join or simply download. In addition to operating systems, active categories include communications, database, office, multimedia, gaming, security, Internet, and software-development projects. The Sourceforge Web site provides free services to open-source developers, including project hosting and provisions for tracking versions, bugs, update requests, and patches. Sourceforge.net is part of VA Software's Open-source Development Network.
Open-source software has found favor with developers searching for ways to lower the recurring cost of embedded products. The royalties of a commercial operating system or third-party application-support packages, even at high volumes, consume an important portion of an embedded device's cost. One approach to lowering these recurring costs is to adapt one or more open-source programs to fit your application. This adaptation will probably add costs to the nonrecurring portion of the project; however, the overall savings may be significant at higher volumes. Users often cite this flexibility as a major advantage of open-source software over proprietary packages. With source code available, developers can create a software version that exactly fits their application, minimizing computing and memory resources. Conversely, proprietary vendors must create a product that works with the largest segment of their customer base and exactly matches the needs of only a few. Proprietary vendors correctly point out that the initial acquisition cost is but a small part of the life-cycle cost of embedded software (see sidebar "The cost of free software").
Open-source software also appeals to "roll-your-own" developers who have essentially written operating-system functions, such as task scheduling, networking, and user interfaces, into a single large application package. As the complexity of their embedded devices grows, these developers are struggling to meet customer demands while living within traditional development budgets. Open-source operating systems provide a low-cost technique for incorporating tested support software and concentrating development efforts on application-unique routines. Open-source operating systems may work with little customization and are mature enough that little risk arises in their adoption.
Although the easiest way to make software open is to release it into the public domain without a copyright, most developers prefer some formal licensing. Opponents of open-source software cite confusion and concerns over licensing rules that may force developers to reveal proprietary code, and their confusion may be justified: The Open Source Initiative Web site (www.opensource.org) lists more than 40 certified software-license types. In short, developers and copyright owners may distribute their software under the terms of any agreement that they deems appropriate. In fact, they may use multiple licensing agreements. For example, some agreements differentiate between commercial applications and nonprofit users, such as educational institutions.
No royalties
The most common open-source license is the GPL (General Public License) that Linux and more than half of the available projects use. The GPL allows you to download a free copy of the software, adapt it to your product, and sell as many copies as you want without paying royalties. If you modify and distribute GPL software, your modifications automatically fall under the GPL, and you must give the source code to anyone who asks for it. In the case of operating systems, such as Linux, your application programs and device drivers may remain private as long as they are separate and distinct from the Linux kernel and contain no GPL code. Sony, IBM, and Oracle are just a few of the large companies that accept the terms of the GPL and ship proprietary software compatible with an open-source operating system.
Many commercial-device developers choose open software carrying the BSD (Berkeley Software Distribution) license, which requires only that users retain the copyright and a standard liability disclaimer. Because of this minimal license, you can freely modify BSD software for use in proprietary or commercial products and keep the modifications secret. Several older BSD licenses include a clause that requires advertising materials to include a copyright acknowledgment; however, the Office of Technology Licensing at University of California—Berkeley deleted that requirement in 1999. A disadvantage of the BSD-type license is that several fragmented versions of the same base code may exist; for example, programmers derived a number of operating systems, including FreeBSD, NetBSD, OpenBSD, and portions of Apple's Mac OS X, from the original Berkeley Unix clone.
A third major open-source license is the Mozilla Public License, which allows developers to protect code and share it with others. Your divide your software and any modifications that you make into the protected portion and the open portion. You must distribute source code for the open portion and you can keep the protected portion confidential and distribute it only in binary form. The only restriction is that users can access the protected portion only through an API. The Mozilla Public License is a compromise between the fully open GPL and the more restricted BSD license.
In addition to licensing, developers of embedded systems raise concerns over the support available for open-source software products. You can easily download the source code and provide your own support and maintenance for small programs. However, with large code bases, such as those for operating systems, many developers prefer to have access to a knowledgeable support team. One advantage of an open operating system over the proprietary alternative is that the open system lets you competitively purchase support and even change vendors and retain the same software. For example, MontaVista Software offers the Professional and Carrier Grade Linux versions targeting the embedded-system-developer market. The Linux-based Professional Edition, an embedded-source, binary-distribution, cross-development platform, combines with a set of tool kits for x86/IA-32, PowerPC, StrongARM, MIPS, SH, ARM, XScale, and Xtensa microprocessor architectures. The Carrier Grade Edition, a high-availability version, targets telecommunications and carrier-grade applications. MontaVista sells its Linux products by subscription that provides the current software release; unlimited support by phone or e-mail; and access to a customer-only Web site that provides the latest updates, patches, tips, and a Linux-community forum. In addition, most subscription packages also provide training. LynuxWorks operates with a slightly different business model and offers both open-source and proprietary operating systems to embedded-system developers. BlueCat Linux, an open-source, embedded distribution supporting XScale, MIPS, PowerPC, ARM, and SH3 microprocessors, is compatible with the company's proprietary LynxOS for real-time requirements. A BlueCat Linux bundle with six months of support sells for $2699.
Fight fragmentation
MontaVista and LynuxWorks, along with IBM, Red Hat, Panasonic, and Sony, have formed the Embedded Linux Consortium to combat the fragmentation among source-code distributions that may cause applications to become incompatible. Their approach is to produce a platform specification that defines an embedded-Linux API. Application and middleware developers that follow the platform specification can certify that their products will work with any compliant Linux distribution. You can download the platform specification from the Embedded Linux Consortium Web site (www.embedded-linux.org).
Another source of free software, especially operating systems and support software, comes from embedded-single-board-computer-hardware vendors. Many vendors offer preconfigured open-source software to add value and help sales of their hardware products. For example, Ampro's EnCore PP1 embedded-processor module integrates Motorola's 300-MHz MPC8245 host processor with a 32-bit, 66-MHz PCI-bus interface; 10/100BaseT Ethernet, EIDE, serial, parallel, and USB ports; and a Motorola JTAG connection (Figure 1). To speed initial development, the EnCore PP1 comes in a QuickStart Kit that includes a certified TimeSys Linux distribution with device drivers, development tools, Windows and Linux workstation development environments, libraries, and a boot loader. The kit sells for $995 and is now available.
Along with the open-source software movement, embedded-system designers have made a few attempts at developing open-source hardware. For example, the small, embedded LART (Linux-advanced-radio-terminal) computer can run Linux, includes a 220-MHz Digital SA-1100 StrongARM CPU, and requires less than 1W of power (Figure 2). In a standard configuration, it holds 32 Mbytes of DRAM and 4 Mbytes of flash ROM, which is sufficient for a Linux kernel and a sizable RAM-disk image. The LART accepts an input voltage of 3.5 to 16V. The hardware for LART is not free, but the complete design, schematics, assembly drawings, documentation, and software are available for free download from the LART Web site. The developers have licensed the hardware design in a manner similar to that of the GPL for software, and you can duplicate it without royalties or a licensing fee.
Open toolbox
Budget-conscious designers can also find plenty of open-source software in the development-tool area. The GNU compiler collection and the GNU debugger are staples in most open-source distributions. Although the GNU tools are adequate for software development, they lack the bells and whistles of a commercial environment. Responding to that need, the Eclipse Project open-source software-development project provides a robust, full-featured, commercial-quality, industry platform for developing highly integrated tools. The CDT (C/C++ Development Tools) Eclipse subproject provides a set of plug-ins for embedded-software development (Figure 3). The CDT adds a C/C++ perspective to the Eclipse Workbench with a number of views, wizards, a powerful editor, and a debugger. The CDT provides an extensible architecture for integration of tools from independent software vendors. The Linux-based Kdevelop, another open-source C and C++ development environment, includes many of the features of commercial tools (Figure 4). You can get a free download from the Kdevelop Web site (www.kdevelop.org).
The CVS (Concurrent Versions System), another software-development tool, is the dominant open-source, network-transparent version-control system (Figure 5). CVS is useful for both individual developers and large, distributed teams and provides access to the latest code from anywhere an Internet connection exists. CVS uses an unreserved check-out model for version control, which avoids conflicts common with the popular exclusive check-out model. CVS-client tools are available on both Windows and Linux platforms. You can download CVS and its documentation from www.cvshome.org.
The open-source movement has caused even the largest proprietary software vendors to take notice and review their business models. Some vendors are offering access to source code, others are eliminating royalties, and others are releasing portions of their software to the open-source community. At least for the near future, all of these approaches will coexist as embedded-system developers scramble to meet explosive consumer demands for low-cost, smart devices to provide instant access to information from any location.
For more information...
When you contact any of the following manufacturers directly, please let them know you read about their products in EDN.
Ampro Computers
www.ampro.com
Apple
www.apple.com
Concurrent Versions System Project
www.cvshome.org
Eclipse Project
www.eclipse.org
Embedded Linux Consortium
www.embedded-linux.org
FreeBSD Project
www.freebsd.org
GNU Project
www.gnu.org
IBM
www.ibm.com
Kdevelop Project
www.kdevelop.org
Linux Advanced Radio Terminal Project
www.lart.tudelft.nl
LynuxWorks
www.lynuxworks.com
MontaVista Software
www.mvista.com
Motorola
www.motorola.com
NetBSD Project
www.netbsd.org
OpenBSD Project
www.openbsd.org
Oracle
www.oracle.com
Panasonic
www.panasonic.com
Red Hat Software
www.redhat.com
Sony
www.sony.com
Sourceforge.net
www.sourceforge.net
Sun Microsystems
www.sun.com
TimeSys
www.timesys.com
VA Software
www.vasoftware.com
Wind River Systems
www.windriver.com

















You can reach Technical Editor Warren Webb at 1-858-513-3713, fax 1-858-486-3646, e-mail 



