Buy this Book
Print Book $49.99 PDF $34.99 Read it Now!
Print Book £35.50
Add to UK Cart
Reprint Licensing
Programming Embedded Systems, Second Edition With C and GNU Development Tools

By Michael Barr, Anthony Massa
Second Edition  October 2006 
Pages: 326
ISBN 10: 0-596-00983-6 | ISBN 13: 9780596009830
starstarstarstarstar (Average of 4 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Book description

Whether you're writing your first embedded program, designing the latest generation of hand-held whatchamacalits, or managing the people who do, this book is for you. Programming Embedded Systems will help you develop the knowledge and skills you need to achieve proficiency with embedded software.
Full Description

If you have programming experience and a familiarity with C--the dominant language in embedded systems--Programming Embedded Systems, Second Edition is exactly what you need to get started with embedded software. This software is ubiquitous, hidden away inside our watches, DVD players, mobile phones, anti-lock brakes, and even a few toasters. The military uses embedded software to guide missiles, detect enemy aircraft, and pilot UAVs. Communication satellites, deep-space probes, and many medical instruments would have been nearly impossible to create without embedded software.

The first edition of Programming Embedded Systems taught the subject to tens of thousands of people around the world and is now considered the bible of embedded programming. This second edition has been updated to cover all the latest hardware designs and development methodologies.

The techniques and code examples presented here are directly applicable to real-world embedded software projects of all sorts. Examples use the free GNU software programming tools, the eCos and Linux operating systems, and a low-cost hardware platform specially developed for this book. If you obtain these tools along with Programming Embedded Systems, Second Edition, you'll have a full environment for exploring embedded systems in depth. But even if you work with different hardware and software, the principles covered in this book apply.

Whether you are new to embedded systems or have done embedded work before, you'll benefit from the topics in this book, which include:

  • How building and loading programs differ from desktop or server computers
  • Basic debugging techniques--a critical skill when working with minimally endowed embedded systems
  • Handling different types of memory
  • Interrupts, and the monitoring and control of on-chip and external peripherals
  • Determining whether you have real-time requirements, and whether your operating system and application can meet those requirements
  • Task synchronization with real-time operating systems and embedded Linux
  • Optimizing embedded software for size, speed, and power consumption
  • Working examples for eCos and embedded Linux

So whether you're writing your first embedded program, designing the latest generation of hand-held whatchamacalits, or managing the people who do, this book is for you. Programming Embedded Systems will help you develop the knowledge and skills you need to achieve proficiency with embedded software.

Praise for the first edition:

"This lively and readable book is the perfect introduction for those venturing into embedded systems software development for the first time. It provides in one place all the important topics necessary to orient programmers to the embedded development process.
--Lindsey Vereen, Editor-in-Chief, Embedded Systems Programming

Browse within this book

Cover | Table of Contents | Colophon



Featured customer reviews

Write a Review


Help me,  May 17 2008
Submitted by Ashish Sharma   [Respond | View]

I bought this book , but I am unable to get the hardware suggested in the book since it's too costly for me in India.
So I request the writers or anybody experienced in this regard, please suggest me some cheap options to start with.

Please help me ,

Thank's in advance

Ashish Sharma


Programming Embedded Systems,  March 07 2008
Rating: StarStarStarStarStar
Submitted by Martin   [Respond | View]

This book assumes nothing. I'm a communications Engineer with a new career in Inertial Navigation Systems. This book was a great intro course into what one can expect when starting to work with embedded systems.


I appreciate the basic approach: it is a gentle learning experience which you can read off-and-on over a few weeks if necessary. I recommend it and urge readers to keep a marking pen handy, it can be a good reference source while you get up to speed.

You DO NOT need a hands-on system to learn from this book.



So far the book is reads well but the board price skyrocketed....,  January 29 2008
Rating: StarStarStarStarStar
Submitted by Anonymous Reader   [Respond | View]

I recently called arcom and they discontinued the
offer for the 40% discount. They emailed me with a quote for $970 for the ViperLite. There are other boards out there (try www.microcontroller.com) that
are 1/3 the price or lower that offer more features but remember they are not the same board referred in the book.

Read all reviews


Got me up and running right away,  July 24 2007
Rating: StarStarStarStarStar
Submitted by Anonymous Reader   [Respond | View]

First of all, this is a hands on book. It does provide an interesting read but you really need to get yourself the Arcom VIPER-Lite + Addon board combo which all the examples have been designed for. I got offered a discount on the hardware when I mentioned the book to the Arcom sales team (who, btw, are very friendly and helpful) and as of June 2007 the package cost £175 (ex. vat). However, this is really a great board and you should certainly take a look at it (Arcom's engineers rock btw) - http://www.arcom.com

My technique when reading this book was to first read through the book cover to cover before hacking away at the examples. I am currently working through the examples which can be downloaded from http://www.oreilly.com/catalog/embsys2/ and on that page there is a link to "examples". However, there is a lot of content in the examples files that simply isn't included within the pages of the book. Download and print off the source would be my advice.

As one of the other reviewers mentioned, the book does tend to gloss over some important aspects which I would have liked to have seen more of. More work on ISR's would have been brilliant and a load more on developing drivers under linux. I would have liked to have seen more advanced techniques to get the most out of my board - like recompiling the kernel and a greater discussion on redboot. A walkthrough of the contents of a mapfile would have saved me searching elsewhere and some lines in the example source code and makefiles are unreferenced at all in the book. You will need to have at least minimal exposure to standard gcc toolchains although the book does cover the fundamentals. Finally, I would have also liked to have seen more reference made to keeping deadlines when making programs executing under linux on the target. Whilst the version of linux on the arcom board uses pthreads and has therefore no direct knowledge of deadlines...I would have liked to have seen references made to techniques I can use in my programs to help prevent deadlines from failing. The book however does discuss this in more detail when discussing eCos however, as the board supplied by Arcom came with linux - this is practically irrelevant to me.

So now, the book uses two methods for building applications for the Arcom board (well, three if you include the eCos toolchain...but my board came with linux so i'll stick to that). You can either build your programs to be loaded directly at position x in RAM and then executed by the target directly (through redboot)...or, you can build your programs to be executed under linux. The examples packages at the link above contain only the toolchain to build programs for direct execution i.e. without linux control and these are easily installed on your development host. The linux cross compile toolchain to build applications for execution under linux on the target is included on the CD which comes with the development pack of the Arcom board. I haven't quite reached installing that toolchain on my host system yet but i'm definately looking forward to building my programs with it. Embedded linux - here I come...

I suppose what I was looking for when I bought this book was a manual for the Arcom board...and what I actually got was a detailed insight into programming embedded systems using the Arcom board as a hands on example. I'm happy with what I got...actually...I'm more than happy...if only you could see me right now :). Thank you Barr and Massa for a great book!


Great Introduction to Embedded Systems Programming.,  December 16 2006
Rating: StarStarStarStarStar
Submitted by Joshua Benuck   [Respond | View]

This book gives an excellent overview of programming embedded systems. It provides numerous examples of real-world hands-on embedded programming. I'd recommend that you have experience in C. Experience with operating systems concepts (such as interrupt service routines) would also be helpful.

Unlike usual programming books, you won't be able to pick up the book, download something, and start working. You'll need to have an embedded system that you can use. The authors use a system from Arcom that will run you about $300. I've not used it and was very wary about it when I first started reading, but as I read through the various examples I gained a great appreciation for the system. It looks like a great way to gain hands-on experience with embedded programming.

Before getting this book I read through the Lego Mindstorm NXT documentation and felt very lost. I didn't understand the symbols on the schematics and they used strange acronyms (like I2C and PWM). I also have an Iguanaworks USB infrared transceiver. I bought it to use in a MythTV system I am building. This book has enabled me to understand the schematics of both the Mindstorm and the transceiver as well as the documentation of both systems. I now feel ready to do my own embedded systems programming.

That said, I did not like everything in this book. They gloss over areas that I felt would have helped me (such as how to use a JTAG adapter and how to create an interrupt service routine under Linux). There are areas where the writing does not flow well and is redundant. The book switched from using an embedded x86 processor in the first edition to using an ARM processor in the second and there are still references to the old processor.

Even with its faults I am glad I got this book. It filled in many of the gaps that I have as a software engineer who is wanting to learn about embedded systems programming. I feel a whole new world has just been opened up to me and I can't wait to jump in.



Media reviews

"…Catsoulis writes about a difficult topic clearly…If you have ever considered building that network-connected toaster or Web-based wine-cellar temperature sensor, this is the book for you. Even if you won’t be designing your own circuit boards, you will certainly understand what is involved in any kit or prebuilt design you may decide to use. "
-- Rik Farrow, ;login:

"...appears in its second updated edition to include even more real-world and Linux examples, and is a recommended pick for programmers with a familiarity with C. It's been used as a college textbook and covers everything from basic debugging skills to determining the applications and needs of real-time projects. In updating details and clarifying routines, the 2nd edition of Programming Embedded Systems should be considered both a classroom and lending collection standard."
-- Diane Donovan, California Bookwatch

"Pick up this book, step through its exercises in a methodical way, and you'll have, along with several working 'blinking-light' programs, a good sense for how work gets done in the embedded world. Authors Barr and Massa are careful to write explicit tutorials to introduce concepts like the embedded-system development cycle, device driver responsibilities, and real-time scheduling. At the same time, their own backgrounds are broad enough that they show how specific examples and solutions fit in broader context. "
-- Cameron Laird, UnixReview.com

Read all reviews


See larger cover


"If you have ever considered building that network-connected toaster or Web-based wine-cellar temperature sensor, this is the book for you."
--Rik Farrow, ;login: