Linking hardware to OS functionality to speed development of GUI-based apps -

Linking hardware to OS functionality to speed development of GUI-based apps

This “Product How-To” article focuses how to use a certain product in an embedded system and is written by a company representative.

From industrial control to home appliances and handheld devices,there is a continuing trend towards embedding increasing degrees ofboth intelligence and connectivity into all kinds of end products.

This growing computing power and ability to communicate, of course,produces more feature-rich products; more than that, it has produced adramatic uplift in the variety and complexity of the interactionsbetween products and their human users.

At the same time, users' expectations have themselves increaseddramatically. Simple textual displays appear old-fashioned and'non-intuitive'. And products ranging from kitchen appliances to motorvehicles ” that only five or ten years ago were routinely operated viadials, push-buttons and electromechanical controls ” are nowgraphics-equipped. As a result, increasing numbers of embeddeddesigners are required to design relatively complex graphical userinterfaces (GUIs).

Software content and OSs
This move to more intelligence, more interconnectivity and moregraphics has in turn encouraged engineers to approach their designs ata higher level. Software content has become as important as hardwaredesign, and increasing numbers of designs contain not just significantamounts of application code, but also a compact embedded operatingsystem.

If the deployment of an operating system in a product such as akitchen appliance seems excessive, it is worth remembering the benefitsthat such an approach can deliver. These primarily centre on increasedproductivity in the development cycle, the availability andre-usability of device drivers and other commonly-used code blocks, andthe removal from the design team's shoulders of many of the low leveldetails of the design.

As a consequence, operating systems such as embedded Linux areincreasing in popularity, in particular for GUI-driven applications.Because it is free of licence fees and royalties, Linux itself isparticularly attractive in cost-sensitive applications; many developersalso appreciate its naturally robust nature, derived from the opensource nature of the software.

For the embedded designer tasked with building a connected,GUI-driven product, Linux also offers some specific advantages.Firstly, the operating system can be relied upon to handle the detailsof internetworking, at a level that is familiar to most programmers.The design team also gets access to a wide range of open sourcegraphics libraries such as GTK, as well as commercial products thatcommonly include GUI builder and font rendering tools, and higher-levelfunctionality such as OpenGL.

By removing the hardware dependencies from the application, Linuxprovides a standard development environment for the design team. All ofthe interaction and testing takes place on a standard PC, and the finalstep in the project is to recompile the source code for the appropriatetarget platform.

Hardware requirements
Of course, electing to pursue development at a high level ofabstraction is dependent not only on the availability of the high leveltools, but also on underlying hardware that can cost-effectivelydeliver the required processing power and peripheral features. In thisregard, microcontroller manufacturers are rising to the challenge ofGUI-equipped embedded designs with devices that include not only LCDand touch screen interfaces, but also hardware to accelerate specificimage processing operations.

Toshiba's TMPA910CRAXBG microcontroller (Figure 1, below ) is an example ofsuch a device. Based on a low-power ARM926EJ-S CPU core, the deviceuses a seven layer multibus architecture to achieve significantlybetter performance than other devices operating at comparable speeds atup to 200MHz. For the designer of GUI-based systems, the chip alsoincludes a built-in LCD controller that supports TFT and STN displaysizes up to 800 x 480 pixels. A touchscreen interface further reducesthe need for external components in such designs.

Figure1: Toshiba's ARM based TMPA910CRAXBG provides hardware support for TFTand STN touchscreens

In addition to the required peripheral set, the device also includesa hardware-based LCD data processor that accelerates image processingfunctions such as scaling, filtering and blending, and offers real-timeprocessing for movies at speeds up to 30 frames per second. A CMOSimage sensor interface simplifies the implementation of applicationsrequiring image capture.

Just as important is the controller's connectivity-based featureset, which includes SPI, UART, I2C, I2S, and a high-speed USB device(480Mbit/s). An SD host controller supports high-speed mode SD cardswith capacities up to 32GByte. The specification is rounded out with56KByte built-in embedded RAM for program, data and display memory,boot ROM, and a memory controller that supports SDR and DDR SDRAM. Upto 2.5GBytes of linear access space can be addressed.

Linux development platforms
Creating an effective link between powerful hardware features and ahigh-level, OS-based environment relies on a fully featured hardwaredevelopment platform and supporting software. To support applicationsbased on its TMPA910CRAXBG, for example, Toshiba provides a StarterKit and Reference board (Figure 2,below ) that combines the processoritself with a touchscreen display, Ethernet port, 480Mbit/s USB 2.0interface and RS232 connector.

In addition, an audio DAC is connected via the processor I2S bus.On-board memory comprises 512Mbit SDRAM, 256Mbit NOR Flash and 2GbitNAND flash. An SD card socket facilitates the use of portable storage.

Figure2. The development board is supported by a Linux development systemfrom Bplan GmbH.

The board is supported by a third-party Linux development systemdesigned by Bplan GmbH (and available through online registration)to create a complete turnkey Linux development and target system. Usinga powerful underlying virtualisation technology called Aura, theenvironment allows designers to instantly start writing Linux-basedapplications.

Aura provides the key link between the operating system and thehardware level, ensuring that developers can make full use of thefeatures of the TMPA910CRAXBG, while working at a higher level ofabstraction. Aura provides a virtualisation layer which offers a cleanhardware abstraction from the operating system.

This approach allows hardware and software development to proceedlargely independently, while adding no run-time latency or otherperformance penalty. In the event of a kernel change, it is possible toinstall a revised kernel that does not need to 'know' about hardwarespecifically developed for the project.

This concept is powerful enough to allow design changes at a verylate stage of development, offering designers great flexibility in theevent of, for instance, pricing on performance issues as the projectprogresses.

This is achieved by implementing the Aura abstraction layer as adynamic link library that loads on system start-up, and at run-time isexecuted within the context of the kernel. Processes such as enablinginterrupts are handled as function calls to the link library, providinga context-free entry point to the abstraction layer with effectivelythe same calling overhead as making a simple function call within thekernel itself.

The Aura abstraction itself includes all of – and only – thefunctions required to bring up the basic Linux operating system itself.This keeps code size small, while still providing complete independentoperating system support.

In addition to the abstraction layer, the Linux support package isdelivered with a complete set of device drivers, and gcc cross-compilerdesigned to run on a standard PC.

Also included is the complete root file system needed to boot thedevelopment board: this is hosted within the development system on anNFS volume, allowing the developer to make changes only within thelocal system and finally to convert to a binary format for export tothe target board. This approach allows minor changes to be made locallywithout the need to re-download the entire system to the board on eachrevision.

The resulting system creates an environment that can be run'out-of-the-box', and ensures that there is genuinely no differencebetween application programming on an x86-type, desktop-hosted Linux,and a Linux kernel hosted on the ARM core within the Toshiba platform.

Comprehensive support platforms that bring together hardware andoperating system functionality allow developers to speed thedevelopment of interconnected, GUI-based applications. In particular,by using these platforms developers can focus on adding value to theirproducts, rather than dealing with the low-level details ofimplementations and hardware/software interactions. In low-costproducts such facilities, coupled with the licence- and royalty-freenature of Linux itself, allow the designer to implement rich,innovative human-machine interface systems without significant cost ortime overheads.

Roland Gerhmann is with Toshiba Electronics Europe and Gerald Carda with Bplan GmbH.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.