Free software encircles embedded design
With potentially huge savings on operating software, development tools, recurring royalties, and schedules, designers and managers must at least consider open-source software on each new embedded-system project. A wide variety of open-source software has gained a foothold just as the embedded-system industry moves from limited-resource designs to high-performance systems with complex applications that may require new software functions, such as high-speed networking, wireless communications, interactive graphics, and data encryption. Developers can save thousands of man-hours of development costs by integrating freely downloadable operating systems, libraries, and components with their application-specific custom software.
Designers can choose from a variety of open-source-software components ranging from multiple variations of the wildly popular Linux operating system to sophisticated debugging tools. SourceForge.net, the largest open-source-software-development site, provides free hosting to more than 180,000 registered projects, including database, security, gaming, clustering, multimedia, and VOIP (voice over Internet Protocol) offerings. Before you jump on the bandwagon and start downloading free code, however, take a close look at the open-source characteristics that make it popular and the problems that designers cite as reasons to stay away. Customization, support, licensing, fragmentation, hardware costs, development tools, and real-time performance are just a few of the issues that can influence your decision.
The initial task for embedded-open-source-software users is to adapt the code to work with a specific hardware configuration. By their nature, open-source products must fit the widest array of users, so they require generalization and do not target one application. This generalization can force designers to increase the memory system, and, unless the lack of royalties offsets it, this extra memory requirement translates into a higher recurring cost for the embedded device. Most commercial off-the-shelf board vendors now offer preconfigured open-source board-support packages for their products. For example, WinSystems provides a customized open-source-development kit with its off-the-shelf board-level products, which includes device-specific drivers, documentation, cables, and a quick-start guide (Figure 1). The kit also includes Blue Collar Linux, a basic embedded implementation of the Linux operating system that you can re-create from open-source files without special or proprietary development tools.
Fix my code
The biggest complaint among potential open-source-software users is the lack of a central resource to provide support similar to that from a commercial-software vendor. Developers can often find answers to their questions through the Internet, but no one is on the hook to research and respond to questions. The alternatives are to develop an in-house support team or to contract with a third party. Although many in the industry widely perceive open-source software as free code, many designers are willing to pay for expert support, specialized tools, customization services, and prepackaged configurations to ease the development process. Commercial vendors have responded with custom embedded configurations, subscription-support packages, development-tool kits, and sample applications to augment the free code. For example, MontaVista Software offers contract-support services for embedded-Linux users on a subscription basis.
Another danger that developers see in the embedded-open-source-software environment is the potential for code fragmentation. If one developer decides to patch the open-source code to solve an integration problem and another developer makes a similar but incompatible modification, there are now three versions of the code. Applications a developer writes for one version may then be incompatible with the others. Because vendors usually ship the operating system along with the application in embedded devices, fragmentation is more of a concern to developers than to end users. Other than with specialty versions, such as real-time Linux, the Linux-open-source community has been successful in preventing the existence of multiple versions through an elaborate system of upgrade proposals and releases.
In general, open-source software is not in the public domain, and you must adhere to the rules that individual licenses set forth as a condition for use. The OSI (Open Source Initiative) maintains the complete text for more than 20 open-source-standard licenses that serve the community. As an example, Linux is licensed under the popular GNU GPL (general-public license) with detailed requirements for its use. 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. Although many embedded-system developers shy away from Linux because they worry that they may have to reveal the source code to their proprietary software, 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. This code isolation is a constant source of anxiety among developers, especially those who develop small-footprint embedded systems in which all software links together in a single ROM image. Even with these restrictions, you can download a free copy of Linux, adapt it to your product, and sell as many copies as you want without paying royalties.
Although standard Linux is by far the most popular open-source operating system, it may not fit some embedded-system applications. Linux is a general-purpose operating system and includes a huge code base that users must tune to the hardware and requirements of their embedded devices. Most Linux distributions support a variety of architectures and protocols but require as a minimum a 32-bit processor, 2 Mbytes of RAM, and 1 Mbyte of ROM. To reduce these resource requirements, the Embedded Linux/Microcontroller Project developed the µClinux (microcontroller-Linux) derivative of the Linux kernel for microcontrollers without MMUs (memory-management units). The µClinux kernel supports a variety of microcontrollers, including many from ARM, MIPS, and Freescale, along with Analog Devices’ BlackFin, Intel’s i960, and Hitachi’s H8 processors. You can find a complete list of supported processors, detailed tutorials, and source code at the µClinux Web site. NetBSD (Berkeley-software distribution), another open-source operating system, has gained some traction with embedded-system developers. NetBSD is a free, secure, and portable open-source version of the BSD computer operating system, a derivative of Unix. The NetBSD kernel requires a processor with an MMU and consumes resources similar to those of standard Linux. The BSD license is more liberal than that of GPL, allowing developers to retain proprietary code.
Deterministic response to real-time inputs is another important issue for embedded systems. Although the latest version includes a rewritten process-scheduler algorithm to speed task switching in multitasking applications, Linux may not be the operating system of choice for real-time projects. A better open-source, royalty-free choice for embedded applications with both limited resources and real-time requirements is the eCos (embedded configurable operating system), which RedHat software originally released. It targets devices with a memory size of a few hundred kilobytes and runs on processors from a variety of vendors, including ARM, Hitachi, Motorola, MIPS, NEC, and PowerPC. The eCos license is a slight modification of the GPL and does not require users to release application source code. It also prevents any user from making a few small improvements, calling the result a completely new system, and releasing this system under a different license.
The hottest news in the open-source-software market is the ongoing battle over portable operating systems for platforms such as smartphones and mobile Internet devices. Late in 2007, Google and more than 30 partners announced plans for the Android mobile platform, an open-source-software stack for mobile devices that includes a Linux-based operating system, middleware, and key applications. The Open Handset Alliance will manage the source code for the complete package and will release it when Version 1.0 is complete. Taiwan’s HTC Corp is working on an Android-based handset and expects to release it in the fourth quarter of 2008. With its announcement, Google also launched the Android Developer Challenge, which will provide $10 million in awards to mobile-system applications using the Android platform. Winning applications from the already completed first phase included a range of subjects, such as communications, social networking, music, and information delivery. You can download the software-developer kit and device emulator from Google’s Android-documentation Web site (Figure 2).
The LiMo (Linux Mobile) Foundation provides another open-source-smartphone platform as an alternative to Android. LiMo’s goal is to supply a “truly open, hardware-independent, Linux-based operating system for mobile devices.” Although the foundation released Version 1.0 this year, it postponed the release of full multimedia and portability features until 2009. LiMo’s focus is on creating middleware for device manufacturers and publishing the APIs (application-programming interfaces) for application developers (Figure 3). Several handset manufacturers, including Panasonic, Motorola, and NEC, have adopted the LiMo operating system. Lending support to the platform, the LiPS (Linux Phone Standards) Forum and mobile-carrier Verizon recently joined forces with LiMo. Although the LiMo Foundation touts the operating system as an open-source platform, you must be a paid member of the foundation to access the code base.
In other recent news that may rattle both the Android and LiMo camps, several large cell-phone manufacturers, including Nokia, Sony Ericsson, and Motorola, announced that they will combine their fragmented Symbian operating systems into one open-source platform. Although to date the operating system is not in wide use in the United States, there are thousands of Symbian-application developers worldwide. With AT&T, Samsung Electronics, Texas Instruments, and STMicroelectronics among its members, the Symbian Foundation promises to be a formidable competitor in the emerging open-source-mobile-system battleground.
As embedded devices continue to grow in complexity, the software-development task has become the largest element of a typical project budget. Graphical interfaces, network protocols, and data security are just a few of the new requirements that design teams can find as additions to their custom application software. A mounting number of designers are turning to royalty-free, open-source platforms with these and other features built-in. In fact, millions of lines of free-to-download software are available on the Internet to support every type of embedded-system-development project. As soon as the bulk of designers get past the collective learning curve and shape in-house expertise, open-source software could become the foundation of the embedded-system industry.