Contains common C/C++ libraries used in multiple SwarmUS projects. The libraries does not use the heap and thus can be used in embedded development.
A wrapper over nanopb for serialization and deserialization of messages
Note that you will need some requirements since we use protobuf and nanopb
- Protoc and some python deps to build Pheromones. Check Pheromones repo for more info
- The python libraries for protobuf to generate the required files
Nanopb itself will be fetch at generation to allow compilation on embedded targets.
On Ubuntu 20.04 you can download these requirements using apt install protobuf-compiler python3-protobuf
A library used for communication between the Hivemind clients. Note that as of now, there is some restrictions since the library does not use heap. Notably the length of the strings are maximum 32 characters, including the NULL terminating character. The arrays of arguments for a function call have a maximum of 16 arguments. The library does a lot of copies as of now, but it will be fixed eventually.
Note that we are using std::variant, if you use this library on an embedded target, avoid std::visit because of it's code and cpu cycle overhead.
A couple libraries to ease development using FreeRTOS
Library to manage freertos objects without using heap allocations
A library for common C utilities used in low level code (e.g. drivers and such). Can be used in embedded development without issues.
git clone https://github.com/SwarmUS/Propolis
cd Propolis
mkdir build
cd build
cmake ..
make
`
We use a couple tools and static analyzers, to follow them use.
-
CMake 3.13
-
Gcc or any c++ 17 compiler
-
Clang tools are used to match the style and warnings used in the project
- clang-format to match the coding style
- clang-tidy for additional compiler warnings
cmake -DENABLE_ERROR_ON_MISSING_TOOL=ON -DENABLE_WARNINGS_AS_ERROR=ON -DENABLE_WARNINGS=ON -DENABLE_CLANG_TIDY_CHECK=ON -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug ..