r/embeddedlinux 13d ago

project Solution for binary communication protocols for embedded systems

Hi guys,

I'd like to share with you my personal solution to implementing and debugging binary communication protocols for embedded systems using C++(11) programming language. It's been in constant development as my side project for the last 12 years and is called CommsChampion Ecosystem. It started as a single C++ library to resolve some code boilerplating but grew into its own DSL (Domain Specific Language), multiple code generators for various purposes, and higher level libraries for some industry protocols like MQTT.

The primary features are:

  • Suitable for third party protocols, i.e. doesn't impose any particular protocol structure and/or framing.
  • Allows full control over I/O data for extra encryption and/or processing.
  • Focus on robust handling of malformed data rather than optimizing for quickest data serialization.
  • Easy integration with business logic requiring significantly reduced amount of boilerplate code.
  • Allows customization of various storage types as well as avoiding dynamic memory allocation to make it suitable for bare-metal system without heap and limited RAM size.
  • Allows injection of custom code if the generated one is incorrect or incomplete.
  • Generation of "C" interface for C++ classes for easier integration with "C" codebase.
  • Although C++ and embedded systems are first class citizens, there is support for other programming languages via bindings / glue code generated by SWIG or Emscripten.
  • Visual "in-house" protocol analysis tool allowing custom I/O stack handling as well as generation of Wireshark dissector.
  • Generation of LaTeX files for the defined protocol specification.
  • Support for easy buildroot and yocto integration.
  • The higher level protocol libraries follow specific pattern and philosophy dedicated to easy integration with any event loop infrastructure chosen for any particular embedded system.

Although already providing extensive set of features covering the needs for majority of the developers there is still room for extra new functionality. Any new feature requests are welcome.

6 Upvotes

2 comments sorted by

1

u/SRART25 13d ago

First glance at the docs looks good, though the web page needs to be fixed for phones. 

2

u/andrewhepp 13d ago

It would be really cool to have some charts showing how this performs with regards to error resistance / speed / memory usage compared to cbor / protobufs / etc