The NetBSD operating system offers portability, networking and licensing advantages to embedded device OEMs. But NetBSD currently lacks an integrated development environment (IDE) that's as sophisticated as proprietary systems. The lack of an IDE is attributable to NetBSD's open-source heritage and its traditional focus on TCP/IP networking. From its inception in 1993, NetBSD has been recognized as one of the best-architected Posix-compatible OSes available. Net-BSD sources are derived from original Berkeley Unix implementations (BSD 4.4 Lite), and NetBSD developers apply the highest standards for portability and clean system design. Further, NetBSD maintains a highly regarded TCP/IP stack, and it is often considered the reference implementation of this protocol suite. For those reasons, NetBSD has traditionally been deployed in a networking infrastructure, a context in which an IDE was not essential.
During the last few years, this situation has changed. As embedded hardware has become more powerful and the requirements for consumer products have become more complex, NetBSD has found utility in an array of embedded projects (especially networked products) including cameras, print engines, wireless access points and storage devices. Three factors account for the increase in NetBSD adoption in the embedded space: networking functionality, platform support and licensing. NetBSD now runs on approximately 40 processor architectures with a firmware footprint on the order of 1 Mbyte, and NetBSD may be easily ported to new architectures due to the system's unique modular portability layer.
Finally, NetBSD has gained traction because it provides a "third option" for OEMs forced to choose between expensive, royalty-driven proprietary systems on the one hand, and Linux on the other. While Linux's performance features are adequate for many embedded applications, its strict general public license (GPL) terms are often highly problematic, as evidenced by the recent spate of GPL-related litigation. The GPL requires that any modifications to the Linux kernel (or other software covered by the GPL, which includes thousands of modules and applications) must themselves be made open-source. This provision has left many OEMs wary of Linux in general, because kernel modifications and similar development often represent strategic intellectual property (IP). Moreover, many OEMs worry that releasing OS code may allow competitors to reverse-engineer the configuration of the underlying hardware. Finally, because the GPL is viral in nature, it may "infect" OEM-created software and create large-scale IP issues for vendors.
In contrast to Linux, the NetBSD kernel is covered by the "business-friendly" BSD license, under which OEMs may freely use, modify and productize Net-BSD without revealing source modifications. While many NetBSD-based OEMs have chosen to make their code open source, many others have not.
While these factors have caused NetBSD to gain traction in the embedded space, the command-line tool chains used to build NetBSD kernels and applications are sometimes insufficient. Indeed, many project design teams now insist on working within an IDE so that the system code, middleware, tool chain, debug facilities, image-generation tools and product IP all work together seamlessly. This article discusses efforts at Wasabi Systems, an embedded OS firm specializing in NetBSD development, to build such an IDE for the NetBSD operating system.
One of the first considerations in the creation of an IDE for NetBSD was to choose development hosts to support and the attendant portability considerations. While most dyed-in-the-wool NetBSD developers will work from IA32 hosts running NetBSD, the general market has become decidedly Windows-centric. Consequently, Wasabi's IDE was specified to run on Windows, as well as on Linux, Solaris and even MacOS X hosts, with identical functionality and similar look and feel on all these platforms.
The second major consideration in this project was how best to deliver a professional user experience. Wasabi was committed to matching or exceeding the standards of Microsoft and Wind River development environments. It was Wasabi's perception that the OEM community has become used to Visual Studio style interfaces, and that delivering anything that didn't match the power and usability of the Microsoft IDE would be unacceptable.
A third issue in the IDE design was extensibility. While the immediate goal was to create a portable and powerful interface for NetBSD's existing command-line tools, the goal of the IDE is to create a complete framework for the rapid development of embedded products. Therefore, the IDE for embedded Net-BSD development should ultimately support preconfigured product reference designs, interface with hardware debugging probes and possibly even support such endeavors as product benchmarking and documentation.
The final consideration was to focus on the creation of value specific to Net-BSD development by leveraging open-source components. Developing an IDE is a big undertaking, and to the extent possible, Wasabi did not want to have to spend resources implementing the most generic portions of an IDE's functionality.
To achieve maximum host support, a variety of portability considerations had to be taken into account. Chief among these were the underlying tool chains. NetBSD uses a modified version of the Free Software Foundation's GNU tool chain in its build framework, and as a consequence, NetBSD can theoretically be built from any number of supported hosts. As of release 1.6, NetBSD has the build.sh facility to create cross-hosted tool chains from almost any platform, although building a NetBSD distribution under Cygwin is still tricky. By providing precompiled tool chain binaries with the IDE, Wasabi removes the need to understand such configuration issues. The result is that OEMs will be able to use Wasabi Workbench to develop, test and debug NetBSD kernels and applications exactly the same way on Windows, Linux, Solaris and MacOS X hosts for all leading processor architectures including: XScale, IA32, PPC, MIPS, SH and Sparc.
To meet the goals of portability, reliability and maintainability across multiple systems, Wasabi decided to develop its IDE in Java. While Java solves portability problems for Windows, Linux, Solaris and MacOS X, it can often introduce usability problems. One of the best known of these difficulties is the more primitive look and feel of controls produced using Sun's AWT and Swing widget sets. While the controls are portable, they often look awkward and tend to detract from the user's experience. Another problem with large Java applications is that they are interpreted and can consequently have long startup times.
Wasabi was able to resolve all of these problems by standardizing the design of its IDE on the Eclipse IDE framework provided by Eclipse.org.
Eclipse Project has helped Wasasbi deliver an IDE that matches the functionality of proprietary offerings of Microsoft and Wind River. Eclipse is designed as a modular framework, with individual modules implemented as Java classes.
Finally, Eclipse provided much of an IDE's generic functionality in an extensible framework, so Wasabi could focus on adding NetBSD-specific value to the IDE. For example, the Eclipse framework provides state-of-the-art facilities for C, C++ and Java development, such as intelligent editors and resource viewers.
As a result, Wasabi Workbench is able to support automated configuration of bootable NetBSD flash images, permits debug and post-mortem connections specific to the NetBSD tool chain, and permits run-time monitoring of the NetBSD kernel for profiling, task monitoring and performance analysis.
Ross Harvey (firstname.lastname@example.org) is Chief Architect, IDE Products and Bruce Woodson (email@example.com) is Director of Professional Services at Wasabi Systems in New York.