MCU Frameworks
MCU Inference Runtimes
Google's C++ inference runtime designed for MCUs with no OS, no dynamic memory allocation, and no standard C library dependencies. The reference implementation for TinyML. Supports Cortex-M, ESP32, Arduino, and more via a flat .tflite model.
- No OS or dynamic allocation required
- Minimal C++ runtime (~20 KB Flash)
- Flatbuffer .tflite model format
- INT8 quantized inference (CMSIS-NN backend)
- Supports Cortex-M0 through M7, ESP32, AVR
End-to-end cloud platform for building and deploying TinyML models. Covers data collection, labelling, training, compression with the EON Compiler, and SDK export for dozens of MCU targets. Ideal for rapid prototyping and teams without deep ML backgrounds.
- Web-based data collection & labelling
- AutoML + transfer learning pipelines
- EON Compiler: optimises for RAM/Flash target
- Hardware profiling before deployment
- OTA model update support
Compiler-based approach: lower a model (ONNX, TFLite, PyTorch) through Apache TVM's Relay IR and compile to optimised bare-metal C for a specific MCU. Achieves the lowest latency of any framework through target-specific code generation.
- Accepts ONNX, TFLite, PyTorch, MXNet
- Target-specific kernel auto-tuning (AutoTVM)
- Minimal 4 KB runtime footprint
- No OS dependency
- Supports custom accelerators via BYOC
ARM's hand-optimised neural network kernel library for Cortex-M processors. Uses SIMD intrinsics (DSP extension) to perform INT8 MAC operations as fast as the hardware allows. Used internally by TFLite Micro and microTVM as a backend.
- Hand-written ARM Cortex-M assembly/C
- SIMD INT8 dot-product instructions
- Kernels: conv, depthwise, FC, pooling, ReLU
- Cortex-M4/M7/M33/M55 optimised variants
- Used as backend by TFLite Micro
Converts scikit-learn classical ML models (decision trees, random forests, k-NN, PCA) to tiny C code that runs on any MCU. Perfect when neural networks are overkill — decision trees for vibration classification can fit in under 1 KB.
- Exports scikit-learn models to C
- Decision trees, random forests, SVM
- PCA for dimensionality reduction
- Models as small as 100 bytes
- Zero dependencies, pure C output
Arduino-friendly wrapper around TFLite Micro. Simplifies model loading from a C header array and inference to a few lines of Arduino code. Ideal for hobbyist projects on Arduino Nano 33 BLE Sense, Raspberry Pi Pico, etc.
- Arduino library (PlatformIO / Arduino IDE)
- Load model from PROGMEM header array
- Simple predict() API
- Works with Edge Impulse exported headers
- Community tutorials for common use cases
Framework Comparison
| Framework | Maintainer | Min RAM | Model Format | Toolchain | Best For |
|---|---|---|---|---|---|
| TFLite Micro | ~20 KB | .tflite flatbuffer | TensorFlow, C++ | General TinyML, broad HW support | |
| Edge Impulse | Edge Impulse | ~10 KB | EON Compiler output | Web UI + SDK | Rapid prototyping, beginners |
| microTVM | Apache TVM | ~4 KB | ONNX, Relay IR | Python + LLVM | Optimal code-gen, custom MCUs |
| CMSIS-NN | ARM | Bare kernels | C functions | C / C++ | Hand-tuned Cortex-M kernels |
| Emlearn | Community | ~1 KB | scikit-learn export | Python + C | Classical ML on tiny MCUs |
| EloquentTinyML | Community | ~4 KB | .tflite via header | Arduino C++ | Arduino ecosystem |
Development & Tooling
Python library for applying quantization, pruning, and clustering to TensorFlow/Keras models before export. Integrates directly with the Keras training loop.
- QAT: tf.quantization.quantize_model
- Magnitude-based weight pruning
- Weight clustering (K-means)
- Combined pruning + quantization
- Export to TFLite .tflite
Utility step to embed a .tflite flatbuffer as a C byte array for inclusion in firmware. Edge Impulse and TFLite Micro both rely on this pattern — the model lives in Flash as a const array.
- xxd -i model.tflite > model_data.h
- Places model in .rodata / PROGMEM
- No filesystem required
- Model loaded at runtime from Flash
- Supported by all MCU toolchains
Cross-platform embedded development IDE and build system. Supports hundreds of MCU boards with consistent library management. First-class support for TFLite Micro, Edge Impulse, and CMSIS-NN.
- Unified build system for 1200+ boards
- Library registry with TinyML libs
- VS Code integration
- Unit testing on device + simulator
- OTA firmware update support
Supported Operators in TFLite Micro
| Operator | INT8 Support | CMSIS-NN Optimised | Common Use |
|---|---|---|---|
| Conv2D | Yes | Yes | Image feature extraction |
| DepthwiseConv2D | Yes | Yes | MobileNet-style blocks |
| FullyConnected (Dense) | Yes | Yes | Classification head |
| LSTM / RNN | Partial | Partial | Audio, time-series |
| Softmax / ReLU / ReLU6 | Yes | Yes | Activations |
| MaxPool / AveragePool | Yes | Yes | Spatial downsampling |
| Reshape / Transpose | Yes | No | Tensor manipulation |
