Category Archives: Embedded software development

Bungie coding

For the last few weeks, I’ve been doing what you might call bungie coding: going from high-level to low-level code and back. This week, a whole team is doing it — fun!

Posted in Embedded software development, Software Development, Software Engineering | Leave a comment

Radical Refactoring: Breaking Changes

One of the most common sources of bugs is ambiguity: some too-subtle API change that’s missed in a library update and introduces a subtle bug, that finally only gets found out in the field. My answer to that problem is … Continue reading

Posted in Anecdotes, C & C++, C++ for the self-taught, Embedded software development, Radical Refactoring | Comments Off

Radical Refactoring: Have the compiler to (some of) the reviewing

One of the most common sources of bugs is ambiguity: some too-subtle API change that’s missed in a library update and introduces a subtle bug, that finally only gets found out in the field. My answer to that problem is … Continue reading

Posted in Anecdotes, C & C++, C++ for the self-taught, Embedded software development, Radical Refactoring | Comments Off

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

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