http://twitter.com/netrinomike
Embedded Systems Expert
|
|
|
June 23 2009
First, an Airbus A330 fell out of the sky. Then two D.C. Metro trains collided. Several hundred people have been killed and injured in these disastrous system failures. Did bugs in embedded software play a role in these disasters? And what will be the third disaster headline?An incident on an… read moreAnnual Embedded Engineer Survey -- Call for Participation
May 21 2009
VDC Research is conducting its annual survey of embedded engineers. If you are involved in the engineering of embedded systems, you should take the survey. The research covers embedded software, hardware, tools, and development practices.VDC will provide all respondents who complete the survey:* A summary of the 2009 survey findings*… read moreCoding Standard Rule #10: Don't Use the Comma Delimiter Within Variable Declarations
April 15 2009
Rule: The comma (‘,’) operator shall not be used within variable declarations.Example (don’t):char * x, y; // did you want y to be a pointer or not?Reasoning: The cost of placing each declaration on a line of its own is low. By contrast, the risk that you've made a mistake… read moreEmbedded Systems Conference Wrap-Up
April 07 2009
I spent last week in San Jose, at the Embedded Systems Conference (ESC). As I have come to expect (this was my twelfth consecutive year as a speaker), the event remains the place for embedded systems developers to be. There is no other similar event for learning about the latest… read moreCoding Standard Rule #9: Don't Create Function-Like Macros
April 03 2009
Rule: Parameterized macros shall not be used if an inline function can be written to accomplish the same task. Example:#define MAX(A, B) ((A) > (B) ? (A) : (B)) // Don’t do this ...inline int max(int a, int b) // ... if you can do this instead. Reasoning: There are… read moreCoding Standard Rule #8: Don't Mix Signed and Unsigned Data
April 02 2009
Rule: Signed integers shall not be combined with unsigned integers in comparisons or expressions. In support of this, decimal constants meant to be unsigned should be declared with a ‘u’ at the end.Example (don’t):uint8_t a = 6u;int8_t b = -9;if (a + b < 4){ // This correct path should… read moreCoding Standard Rule #7: Don't Mix Bit-Wise Operators and Signed Data
April 01 2009
Rule: None of the bit-wise operators (i.e., &, |, ~, ^, <<, and >>) shall be used to manipulate signed integer data.Example (don’t):int8_t signed_data = -4;signed_data >>= 1; // not necessarily -2 Reasoning: The C standard does not specific the underlying format of signed data (e.g., 2’s complement) and leaves… read moreCoding Standard Rule #6: Use C99's Fixed-Width Integer Type Names
April 01 2009
This is the sixth in a continuing series of blog posts describing simple coding rules that help keep bugs out of embedded C programs.Rule: Whenever the width, in bits or bytes, of an integer value matters in the program, fixed width data types shall be used in place of char,… read moreCoding Standard Rule #5: Only use Comments for Commenting
March 30 2009
This is the fifth in a continuing series of blog posts describing simple coding rules that help keep bugs out of embedded C programs.Rule: Comments shall neither be nested nor used to disable a block of code, even temporarily. To temporarily disable a block of code, use the preprocessor’s conditional… read moreCoding Standard Rule #4: Use volatile Whenever Possible
March 27 2009
This is the fourth in a continuing series of blog posts describing simple coding rules that help keep bugs out of embedded C programs.Rule: The volatile keyword shall be used whenever appropriate, including:To declare a global variable accessible (by current use or scope) by any interrupt service routine,To declare a… read moreNew Mobile Phone OS Market Share Data
March 26 2009
Fast Company magazine yesterday reported the latest statistics on mobile web browsing. Not surprisingly, people with iPhones are the dominant users of mobile Internet.Included in the article are statistics about the market for mobile phone operating systems. The shakeup in the OS market share mix over the past six months… read moreCoding Standard Rule #3: Use static to Enforce Encapsulation
March 26 2009
The third in a continuing series of blog posts about simple rules for keeping bugs out of embedded software written in the C programming language.Rule: C's static keyword shall be used to declare all functions and variables that do not need to be visible outside of the module in which… read moreMarch 26 2009
Over the years, I have found that many engineers (as well as their managers) struggle to separate the various elements or layers of firmware engineering. For example, we are barraged with requests for "design reviews" that turn out to be "code reviews" because the customer is confused about the meaning… read moreCalling all Embedded Systems Bloggers
March 25 2009
I am currently doing research for an in-depth blog post or series about the online social networking community of individuals and companies with blogs, facebook pages, twitter feeds, etc. about embedded systems development. If you are involved with any part of the online embedded systems community and think I may… read moreCoding Standard Rule #2: Use const Wherever Possible
March 24 2009
Another in a continuing series of blog posts about simple rules for keeping bugs out of embedded software written in the C programming language.Rule: The const keyword shall be used whenever possible, including:To declare variables that should not be changed after initialization,To define call-by-reference function parameters that should not be… read more