Category Archives: Embedded software development

Structure alignment and padding

In my previous post on the subject, I talked about using magic numbers and versions, alignment, and later added a note about endianness after a suggestion from Michel Fortin. This time, I’ll talk about padding, how the sizeof operator can … Continue reading

Posted in C & C++, Embedded software development, Software Development | Comments Off

What happens if structures aren’t well-designed

In my previous post, I explained how to design a structure for persisting and communicating. I didn’t say why I explained it — just that things get frustrating if these simple rules aren’t followed. In this post, I will tell … Continue reading

Posted in C & C++, C++ for the self-taught, Embedded software development, Software Design | Comments Off

How to design a struct for storage or communicating

One of the most common ways of “persisting” or communicating data in an embedded device is to just dump it into persistent storage or onto the wire: rather than generating XML, JSON or some other format which would later have … Continue reading

Posted in C & C++, C++ for the self-taught, Embedded software development, Software Design | 5 Comments

Exceptions and Embedded Devices

Lately, I’ve had a number of discussions on this subject, in which the same questions cropped up again and again: should exceptions be used in embedded devices? should exceptions occur in “normal operation” (i.e. is every exception a bug)? My … Continue reading

Posted in C & C++, Embedded software development | Tagged | Comments Off

Caveats and Trade-Offs in Writing Highly Optimized Software — An Example

At the moment, I have the all-to-rare luxury of working on a new product for Vlinder Software: an add-on to the Arachnida HTTP(S) server framework that is intended to fill a niche in the industrial embedded devices market. The design … Continue reading

Posted in C & C++, Embedded software development, Software Design, Software Engineering | Comments Off

On the importance of clear technical specifications

Even when the code is working like a charm, technical specifications — and their different interpretations by different people — can lead to confusion and hours-long debugging sessions.

Posted in Embedded software development, Software Engineering | Tagged | Comments Off

When hardware foils software — and then helps it out!

Sometimes, an oscilloscope can come in very handy.

Posted in Embedded software development | Comments Off