~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Firmware Update
- April 11, 2011
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
in this issue
-- Checksums and CRCs
-- The N_ELEMENTS Macro
-- Final Embedded Software Boot Camp of 2011
-- Industry News That's Not Boring!

Firmware Update is a free 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.


Checksums and CRCs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whenever you connect two or more systems together with the intent of exchanging information, you assume that the exchange will take place without errors. But what if some of the data is lost or corrupted in transit? Communication protocols usually attempt to detect such errors automatically. To do that they use checksums and cyclic redundancy codes (CRCs). These techniques are also valuable when storing code and/or data in flash memory, to ensure that it hasn't been corrupted.

Waaaaay back in 1999, I wrote a three part expository article in Embedded Systems Programming magazine on the rationale and mathematics of CRCs. Along with the third installment, I released working C source code for a reusable CRC library into the public domain. Month after month, these remain my most widely read articles and the free code is widely used. Want to learn how CRCs work?

Start here...


The N_ELEMENTS Macro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's a simple C preprocessor macro that you may find useful:

#define N_ELEMENTS(X) (sizeof(X)/sizeof(*(X)))

Its nominal use is to determine the number of elements in an incomplete array declaration. So why is its use so controversial?

Read on...


Final Embedded Software Boot Camp of 2011
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In just five weeks, I'll be teaching what is likely to be the last public Embedded Software Boot Camp of 2011. (Ordinarily, we run one or two of them in the Fall as well, but this year I've got prior commitments that preclude it.) In case you don't know, the Boot Camps are in-person 4.5-day hands-on training courses to help you master firmware coding and architecture. There's just one week left to receive the lowest available registration price and the room is filling up fast. Don't miss your chance to join me.

Register now...


Industry News That's Not Boring!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are using any internet connected device, it may now possible to trace your location to within less than 1km. Scary: http://bit.ly/ebzBgv

Finally: Digital cartridges for 35mm cameras! I want one: http://www.re35.net (Too bad it was just an April Fools' website--for now.)

Attack code for SCADA vulnerabilities released online. Article: http://bit.ly/ibW1g4

Microsoft's Kinect is cool. Here's a paper about how it works: http://bit.ly/f0vvZF

DIY scanning electron microscope project. Impressive: http://bit.ly/i88jYn

Q: How many firmware engineers does it take to change a lightbulb? A: None, that's what you call a hardware problem.

More stuff like this...


Quick Links
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Embedded C Coding Standard
  • Embedded Software Boot Camp in a Box
  • Beer and Boards at ESC Silicon Valley 2011
  • Shortcut to Free CRC Source Code


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