News & Analysis

Linux, Java team up for net enabled handhelds

Michael Mathews, Senior Product Marketing Manager, MontaVista Software, Inc., Sunnyvale, Calif.

4/1/2002 7:55 AM EST

Linux, Java team up for net enabled handhelds

The combination of an embedded Linux OS and Java technology offer developers a new choice for flexible project deployment. Thanks to the emergence of support organizations that have focused on the problems experienced by embedded developers, an array of connected device platforms can now support execution of Java applications.

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.

But there are numerous choices for middleware, most available as individual components such as protocol stacks, graphics development tools and managers, and special OS services such as high availability and real-time extensions. While using any of these individually is not too difficult, as the number and variety increase there is an inevitable impact on developer productivity and delays during integration, test, and debug caused by the added complexity in the stack.

Initially designed to address these issues in the desktop and server market, Java technology has begun to find wider acceptance as the application environment for embedded projects. Providers of Java technology have already done this integration for several standardized facilities, including communications, security, and component management.

The object-oriented nature inherent in Java application design allows all of these disparate middleware services to be dealt with in an efficient and well-organized way. Other middleware environments offer the same kind of abstraction from the details of the underlying implementation, but none with the broad industry support of Java.

The use of native code has significant implications in terms of the portability of applications and the ability to reuse code. A well-engineered interface between the Java application, virtual machine and underlying hardware, brings the best of all worlds to embedded compatibility. Native code, while not portable, may be the best solution for many functions and device interfaces. Adding standard communication, post-development component management, new user interfaces, and security features would be quite expensive and time consuming in C, C++, or assembler. The Java base libraries provide these things and more, which can speed development.

The next generation of embedded project developers will need to deal effectively with the complexity and power of connected network attached devices. Java technology implements access to TCP/IP communication component stacks — much of the work to enable communications support has been completed, and done in a well-understood and standard manner. Developers can take advantage of standard tools and a wide variety of underlying code to build network-centric services on top of a well-established network infrastructure.

A properly implemented embedded RTOS must form the core of the embedded Linux/Java platform. Embedded devices pose several restrictions and constraints on an operating system, device drivers, and other foundation components. It's important to work with a version of Linux that has been specifically implemented with embedded target platforms in mind. Not just any Linux will do.

Special attention should be paid to the management of scarce embedded device resources like RAM, ROM, and Flash. Where processor features are lacking — for example floating point math accelerators — it's necessary to provide efficient and seamless implementations that run on the hardware that is available.

Since embedded Linux must adapt to the unique resources available on a target device, it is important to be able to quickly and efficiently rebuild and restructure the Linux operating system image. This allows developer/engineers to add, remove, and reconfigure Linux features that will be needed by the virtual machine and Java applications. In embedded deployment, every aspect of the device and application must be considered in the tradeoff between size, speed, and resource constraint.

Embedded platforms are nothing like the standardized personal computer or server targets for which enterprise and workstation variants of Linux are designed. In particular, special attention must be paid to enabling access to devices on embedded targets. Uniform access to communications ports, flash memory arrays, display devices, and sound interfaces must be enabled.

And, thanks to the broad experience embedded that RTOS developers have had with Linux deployment, several embedded-oriented standards have evolved for use on these devices. These standards encompass low overhead display device management and communications interfaces.

The combination of an embedded Linux OS and Java technology has delivered a new level of efficiency for constructing graphic user interfaces that can be rendered on touch screen equipped LCD display devices. Low cost, compact size and often in color, these display devices are attractive to both consumers and product designers. Many pervasive designs will deliver user interface convergence on convenient handheld or settop-box devices, allowing control and visibility to a large array of headless connected embedded platforms deeply embedded in appliances, vehicles, and communications devices.

Graphic user interfaces tend to be deployed on embedded platforms on either bitmap-based coarse icon-based forms or window control oriented frameworks. Unlike server or workstation-based Linux, which often implements the server/client oriented "X-Windows" user interface framework and one of several alternate window managers, embedded Linux offers an efficient and direct approach. MontaVista Linux, for example, incorporates the open source package "MicroWindows" ported to run on many supported processor/device platforms. This package runs directly on top of the Linux frame buffer, providing a low-level hardware interface that is very close to the device hardware. It is designed for high performance on embedded processors and can be used to create very responsive interfaces.

Almost every development platform and embedded computer includes communication interfaces. A basic part of the task of Linux porting is to make drivers available for RS-232 serial communications and Ethernet if the devices are present on the board.

Communications is either based upon the TCP/IP communications stack provided in Linux or on raw manipulation of simple serial or bus interfaces. The TCP/IP stack provides access to the Internet and socket interfaces for implementing session-oriented program-to-program communications.

Specialized communications buses and devices that directly attach to the serial device can be manipulated directly through classes provided as extensions to the Java class libraries. This could include devices that interface with automotive buses like CAN, MOST or IEEE J-1850.

During development, some devices may be accessed directly through serial connections. Examples include cell phones, car radios and GPS units. These devices are controlled through specialized protocols that are transported over the serial link. In production, these devices may actually be attached to an automotive communications bus. For this reason, a layered architecture is needed for device control. IBM has created device kits that can provide hardware simulation, and alternate transport techniques so that the programs written on development platforms can be directly moved into production designs.

Port combinations using Java technology and an embedded Linux OS are now available on a large number of embedded targets. The developer can configure and scale the virtual machine and Java class library components as well as the embedded Linux RTOS, according to the needs of the project. Device drivers can be included as needed, while still retaining a uniform approach to application development and deployment for many related devices.





Please sign in to post comment

Navigate to related information

EE Buzz DesignCon

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)

Feedback Form