mitteLib
|
Nice C++17 goodies made in Mittelab
Repo: https://git.mittelab.org/proj/mittelib
Documentation: https://proj.mittelab.dev/mittelib/
PlatformIO lib: https://platformio.org/lib/show/12998/mitteLib
This library aim at providing some handy, general purpose functionalities to embedded development. The C++ STL is rich but some functionalities (e.g. std::variant
) require features (e.g. CTTI) that are generally disabled on embedded platforms; other helper classes instead are common patterns when interoperating with C libraries. This was originally developed for ESP-IDF, in C++17, but it should be platform and framework independent (depending only on C++ 17). Among the added functionalities, binary streams, enum-based variants, and observer-pattern helper classes.
platformio.ini
: pio run
or pio test
. If it does,platformio.ini
the dependency on mitteLib: mlab/
, and the objects in the mlab
namespace: Important folders:
mittelib/
mittelib/{include, src}/mlab/
tests/
tests/lib/mittelib/
mittelib/
, to allow the unit tests to pick up the local library foldertests/test/.keep
Secondary folders:
cicd/
Helper files needed by CI/CDdocs/
Doxygen config and additional doxygen sourcesmisc/
Helper files needed for setting up development, logos, non-source material.tests/platformio.ini
. You can, for exampletests/platformio.ini.sample
to your board and setup, orcicd/platformio.ini
, the file used by CI/CD.clang-format
file to format the source, e.g. by Note on the test project structure. We set up the unit test project in such a way that we can use both pio run
and pio test
to run the unit tests. The two commands are similar but different enough that some commands are available for one and not the other (for example, the compilation database is generated for pio run
but not pio test
). We work around this by providing a test transport (similar to the one provided by pio test
), our own app_main()
function and building sources and tests together.
tests/platformio.ini
as above.pio test
or pio run
, as follows: ./docs/_build/html/index.html
.