"For every complex problem there is an answer that is clear, simple, and wrong."
In this issue:
- Embedded C Coding Standard Now Available as Free PDF
- You Should Know: C11 Includes a More Secure strcpy()
- Firmware Architecture and Process Consulting
- New "Spaghetti Factor" Metric Measures Software Quality
- Industry News That's Not Boring
Firmware Update is a free, occasional newsletter by embedded systems expert Michael Barr. Firmware Update is a trademark and this issue is Copyright ©2017 by the author. You may forward whole issues to other embedded systems designers. All other rights are reserved.
Embedded C Coding Standard Now Available as Free PDF
Nine years ago, I turned what started as an internal company coding standard into the book Embedded C Coding Standard and had it published to benefit other engineers. From the start, we'd chosen the rules in this standard thoughtfully. The result is a very practical coding standard that reduces time spent in debug phase by keeping bugs out of C/C++ source code.
With thousands of firmware engineers having purchased copies already, I have been humbled by the success of the book. Recent industry surveys show that Embedded C Coding Standard is the most followed coding standard by professional embedded developers other than MISRA-C.
In keeping with our mission of helping as many engineers as possible design safer, more reliable, and more secure embedded systems, Barr Group recently made the PDF of this important reference book completely free. If you don't already have one, be sure to download your personal digital copy today from https://barrgroup.com/embedded-systems/books/embedded-c-coding-standard.
You Should Know: C11 Includes a More Secure strcpy()
You should know that the C11 update to the C programming language provides replacement “safe” versions of the historically problematic library routines strcpy() and strcat(). Using new C11 library functions like strcpy_s() is one way to make your code more secure against buffer overflow attacks.
Firmware Process and Architecture Consulting
The leaders of engineering at Omnicell understood that they faced a common problem: their product was doing well in the market but a better firmware process and architecture were needed to sustain the product's quality as new features were added. Like many smart firmware managers, they turned to the embedded systems experts at Barr Group for an independent review and recommendations.
Like many embedded systems, the design of Omnicell's automated medication dispenser had evolved organically, following its initial design by a small team with modest processes. Barr Group's expertise in firmware architecture and processes, including coding standards adoption and enforcement, proved to be instrumental as Omnicell endeavored to increase the maintainability and reliability of their product.
New "Spaghetti Factor" Metric Measures Software Quality
In the world of software, there are two flavors of spaghetti: data-flow and control-flow. The most difficult to read code usually combines both types of spaghetti code with unreadably-long functions. To quickly assess each function for these three problems, a professor at Carnegie Mellon proposes a new "Spaghetti Factor" metric that weights measures of all three risk areas into a single numerical quality score.
How does your code rank by this measure?
Industry News That's Not Boring
DoD gets about 1 line of code per hour embedded software productivity. Lots of data in this report: http://resources.sei.cmu.edu/library/asset-view.cfm?assetid=502651
Nearly half a million wearers of St. Jude pacemakers told to get a firmware upgrade ASAP because their devices are insecure and hackers could kill them: https://arstechnica.com/information-technology/2017/08/465k-patients-need-a-firmware-update-to-prevent-serious-pacemaker-hacks/
More than 10,000 embedded programmers have already tested their C and C++ knowledge in these 8-minute online skills tests: https://t.co/v3b6MNvpda Have you?
Which ARM-Cortex is best for your project? Free white paper comparing -A, -R, and -M at https://www.silabs.com/documents/public/white-papers/Which-ARM-Cortex-Core-Is-Right-for-Your-Application.pdf
ALERT: You! could go to jail for the behavior of code your boss asks you to write! Like this guy: http://www.reuters.com/article/us-volkswagen-emissions-sentencing-idUSKCN1B51YP
Quick Links to Useful Stuff
How to Contact the Author
I'm always interested in hearing from embedded systems designers and happy to take a few minutes to help you find the resources to get a design done right. Send me an email anytime. And be sure to also connect with me on Twitter (@embeddedbarr) and LinkedIn (https://linkedin.com/in/embeddedbarr).