Posts in Dev

Embedded Time Management

As an embedded project matures, having methods to track timing and durations become necessary. In this post I’ll describe how I typically implement time in an embedded project so its cross platform while also not slowing down unit tests.

Read more ...


Release Versioning In C/C++ Projects

How do you define semver in a large C/C++ project? For CMake-based projects the simplest solution is to rely on the version info passed to the CMake project directive. But what do you do when you have multiple languages/tools in a monorepo that need access to the project semver? In this situation, I’ve developed a somewhat simple solution for a single, easily accessible source of truth on project semver information.

Read more ...


Writing Embedded Device Drivers

In this post I wanted to quickly describe some of the guiding principles I follow when writing device drivers in C++ for an embedded project. By “device driver” I mean the code that provides an interface between your application and some hardware device on an embedded system. For instance: an IMU, a temperature sensor, an ADC sensor, a motor controller, etc.

Read more ...


Docker for SW Development

This is from a lunch-n-learn I hosted which aimed to showcase the features and advantages of using docker during the development process. It includes with a few tutorials on how to use it.

Read more ...


Spying on a CANOpen bus

CANOpen is a protocol stack that sits on top of a normal CANBus. Recently I found myself needing to monitor the traffic between 2 devices on a CANOpen network. Monitoring a CANbus by itself is easy to do with a little Python. Where I ran into difficulty was interpreting the raw CANbus frames into CANOpen messages. Here’s how I solved that.

Read more ...


Defining CANBus messages with a DBC file

DBC files are a standard way to define the messages that will be transmitted over a raw CANBus. While working with this format I found it easy to find tools that could interpret, use, and generate DBC files. However I had a hard time finding resources to describe the format and schema of these files. This post describes some of the schema details I found the most helpful, many of which I had to learn by digging through the source code of tools that work with DBC files. Personally, I find examples the easiest way to learn/understand schema basics, so I’ll use that here while also describing the schema itself.

Read more ...


Embedded Development Primer

This post is meant to be an overview of some principles and practices I have found helpful for professional baremetal embedded development. This is meant for people who want to have total control over their embedded development environment and codebase.

Read more ...