Hi all, I'm an embedded C++ software engineer. Over the years I had to implement multiple binary communication protocols used by various embedded systems. Every time I got annoyed and frustrated over a necessity to manually write error prone boilerplate code. There are so many available serialization tools and libraries (such as protobuf, simple-binary-encoding, etc...), but not a single one was adequate for my needs. Most of these tools focus on data serialization and facilitation of RPCs. Their main goal is to make data serialization and network transfer as quick as possible. It is a noble cause, but not really a first priority for embedded systems. For the latter it is much more important to protect against the malformed data and reduce amount of boilerplate code than to gain a couple of extra CPU cycles when performing the (de)serialization.

In all the solutions I've reviewed and analyzed the generated code is not customizable and in most cases not really suitable for embedded systems, especially bare-metal ones. There are no means to introduce some compile or generation time updates such as configuring polymorphic interfaces required for a particular application or choosing particular data structures, disable usage of RTTI or exceptions, etc... The code generated by all the tools still requires a significant amount of integration boilerplate code to be written. All of the available solutions focus on supporting multiple programming languages in their code generation rather than a quality of the code for a particular language (C++ in my case).

At the end I didn't have much choice but to implement my own C++ and embedded systems focused solution. It's called CommsChampion Ecosystem (https://arobenko.github.io/cc/). There is a good introduction article on CodeProject (https://www.codeproject.com/Articles/1278887/Implementing-Binary-Communication-Protocols-in-Cpl) which explains the main motivation and provides a high level overview of the presented solution.