"A man is a success if he gets up in the morning and goes to bed at night and in between does what he wants to do." --Bob Dylan
In this issue:
- Efficient CRC Calculations in C
- What Does 0x47u Mean Anyway?
- Upcoming Embedded Systems Training Courses
- Free White Space Cleanup Tool: QClean
- 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.
Efficient CRC Calculations in C
Cyclic redundancy codes (CRCs) are among the strongest checksums available: able to detect the vast majority of multi-bit errors in stored or transmitted data. However, the modulo-2 arithmetic used to compute a CRC does not map easily into software. To save you valuable time, I wrote an article about CRC calculation techniques and made a library of C source code public domain.
What Does 0x47u Mean Anyway?
MISRA-C Rule 10.6 requires that the suffix "u" be "applied to all constants of unsigned type." Thus increasing compliance with the MISRA-C guidelines by embedded software developers around the world has increased the probability of running into code that looks like
uint8_t foo = 0x47u;
In a blog post that explains the significance, Nigel Jones also enumerates three ways to fully comply with this required rule.
Upcoming Embedded Systems Training Courses
Better trained embedded software developers produce fewer bugs and complete their projects more quickly. Isn't it time to upgrade your team's skills?
- Embedded Software Boot Camp® in Maryland, Spain, California, and Germany
- Best Practices for Designing Safer Systems in California
- Power Techniques: TDD & Agile in California
- Embedded Security Boot Camp® in Massachusetts and California
- Best Practices for Designing More Secure Systems in Germany
- Embedded Android Boot Camp™ in Michigan
Groups of three or more from one company are eligible for a 20% discount. Private training is usually best for whole teams. A full course catalog is available.
Free White Space Cleanup Tool: QClean
Always the helpful fellow, Miro Samek recently released a handy command-line utility to automate white space cleanup in source code. As a professional software developer you should not ignore whitespace. Rather than leave the compiler to make sense of your code you should include white space rules in your coding standard to make the code more readable and maintainable. The new QClean utility looks like a handy way to automate enforcement of such rules.
Industry News That's Not Boring
Almost all modern automobiles employ CAN networks, which contain an unpatchable security weakness: http://blog.trendmicro.com/trendlabs-security-intelligence/connected-car-hack/
AspenCore's 2017 Embedded Markets Study is out, with interesting data re practices of embedded systems designers. https://lnkd.in/dJGExBg
embedded.fm: "Don't Use Arduino (for Professional Work)" http://embedded.fm/blog/2017/8/12/dont-use-arduino-for-professional-work
The Internet of Things is a weapon that's aimed right back at our open society: https://t.co/0JhS4wS9km
After he challenged the accuracy of red light cameras, this Oregan man was fined for practicing engineering without a license: https://t.co/oArQeOg0GX
Quick Links to Useful Stuff
- Bug-killing Embedded C Coding Standard
- Blogs about Embedded Systems Design
- Embedded Systems Glossary
- Library of Free How-To Technical Articles
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).