Tag: c++

  • C++17’s Useful Features for Embedded Systems

    In this article, I will be showing some features of C++17 that can also be helpful in the embedded world.

  • Pocket article: Debugging ccache misses

    This article provides a few tips and tricks for diagnosing ccache misses, to keep your C/C++ build nice and snappy!

  • Building an On-Device Embedded Testing Library

    There are too few C/C++ testing libraries designed for embedded devices. The traditional libraries are not designed for constrained resources and rely on host functionality like a filesystem or standard output.

    In this post, I detail why I’ve decided to design a new testing library for microcontrollers and cover the rationale, design choices, and thoughts on the prototype.

  • Firmware Static Analysis with CodeChecker

    In this post, I go over how to set up CodeChecker on a firmware project to reap the benefits of static analysis. I’ll also cover ways to deal with false positives, and configure your assert functions to be analysis-friendly.

  • Embedded C/C++ Unit Testing with Mocks

    In this article, we do a deep-dive into unit testing with mocks. We’ll go over where they fit into your unit testing infrastructure, how to write them in C/C++, and finally run through some real-world examples. At the end, we’ll briefly talk about integration tests.

  • Improving Compilation Time of C/C++ Projects

    Build times don’t have to be long, even yours! However, many factors play a role. In this post, we’ll dive into which factors contribute to slower builds, compare and contrast options, and also go over some easy wins which you can immediately contribute to your project and share with your teammates. The techniques discussed apply to most C/C++ compilers and projects, and there are a couple extra tips for those using the GNU GCC compiler.

  • The Best and Worst GCC Compiler Flags For Embedded

    In this article we will explore some of the best and worst compiler flags for GCC (and Clang). Our focus will be on flags used for embedded projects but the reasoning applies to other development environments as well. We will explore the impact each flag has by walking through practical C code examples.