~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Firmware Update
- December 7, 2012
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
in this issue
-- Free CRC Implementation Code in C and C++
-- Free Embedded C Coding Standard
-- Free Fast Accurate Memory Test Suite in C
-- Free Binary Literal Macros in C
-- Industry News That's Not Boring

Firmware Update is a free newsletter by embedded guru Michael Barr. This issue is Copyright 2012 by Barr Group, but may be reprinted for non-commercial purposes. Please forward it to colleagues who may benefit from the information.


Free CRC Implementation Code in C and C++
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cyclic redundancy codes (CRCs) are among the best checksums available to detect and/or correct errors in communications transmissions. Unfortunately, the modulo-2 arithmetic used to compute CRCs doesn't map easily into software. Writing CRC code yourself is not easy and is definitely a waste of time when you can use free code instead.

Back in 1999, I developed and published an efficient high-level language implementation of the popular CRC-16, CRC-32, and CRC-CCITT checksums. I subsequently wrote a popular three-part article about checksums and CRCs for Embedded Systems Programming magazine. You can still find these articles, as well as the C and C++ source code in the public domain.

Steal this code...


Free Embedded C Coding Standard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is cheaper and easier to prevent bugs from creeping into embedded software than it is to find and kill them once they have entered. A key strategy in the fight against bugs is to write code in which the compiler, linker, or a static analysis tool can automatically detect bugs--before the code is even downloaded to ROM. Barr Group's Embedded C Coding Standard book teaches simple practical rules you can follow to keep bugs out of embedded software.

Everyone who attends one of our Spring 2013 hands-on training courses will receive a free copy of the coding standard book. Available courses include:

Each of these week-long workshops consists of lectures and half a dozen small programming exercises plus one large capstone project. All of the hands-on projects target a development board platform that you keep--along with your new-found expertise.

Register early and save...


Free Fast Accurate Memory Test Suite in C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
One piece of software that nearly every firmware developer must write at some point in his career is a memory test. Often, once the prototype hardware is ready, the board's designer would like some reassurance that he has wired the address and data lines correctly, and that the various memory chips are working properly. Even if that's not the case, it is desirable to test any onboard RAM at least as often as the system is reset. It is up to the embedded software developer, then, to figure out what can go wrong and design a suite of tests that will uncover potential problems.

At first glance, writing a memory test may seem like a fairly simple endeavor. However, as you look at the problem more closely you will realize that it can be difficult to detect subtle memory problems with a simple test. In fact, as a result of programmer na�vet�, many embedded systems include memory tests that would detect only the most catastrophic memory failures. Incredibly, some of these may not even notice that the memory chips have been removed from the board!

So why not save yourself a headache and steal the C source code that I developed in my Master's thesis work way back in 1997. This code has been used by me in many products, as well as by thousands of your firmware engineer peers.

Also steal this code...


Free Binary Literal Macros in C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A couple of years ago, one of our engineers was writing stepper motor control firmware that interfaced to lots of registers with binary fields and sub-fields. After fiddling around with error-prone "off by 1 bit shift" masking and conversion from binary to hexadecimal literals in C, he happened across a useful post on a forum. In a nutshell, the "binary literal" technique is based on a set of C preprocessor macros named B8(), B16(), and B32(). No error-prone conversion to hexadecimal necessary and no figuring out which bits belong to which nibbles. And for efficiency, all the math is done at compile-time.

Steal this code too...


Industry News That's Not Boring
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TI releases free download of TI-RTOS plus middleware and drivers for MSP430, ARM, DSP, and more. http://www.ti.com/tool/ti-rtos?DCMP=ti-rtos&HQS=ti-rtos-pr-pf

Why your teapot will never need Wi-Fi: http://bbc.in/V5BCJF

The electronic brain gets closer: http://www.edn.com/electronics-blogs/tech-edge/4402372/The-electronic-brain-gets-closer-

EE Times print is no more. First Embedded Systems Design, now EE Times. Sad but true: http://lnkd.in/vRJ2JS

"Ethical subroutines" may sound like science fiction, but once upon a time, so did self-driving cars. http://www.newyorker.com/online/blogs/newsdesk/2012/11/google-driverless-car-morality.html

Where did Android come from? (hint: cameras) http://lnkd.in/8umnYu

Why the ARM Architecture is the Way It Is http://www.eetimes.com/electronics-news/4401986/Why-the-ARM-architecture-is-shaped-the-way-it-is

Things About C that Make Me Say, "WHAT?!?" http://bit.ly/Q1k569

World's oldest digital computer successfully reboots! http://www.theregister.co.uk/2012/11/20/oldest_digital_computer_deboots/

Forbes misquotes Elon Musk. Millions of people actually needed for his planned Mars colony, so 80,000 would just be the number moving to Mars per year: http://news.yahoo.com/huge-mars-colony-eyed-spacex-founder-elon-musk-120626263.html

More free news like this...


Quick Links
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Embedded Systems Training Calendar
  • Embedded Systems Training in a Box
  • Free Embedded Systems Articles
  • Free Embedded Systems Glossary


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