← Back to the chapter · Next detail →

Technical detail · TinyML on Microcontrollers

A second memory budget: 256 kB flash and 64 kB SRAM

11.5 Deep Dive: Runtime and Memory Fit

Microcontroller-class deployment often means kilobytes to a few megabytes of memory, milliwatt power budgets, often no operating system, and sometimes no floating-point unit. That is different from an edge gateway with Linux, large RAM, and a filesystem. On an MCU, the model must be self-contained with its runtime, sensor buffers, tensor arena, firmware stack, and update path. The product constraint, not the demo model, decides feasibility.

A concrete budget pass turns that constraint into numbers. On a board with 256 kB flash and 64 kB SRAM, a 60,000-weight INT8 model consumes about 60 kB of flash. If the runtime and required operators take 92 kB, the application and radio stack take 74 kB, and update metadata takes 12 kB, the flash total is 238 kB, leaving 18 kB of headroom. SRAM is separate: an 18 kB tensor arena plus an 8 kB audio feature buffer and 12 kB for stack, logs, and radio state uses 38 kB, leaving 26 kB. That deployment is plausible; doubling the feature buffer requires a new fit check even though the model file did not change.

← Back to the chapter · Next detail →