Vision & Sensors

Embedded Web 2.0

September 1, 2009
/ Print / Reprints /
ShareMore
/ Text Size+
Linux is directly compatible with standard Web 2.0 tools: networking, database management and programming languages.



There are plenty of embedded systems that need high-end operating system features. Think about the factory-floor inspection system that needs a classy graphical user interface, or huge amounts of disk storage or high-end networking to do its job.



For years, Windows has been creeping into factory environments for this reason. People are familiar with the interface, a semi-infinite number of third-party software add-ons are available, and the hardware platforms needed to run Windows are ubiquitous.

But many systems need more of a real-time processing component that Windows just won’t deliver. In the machine vision space, my home, most of the latest products from the big vendors seem to be Windows-based software applications, and while these are very well designed and powerful, the increasing complexity and bloat of Windows itself interferes with embedded system design.

Many of the embedded systems I design are what we call “deeply embedded systems.” These are embedded systems that typically use central processing units (CPUs), which cost only a few dollars and have no operating system at all. Every software operation is hand coded, including all of the operating-system-like functions, since the processors are too small to handle larger operating systems, and many of the operations performed are often so time critical that even an extra microsecond of latency is unacceptable.

But the world is full of moderately embedded applications that don’t really require a deeply embedded treatment, but which are not adequately served by a Windows-based approach. And this is where my new pal Linux can come in.

Building a real-time operating system (RTOS) based on the Linux kernel is now a generic concept that people refer to as RT Linux. There are basically two ways to get there. First, you can build your own system using the open source Linux RT patch. This is a constantly evolving kernel upgrade that adds a plethora of real-time features, such as priority control, forced kernel preemption, high-resolution timers, latency control and event timing to the “standard” open-source Linux kernel. If you’re an operating system aficionado, you’ll have great fun getting all of these bits and pieces and playing with them. For more information, check out rt.wiki.kernel.org.

The other path to RT Linux just requires a credit card. More vendors are developing complete RT Linux products that are preconfigured and tested for your own embedded computer system or single-board computer (SBC). These vendors have done the heavy lifting and due diligence required to integrate the kernel, the RT technology, the device I/O and drivers, the development tools and the communications protocol stacks. Using a complete package like this saves weeks up front and untold hours of debugging later on.

There are several big players here. MontaVista (www.mvista.com) really wrote the book on RT Linux and provides complete products with well-integrated board support packages (BSPs). Wind River (www.windriver.com) is a familiar player in the RTOS scene known for its proprietary VxWorks RTOS. The company was just acquired by Intel and is undoubtedly going to grow its RT Linux presence, having already released a nice RT Linux product. LynuxWorks (www.lynuxworks.com) is another well-known RT Linux vendor with well-supported and documented products. Embedded Alley (www.embeddedalley.com), started by former MontaVista employees, was just acquired by Mentor Graphics and provides custom RT Linux for a variety of platforms. And there are new players all the time.

A word about technology: There are basically two ways to get Linux to be an RTOS. In one approach, you streamline the kernel, redo interrupt handling and prioritization, push kernel task priorities lower, and add hooks to allow operators to create high-priority, uninterruptible processes and segments.

The other approach is to “virtualize.” That means you run another RTOS that is in charge of everything and which executes Linux simply as one of its tasks. This gets you the benefits of using Linux for processing, networking and user interface without risking real-time performance for those tasks that are super critical. Over time, I expect both of these approaches to be available in all commercial RT Linux. But, for now, you need to study each potential product to see what the vendor’s choices have been if you want to evaluate how truly RT the RT Linux is. In the “virtualizing” approach, your critical tasks may need to run under some OS other than Linux.

Web 2.0

Another advantage of Linux is that the standard Web 2.0 tools, networking, database management and programming languages were all developed in, for, and around UNIX, and, as such, are all directly compatible with Linux. Want your embedded system to have a Web page interface for configuration or monitoring? No problem, your embedded Linux can run Apache Web server and be its own server. If Apache is too large, embedded developers can opt for “lite” versions of Apache, especially Boa (www.boa.org) or thttpd (www.acme.com/software/thttpd).

Then there are the programming languages. Once you are in the Web 2.0 world, you have access to Java, PHP, Perl and Python-strange hybrid languages that use combinations of interpretation and compilation to take advantage of the inherent client-server nature of Web applications. In other words, the remote system that is accessing the embedded system can be called upon to do much of the work in graphing, saving, sorting or presenting data since its browser becomes a computing resource for the embedded system. The embedded system sends HTML data to the remote system that forces its browser to do huge amounts of work-but in a safe, standards-based way.

In the old days, if I wanted a specialized, beautiful user interface for my embedded system, I would implement a custom application (perhaps in VisualBasic) to provide all of the UI functionality. Now, thanks to Web 2.0, my embedded system can just publish dynamic Web pages and a standard browser on the remote machine is commanded to do all of that work. This is arguably cleaner and easier to maintain, and there is never a problem of keeping the client-side application version in sync with your embedded firmware revs.

So, the next time you have a project that isn’t deeply embedded that needs nice data reporting, storage, user-interface or monitoring functions, try out RT Linux and Web 2.0 technology. You will be amazed at the nice smooth feel that a “real” operating system gives, even on small hardware. Software development in Linux provides rich tools such as the Eclipse IDE and great debugging facilities. And the user interface options that the architecture opens up create real opportunities for streamlining the development of high-performance, complex, quick-turn embedded applications.

Did you enjoy this article? Click here to subscribe to Quality Magazine. 

Recent Articles by Ned Lecky

You must login or register in order to post a comment.

Multimedia

Videos

Podcasts

 In honor of World Quality Month, we spoke to James Rooney, ASQ Past Chairman of the Board of Directors 2013, for his take on quality around the world.
For more information, read the ASQ Speaking of Quality column.
More Podcasts

THE MAGAZINE

Quality Magazine

cover_image

2014 April

Check out the April 2014 edition of Quality Magazine for features!
Table Of Contents Subscribe

Manufacturing Process

Has/does news about a manufacturers’ recall (like the GM recall in the news now) cause you or your company to reexamine its manufacturing process?
View Results Poll Archive

Clear Seas Research

qcast_ClearSeas_logo.gifWith access to over one million professionals and more than 60 industry-specific publications,Clear Seas Research offers relevant insights from those who know your industry best. Let us customize a market research solution that exceeds your marketing goals.

eNewsletters

STAY CONNECTED

facebook_40.png twitter_40px.png  youtube_40px.pnglinkedin_40px.png