Article: Embedded Linux and Java — made for each other
May 25, 2001 — by Rick Lehrbaum — from the LinuxDevices Archive — viewsForeword: This whitepaper discusses the teaming of Linux and Java for embedded applications. It looks at the strengths of each on its individual merit, and explores the benefits of the synergy between them. Additional topics covered include Java's place in the total software stack, platform and processor coverage, available development tools, execution engines, optimization tools, and… deployment models.
Why Linux?
Developing an embedded application in today's fast-paced markets requires making many decisions that will be key to project success. These include decisions about the processor and platform to be used, the enabling software stack, and development tools — plus considerations of the product's features, functions, and life cycle. Once the product is in development, changing any of these decisions can be costly both in terms of dollars and time-to-market. Consequently, correct decisions at the onset of the project help maximize the probability of success.
Processor and platform choices for embedded applications are often dictated by the application design goals, allowing little or no latitude. Fortunately there is a wide variety of processors and platforms to choose from, including numerous “commercial off the shelf” (COTS) choices as well as custom designs from most of the leading silicon and board vendors. Although processor choice is fundamental, often the choice of development platform poses a greater challenge. Many projects deploy on COTS boards, but most use a custom board to meet form-factor and/or functional requirements. This usually means that applications are developed on a suitable reference board that supports the features anticipated on the custom board. Finding a board that meets the design goals-one that is supported by good software infrastructure–is not a trivial undertaking.
Once the platform is selected, an enabling software stack must be chosen. The first challenge is to find a reliable and robust operating system that supports the platform, offers the support and tools needed by the project, has flexibility enough to support any special project requirements, and allows for affordable deployment of the eventual outcome of the project. However, the wide range of available processors makes it difficult for the project to find OS vendors to support the processor you choose. Most OS vendors with a proprietary solution are unable to keep up with the rapid growth in the number of processor architectures and boards. They must choose to support a limited subset of available hardware, to maximize the return on their development investment due to their dependence on the royalty-based business model.
The availability of open source options has eased this problem somewhat, but most vendors of proprietary solutions offer it only as a fall-back if their proprietary OS cannot meet the requirements. These secondary options are often limited by the effort the vendor is able to put into them. In many cases there is no board support package for the board(s) chosen, necessitating the creation of a new package, if the vendor is willing and able to do so. Additional complications arise in the face of such issues as support for special I/O devices and for compatible platforms for the development of next generation applications.
Of course it is possible to build your own OS using one of the many open source options, perhaps even including many features of commercial RTOSes. But for most companies this is not a real option. Building the software stack draws resources away from the building of products. An attractive alternative for the project developer/manager is to select a software stack based on embedded Linux. When properly adapted for embedded applications, Linux offers the project manager and developer a better option on which to build the embedded solution.
The Linux environment has become extraordinarily popular in recent years, resulting in much interest and activity in Linux development and component extension. As the core Linux technology evolves to address new requirements, the infrastructure continues to grow, providing support for numerous new devices, technologies, protocols, and services. Most of the work to integrate Linux with various platforms will be done by the provider of the embedded Linux port. This work addresses the driver development and integration necessary to fully support the features and functions of the board. Although most embedded Linux vendors base their work on open source components, few deliver a product that is 100% open source.
An example of this approach is Hard Hat Linux, a development and deployment platform for embedded applications. Embedded Linux ports share many characteristics with desktop and server releases of Linux, including reliability, openness, and performance. MontaVista augments standard Linux with many features targeted at embedded systems development. Although developed by MontaVista, these enhancements are given to the open source community for inclusion in relevant open source code trees, thereby contributing to the overall growth of Linux. Examples of this work include:
- System boot and application execution without console (headless)
- Flash memory boot and diskless operation
- Scalable Linux kernel with ROM footprint down to 500K bytes
- CompactPCI system and I/O board support
- CompactPCI back-plane networking (Hard Hat Net)
- Support for custom designs and embedded production form factors
- Compressed flash boot support
- PCIMG basic hot swap support
Of course the selection of a software stack for the project goes beyond the OS. In today's competitive market developers need well-engineered and implemented development tools to enhance productivity and support collaborative development that may span several development teams and locations. Many applications require access to low-level functions best implemented in C, C++ or assembler. Standard tools such as gcc, kgdb, gdb and ddd are expected. Enhancements that help with target application configuration, testing, and debugging are necessary to optimize the results. Tools to support the porting of applications from a legacy RTOS are also available and can greatly ease the task of migrating to embedded Linux.
Another consideration is that of a middleware environment, which can simplify and accelerate the development of new application software, but which also allows taking advantage of legacy program code or specialized high efficiency modules (sound/image manipulation, graphical user interface, speech interpretation, etc.). In this regard, embedded Linux is supported by a variety of options for supporting Java.
Story navigation . . .
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.