~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Firmware Update
- October 9, 2009
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this issue:
-- Free Binary Literal Macros
-- Free CRC Implementation Code in C and C++
-- Free Industry News
-- Free Webinar with Coding Standard Purchase -- Free Fast Accurate Memory Test Suite
Firmware Update is a free newsletter containing analysis, insight, and commentary on firmware architecture and process by embedded software expert Michael Barr. Firmware Update is Copyright 2009 by Netrino, LLC, but may be reprinted or forwarded for interested colleagues. |
|
Free Binary Literal Macros ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A couple of years ago, Netrino engineer Dan
Smith 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. All the math is done at compile-time. |
|
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.
Efficient C source code for the popular CRC-16, CRC-32, and CRC-CCITT computations was written by me and placed into the public domain over a decade ago. It is widely used and available as downloadable C and C++ source code. |
|
Free Industry News ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A first-person account of pair programming,
from a believer, via NYTimes. http://bit.ly/xtJz3
Submit your idea for an intelligent, connected embedded device & and you could win $10,000! http://bit.ly/ConnectThis Linux bloated, claims Linus Torvalds. http://bit.ly/cypSv Technical debt is not a license to make a mess. Technical debt creates the need for even greater cleanliness. http://bit.ly/3s9pNM Where have all the real-time operating system (RTOS) vendors gone? Live from ESC Boston: http://bit.ly/QJEG4 Congratulations to Enea for its award-winning multicore RTOS combining AMP and SMP kernel support. http://bit.ly/EMlHb Microchip's "Cash for Clunkers" trade-in. Exchange selected tools from competitors for up to a 30% discount. http://bit.ly/ADxtM Best summary of ESC Boston 2009 floor traffic (from a vendor): "fewer new contacts, but mostly qualified" (they have money to spend). Duct Tape Programmers - "everybody else is too afraid of looking stupid...so they go along with faddish craziness." http://bit.ly/3bWdV5 Code performance variability across the spectrum of programmers matters less with Perl than with C, C++, and Java! http://bit.ly/1btdrg FDA's 510(k) medical device approval process is under review. Is it too easy to call a complex product "equivalent"? http://bit.ly/OC2M7 Researchers in Sweden have found a nifty new use for photosynthetic algae: environmentally-friendly flex-thin batteries. http://bit.ly/Hrru1 Busting the myths around VxWorks - #1 VxWorks is NOT dead! http://bit.ly/83lCT The next Embedded Software Boot Camp, in Maryland, is now forming. Register now and save 20%. http://www.netrino.com/Boot-Camp The FPGA world changed a bit this morning: MIPS licenses MIPS32 arch to Altera. http://bit.ly/1xn0eB I'm editorial co-chair of the November 12th EE Times Connected Devices Virtual Conference. Register now: http://bit.ly/wEC9r August "global market for semiconductors was $19.00 billion, down 12.9 percent" year-over- year. http://bit.ly/znIPc |
|
Free Webinar with Coding Standard Purchase ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is cheaper and easier to prevent bugs from
creeping into embedded software than it is to
find and kill them after 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.
Join me on October 20 for a one-hour webinar and discussion to learn a number of clever but simple practical rules you can follow to keep bugs out of embedded software written in C or C++. |
|
Free Fast Accurate Memory Test Suite ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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. Perhaps unbelievably, some of these may not even notice that the memory chips have been removed from the board! |
|
Quick Links... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Contact Us... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
email:
[email protected]
phone:
866.78.EMBED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|