Get Stuck Into Embedded Linux

Ranked #4,899 in Computers & Electronics, #90,274 overall

It is surprising how few electronics engineers and hobbyists are aware of the fascinating world of embedded Linux. Hopefully this lens will put you straight!

One of the main things that transpired from the Embedded Systems Show was that surprisingly many companies developing and marketing systems based on 8-bit microcontrollers (e.g. 8051 clones, AVRs, PIC16s and PIC18s) were making plans to use powerful 32-bit microcontrollers and the Linux operating system as the basis for their next generation of products. My immediate thoughts were along the lines of "do these people realise what they are letting themselves in for?" The other source of 'inspiration' for this article came from a couple of outstanding software engineers from BT's Martlesham labs who attended an advanced FTT course on Linux Kernel and Device Driver programming and who 'introduced' me to the exciting world of "Gumstix'.

Gumstix

For those of you who have not been exposed to them, Gumstix are cheap and powerful ARM9 embedded Linux systems and add-on boards with a very small footprint (only somewhat larger than an old fashioned stick of chewing gum), and can provide a very good introduction to Linux, not just because of their relatively low price, but also because the Gumstix community is so helpful and enthusiastic. Just as hobby electronic enthusiasts have embraced 8-bit and 16-bit microcontrollers such as PIC16/18s, Atmel AVRs and PIC24s in a whole variety of projects, it's quite likely they will embrace Gumstix in a whole generation of new projects using a 32-bit ARM9 architecture and running the Linux operating system.

Enter Linux

For those who like a challenge and enjoy hard mental work Linux is great fun. To become an embedded Linux guru, many skills need to be mastered. It is possible to teach yourself Linux and there are many good books available covering both running Linux on PCs and using Linux in embedded systems. Skills learned on PCs can be transferred to embedded systems development and vice versa.

Embedded systems engineers want to develop working systems as soon as possible - turn LEDs on and off, stop and start stepper motors, collect sensor readings, and implement various feedback control applications. The satisfaction of writing these simple Linux programs comes from an appreciation of the way in which the various pieces of Linux work together in the execution of the code, and an appreciation of how it is possible to put together far more complex applications built on these foundations. The whole point of working with Linux is that it permits the implementation of systems that can juggle many resources at once and to implement interactive applications for both 'communicating with' and 'controlling' all this juggling. There is the further bonus that a vast amount of free and very powerful open-source software running under Linux is readily available.

Open-source Software

This software is as good as, and often much better than, much proprietary commercial software. Many companies selling tools into the high-end real-time and embedded market are not just quietly including Linux based products in their product portfolios but also upgrading their IDEs (Integrated Development Environments) using Eclipse as their starting point. The business model of quite a few of these companies is based on the selling of expensive support services with their particular 'commercial' distribution. For instance, Wind River Systems has acquired FSMLabs and has embedded Linux products in its portfolio; LynuxWorks sells not only LynxOS (a hard real-time Posix compliant OS) but also an embedded Linux distribution called 'Bluecat'. MontaVista's business model is based on producing Linux distributions tailored to specific markets such as the mobile telephony and telecomms markets.

For commercial organisations that need to get products to market fast the cost of using these commercial distributions can be justified. For most hobby developers these costs are just too prohibitive. The good news is that it is possible to learn and master embedded Linux systems development without using these expensive products, and that the skills learned are exactly the same as those needed when working with the more expensive commercial distributions. Both the embedded Linux community and the broader Linux and open-source community are enthusiastic and very supportive of beginners.

Developing Embedded Linux

Gaining an understanding of developing embedded Linux requires focus and effort. How might this effort be directed? Here are some suggestions.

  • Getting to know how to drive Linux from a terminal - the various Linux commands and utilities with mysterious names such as 'grep', 'find', 'ls', 'chmod' and so
    on; the techniques for combining them using pipes and redirection.

  • Learning how to write programs for the bash shell.

  • Learning how to program in C and C++ and how to write applications that make use of the Linux Application Programming Interface (API).

  • Learning how to configure network interfaces.

  • Learning how to install and configure Linux services such as DNS, mail servers, Apache, and DHCP.

  • Understanding how to drive hardware from user applications.

  • Learning how to build, load and boot tailored Linux kernels.

  • Learning how to implement Linux device drivers.

  • If you are interested in multimedia applications then start exploring the wealth of open source applications, tools and utilities available for Linux.

  • If you are interested in telephony then you should explore VoIP and other open source applications including open source mobile telephony.


Most of your Linux skills can be developed using PCs, including older 80486 and Pentium II PCs. You might also consider installing Cygwin and Eclipse on your Windows XP, Vista or Windows 2000 PC or workstation and develop your skills here. Later you can install and set up cross-compilers for e.g. ARM or PowerPC targets. Sysgo sells a commercial Linux development system targeting e.g. ARM9 systems and running on Microsoft Windows called Elinos. You can also, of course, install cross-development tools on an Intel laptop or workstation running Linux.

Moving It to Embedded

If you are planning to work professionally developing embedded Linux applications then, of course, I would recommend undertaking some professional training, and this might include considering some kind of University degree course that covers Linux and embedded Linux programming in depth.

For your initial foray into embedded Linux systems on a non Intel processor based platform, investing in a one of the Gumstix boards, and a few add-on boards is an excellent way to get started. There are many interesting Gumstix based projects out there including robotics applications, mobile telephony applications, and data acquisition applications. Gumstix are sold directly over the web so as to avoid costs associated with resellers and distributors. There are discounts when purchasing multiple boards, hence it is useful to group together with some likeminded people and purchase your Gumstix as a group. Linux builds for Gumstix boards can be downloaded from the Gumstix web site and there are also many useful examples of how to write device drivers and build applications that are either available or that can be tracked down starting from the Gumstix web site. Gumstix also sells bundles containing a base board and a selection of add on boards. Gumstix also has developed a sensor rich Atmel AVR board, the Robostix board, that can be connected to the ARM base boards. A setup based on an ARM9 Gumstix board and the Atmel AVR based Robostix board can provide a very good introduction to implementing distributed multi-processor applications in which a central processor communicates with a number of small microcontroller based systems.

Embedded Linux Boards on Squidoo

Loading
Loading

Reader Feedback

  • garip1 Dec 24, 2011 @ 7:09 am | delete
    Open source is advantage
  • GreenOasis Aug 11, 2011 @ 2:46 am | delete
    Great and informative lens.
  • human_ Aug 10, 2011 @ 3:55 pm | delete
    Nice lens. Thank you

by

spacetime

A big fan of science, technology, internet and Google. Interested in internet marketing, active also on Fiverr. more »

Feeling creative? Create a Lens!

Embedded Linux 

Embedded Linux

Amazon Price: $4.10 (as of 06/01/2012)Buy Now

Engineering Resources 

Loading

Embedded Linux Systems 

Could not locate item B002VKROGU. Please try again.Sorry, there are no results available from Amazon.