Over the years I’ve noticed a number of common gotchas when reviewing code. They’re there no matter what the size the company or how mature the development process (and I have had the opportunity to review software for companies ranging from those with strict and bureaucratic processes to those that are more shoot-first-aim-later). In order … Continue reading 10 Questions for a Successful Code Review
The linker is probably the least talked about tool available to embedded software developers. For many, the linker is ignored for most if not the entire development cycle. Yet, the linker allows a developer to do very powerful things such as splitting up flash memory into multiple sections. Let’s look at a quick example how … Continue reading Tools – Partitioning Flash Space with the Linker
When I’m teaching “C Programming for Embedded Systems”, I’m often asked whether the ternary operator should be used or an if/else statement. Hidden behind the question is really the need to know whether the ternary operator is more efficient than if/else. One might think that compilers today would generate identical code. Let’s take a quick … Continue reading Ternary Operator versus the if/else statement …
The C programming language has been with embedded software developers since its creation in 1972. Ever since then C has been a blazing constant, surviving even the big push in the late 90’s and early 21st century to move to C++ or other object oriented languages. Undoubtedly, C will continue to be a foundational language … Continue reading It’s the end of C as we know it!
Portable Firmware …. is modular is loosely coupled has high cohesion is ANSI-C compliant has a clean interface has a Hardware Abstraction Layer (HAL) is readable and maintainable is simple uses encapsulation and abstract data types is well documented How well do the characteristics of your software match the qualities of portable firmware?
Embedded software engineers should be interested in writing production software that is portable and reusable. Societal demands for refreshing embedded systems every 12 – 18 months are quite demanding and starting from scratch for many systems is just not realistic. As developers we really should be interested in working on the cutting edge and not … Continue reading Tips and Tricks – Learning to write portable code using ANSI-C
Embedded software developers commonly interface with low level sensors and have a good understanding of how to work with signed and unsigned types but when it comes to strings and character types, many developers are easily confused. Take for example using ‘v’ and “v” in a definition or as a function parameter. Many developers would … Continue reading Embedded Basics – The difference of ‘ ‘ and ” “
Circular buffers are a critical component to have in the embedded software engineers’ toolbox. Over the years there have been many different implementations and examples of circular buffers that have littered the internet. I’ve grown particularly fond of the open source CBUF.h module that can be found at https://github.com/barraq/BRBrain/blob/master/firmware/CBUF.h The CBUF.h module implements a circular buffer using … Continue reading Tools – Open Source Circular Buffers
In order to reuse and port embedded software it is absolutely imperative that the code be written without any ambiguity. In a previous post, “Understanding Portable Types” located here, the basics of portable types were discussed and how the common types of char, int and long may mean different things depending on the architecture and … Continue reading Embedded Basics – 5 Tips for using portable types
Course Overview: The C programming language is one of the most widely used and successful computer programming languages of all time. When developing firmware for an embedded system without an operating system there are a number of C concepts that can easily trip up a developer. This course will review key concepts for developing an … Continue reading Design News CEC – Baremetal C Programming for Embedded Systems