Skip to content
michael.caisse.io michael.caisse.io
c++ embedded library

Embedded Domain Specific Languages for Embedded Bare Metal Projects

Using embedded DSLs in C++ to create expressive, type-safe interfaces for bare-metal embedded development.

M

Michael Caisse

60 minutes

Event: c++now

Abstract

Embedded Domain Specific Languages allow us to express ideas at a higher level. They often provide a declarative abstraction that improves readability and reduces errors. EDSLs allow programmers to concentrate on value.

Embedded projects often worry about program and data size. They can have limited ROM or program execution space and stack is a premium. Between space accounting and general attitudes in the domain, nice abstractions are often exchanged from some hand crafted contortion to save a few bytes. Between a resource obsession and sometimes a loathing of abstraction, we can’t have nice things.

So, are EDSLs too expensive for embedded projects? Does the EDSL confuse more than help? Is abstraction worth it? C++14 and C++17 bring an expressiveness and performance to the language that increases the attractiveness of C++ in the embedded world.

This session will discuss the benefits of EDSLs and explore a few different open-source libraries that Ciere uses in embedded projects. We will take a look at the resource cost of abstractions and understand which techniques to use and which to avoid. To aid in our understanding, a basic filter computation EDSL will be developed during the session and will be used to demonstrate the cost of competing techniques.

Whether you are developing for small embedded systems or want a better understanding of using and writing EDSLs, this session will provide you with tools and techniques. Join us and improve abstractions in your code.

Play the video