MicroPython's Minimalists: Smallest RAM/Flash for Python

MicroPython has been optimized to run on devices with surprisingly minimal resources, with functional ports on microcontrollers having as little as 64KB of RAM and 256KB of Flash, often seen in specific STM32 or older ESP8266 variants, pushing the boundaries of what 'lean' Python can achieve.

The top 3

  1. MicroPython's Core Minimums: 16KB RAM, 256KB Flash: MicroPython is engineered to operate on microcontrollers with as little as 16 KiB of RAM and 256 KiB of flash memory, enabling its use in highly constrained embedded environments.
  2. The 'Bare-Arm' Port: MicroPython's Smallest Core Benchmark: The 'bare-arm' port serves as MicroPython's internal benchmark, representing the absolute minimum configuration, including the compiler, to track the core runtime and virtual machine code size.
  3. Frozen Bytecode: Maximizing RAM by Executing from Flash: To achieve minimal RAM usage, MicroPython employs 'frozen bytecode,' which allows pre-compiled Python scripts to be stored and executed directly from flash memory, rather than consuming valuable RAM during runtime.

Sources

Open the full topic