News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Embedded Linux and Java — made for each other (Part 3)

May 25, 1997 — by Rick Lehrbaum — from the LinuxDevices Archive — views

The Synergy of Java and Linux

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 must 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's 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. Thanks to the broad experience embedded RTOS developers have had with Linux deployment, several embedded-oriented standards have evolved for use on these devices.

These standards include . . .

  • Low Overhead Display Device Management

    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, 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 set-top-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's Hard Hat 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's designed for high performance on embedded processors and can be used to create very responsive interfaces.

    IBM's J9 and its Java class libraries were adopted for MicroWindows by MontaVista. Thus, several embedded device targets have uniform graphics support available. IBM has provided two basic graphics class libraries: the Simple Window Toolkit (“SWT”) and “MicroView.” AWT graphics specified by personal Java platform configurations runs on top of the SWT graphics layer, as do several browsers and related XML-based rendering tools. SWT is used to create layered user interfaces with complex window controls. The lightweight MicroView framework is used to create the coarser image/icon-based user interfaces favored on simple embedded devices.

  • Communications Interfaces

    Almost every development platform and embedded computer includes communication interfaces. It's a basic part of the task of Linux porting 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 TCPIP communications stack provided in Linux or on raw manipulation of simple serial or bus interfaces. The TCPIP 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.

Flexibility

Port combinations using Java technology and an embedded Linux OS are now available on a large number of embedded targets. The developer/engineer 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. This method allows improved program code reuse on a large range of devices from deeply embedded headless servers through user interface rendering platforms. From the smallest to the largest embedded device, the combination of a Linux OS and Java technology is very scalable.

Vendor Support

Much of the cost of a project occurs after development is complete and the product is deployed. This support expense can relate to the product consumer in many ways.

The developer's relationship with the supporting Linux and Java technology vendor is key when considering embedded Java code. It's typical for the Java development engineers to have worked with the Linux vendor when doing initial ports of the virtual machine and Java class libraries to the embedded Linux target platforms. The ongoing relationship between Linux and Java vendors is an important consideration. It's also important, especially in the open source environment of Linux, to be able to access the source for Java class libraries in the various configurations being considered for a project.

Continued



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.



Comments are closed.