~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Firmware Update
Resolve to Write Better Firmware
- January 10, 2011
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this issue:
-- Follow a Coding Standard to Reduce Bugs
-- Take a Course to Improve Your Firmware Skills
-- Reduce Energy Use via Power Debugging
-- Don't Take Work So Seriously
-- Order Embedded Software Boot Camp in a Box

Firmware Update is a free monthly newsletter by embedded software expert Michael Barr. It is Copyright 2011 by Netrino, LLC, but may be reprinted for non-commercial purposes. Please forward it to colleagues who may benefit from the information.


Follow a Coding Standard to Reduce Bugs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coding Standard Book Cover Happy New Year! Several years back, a team of firmware engineers working at Netrino set out to improve its own firmware quality by rewriting our boring old coding standard. One simple idea that inspired them was to include as many best practices as they could find to help keep bugs out. Viewed this way, the usual coding standard battles over placement of white space and curly braces were replaced by a logical debate: Which would be better for keeping bugs out: April's suggested rule or Bob's?

By way of example, one of the rules developed in the process was that comparisons of variables against constants (e.g., if (p == 0)) should always be done with the constant on the left side. That way, the hard to debug assignment typo that happens to every programmer now and then can be easily detected by the compiler (i.e., if (0 = x) is illegal).

For once we had a coding standard that everyone on our team wanted to follow! Then someone suggested we share our bug-reducing rules by publishing a book. And I'm pleased to report that sales of our Embedded C Coding Standard book have exceeded all our wildest expectations. In just two short years, our standard has come to be followed by embedded software developers around the world. A few larger teams have licensed our Word document (so they can make tweaks to fit their organization), but most buyers are happy to just follow the rules as we originally stated them.

Now this popular and useful little book is also available as an e-book for Kindle and Nook; and it's coming soon to the iTunes Bookstore. Of course, the book is still available in print from netrino.com as well as retailers like Amazon.

Please resolve to follow ours or a similar coding standard in the new year. No matter where you decide to buy it, the cost is only about $49. That's a remarkable value relative to the cost of even a single bug prevented!

Get your copy today...


Take a Course to Improve Your Firmware Skills
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Approximately 75% of embedded software developers (myself included) got their start as electrical engineers. The remainder hail from fields as diverse as computer science, nuclear physics, and english lit.

Unfortunately, this means that we're mostly self-taught embedded software developers. Sure, your EE program might have had an elective senior year lab course where you programmed a microcontroller in assembly or C like mine. And every CS degree starts with a course on CPU architecture. But have you had formal training in the subtle advanced features of our lingua franca C, such as the volatile keyword or memory-mapped I/O? (Certainly not most of those who've taken our embedded C quiz online!)

More importantly, do you know how to ensure your real-time deadlines are always met? Should you use an RTOS to help with this or is there a better alternative? If you use an RTOS, which parts of the API should you avoid to reduce deadlocks and priority inversions and how should you prioritize your tasks? And how can you interface to hardware directly from C in a way that is portable across compilers and microcontroller families?

Unfortunately, even many experienced embedded software developers don't know the answers to all those important design issues. There's just no good feedback loop when learning on the job and moving on from project to project (perhaps even leaving the same bugs in design after design). But there is one place that this stuff is taught.

Netrino's popular Embedded Software Boot Camp is a 4.5-day in-person training experience about which past attendees have said:

  • "I think a lot of embedded software engineers should be forced to take, and learn, the material presented in this course." -- Michael C.
  • "Outstanding presentation of a complex topic." -- Rob V.
  • "An enjoyable, challenging way of training a team in a short amount of time." -- Bob M., Ronan Engineering
  • "I would like to thank you again for the Embedded Software Boot Camp. I brought all the books back to the company and showed my boss the slides and all the handouts and all that good stuff and he was very impressed. Needless to say he was happy with the investment he made in Netrino." -- Garrett
  • "A better use of time and money than the Wind River VxWorks training course I took last month!" -- David, IBM
  • "Well worth traveling half-way around the world for!" -- Daniel N. (traveled 30-hours each way from Melbourne, Australia)

I developed this course based on my experience as an embedded software developer as well as my exposure to numerous brilliant engineers as a former editor of Embedded Systems Programming magazine. There will be two public sessions in the first half of 2011. These will be held March 14-18 in Silicon Valley and May 16-20 near Washington, DC. I will be teaching them both and hope you can commit now to joining me.

Register early and save...


Reduce Energy Use via Power Debugging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
According a recent study by the European Union, approximately 10% of electricity used in homes and offices is 'vampire power'. That is to say that even when many products, especially embedded systems, are turned "off" they are still consuming power! The same report puts the total amount of energy wasted in this way, within Europe alone, at dozens of Terawatt hours per year.

Thus developers of all embedded software (not just those designing for battery-powered systems) should take note of this new tool from IAR Systems: A "Power Debugger" has been made available as a free built-in to the popular Embedded Workbench for ARM (EWARM) IDE. With this new tool at your disposal, finding the right code to optimize to reduce power consumption is easier than it has ever been.

Read my review...


Don't Take Work So Seriously
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Can you learn to write better code from a cartoon? Not this one: http://xkcd.com/844/

if (engineers == babe_magnets) { donkeys.fly(); hell.coldday(); ganssle.ontopic(); } Ganssle's latest: http://bit.ly/fZLWz9

IEEE's 25 Microchips That Shook the World: http://spectrum.ieee.org/static/25chips

Even CEO can't figure out how RadioShack still in business! LOL: http://t.co/Plh9ogw

Text-to-braille finger glove device. Almost makes me wish I was blind! http://tinyurl.com/26zxebk

Most Popular Embedded Gurus Blog Posts of 2010: http://bit.ly/g6hbNO

Follow me on twitter...


Order Embedded Software Boot Camp in a Box
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ARM Processor Board Can't make it to the in-person Embedded Software Boot Camp described above? No problem. Netrino now offers the valuable knowledge and skills taught at the public courses in a home study package.

Our "Embedded Software Boot Camp in a Box" is ideal for engineers who want to obtain the information and skills provided at the live Embedded Software Boot Camp, but can't afford to take a week off from work and family. You will start by reading the 350 page Embedded Software Boot Camp Field Manual book. As you continue through the program, you will gain additional experience through a series of eight small and one large programming exercises on the included ARM processor board (photo above). Everything you need for self-study, including a JTAG debugger and exercise solutions, is in the box.

Order yours now...


Quick Links
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Subscribe to Blogs by Embedded Software Experts
  • Read Great Books About Embedded Systems Design
  • Connect with Michael Barr on LinkedIn
  • Take the Embedded C Quiz


  • Contact Us...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    phone: 866.78.EMBED
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~