This library provides a collection of proven algorithms and well‑defined interfaces targeting robotics applications. It is implemented in modern C++ (C++20) and is intended for use with STM32 microcontrollers and CMake‑based build systems.
StmEpic supplies a cohesive set of components—drivers, sensor and motor abstractions, control algorithms, memory utilities and logging—that are designed to interoperate with minimal configuration. Components are organized to simplify integration of sensors, actuators and communication peripherals into real-time systems.
The framework integrates with FreeRTOS for task scheduling and is compatible with STM32CubeMX generated projects to accelerate development and hardware configuration.
- C++20 — Modern C++ language features and idioms.
- CMake — Cross‑platform build and configuration system.
- STM32CubeMX integration — Project generation and peripheral configuration.
- FreeRTOS — Real‑time task scheduler for embedded applications.
- ETL (Embedded Template Library) — Lightweight, header‑only containers and utilities. link
- Device — Unified device abstraction for status, reset and connection management.
- DFU — USB Device Firmware Upgrade support (hardware dependent).
- Drivers — RTOS‑aware, thread‑safe drivers for I2C, SPI, UART and CAN; designed for concurrent, non‑blocking access.
- Encoders — Interfaces for common encoder types.
- Filters — Signal processing primitives and filter implementations.
- GPIO — Portable GPIO abstraction layer.
- Hash — Hashing utilities with planned hardware acceleration support.
- Logger — Structured JSON logging over USB, with timestamps, levels and metadata.
- Memory — Utilities for FRAM and FLASH access and data framing.
- Motors — Common control interfaces and implementations for stepper, BLDC and DC motors.
- Movement — Motion control algorithms and closed‑loop controllers.
- Sensors — Drivers and interfaces for a variety of sensors.
- Status — Consistent result and error handling types.
- Timing — Software timers and scheduling helpers.
- STM32F1 - 103
- STM32F4 - 405, 412, 446
- STM32H5 - 563
- STM32H7 - 750
- STM32U5 - 585
Disclaimer: The library will most likely work with other STM32 series, but it wasn't tested.
- Clone the repository to your project directory DON'T FORGET TO INITIALIZE SUBMODULES.
- Add the following line to your CMakeLists.txt file:
add_subdirectory(StmEpic)
target_link_libraries( <YOUR_PROEJCT_NAME> PUBLIC stmepic)- Now you can simply include header files.
The library is designed to be used with the code generation tool STM32CubeMX.
- Create a new project in STM32CubeMX.
- In the project settings, set generate code as CMakelist.
- Enable FreeRTOS/CMSISV2 in the project settings.
- Include all source files from the library to the project.
- Don't forget to have ARM GCC toolchain installed. You can download it from here or get docker image to build the project from here.
You can find StmEpic documentation on our website.
