Booting Erlang in 16 MB – A New Milestone for GRiSP Nano Last Monday (2 June) at Code BEAM Light Stockholm Peer opened his presentation with the question Can the BEAM fit into 16 MB? Two days later, the GRiSP Nano prototype answered with an Erlang shell prompt. That success rests on work we’ve carried out since mid-2024.The 16 MB Hardware Budget GRiSP Nano pairs an STM32U5 Cortex-M33 (3 MB internal SRAM) with 16 MB of OctoSPI DRAM. A micro-SD slot handles storage; 4 PMOD™ connectors expose SPI, I²C, and UART. Micro-USB provides console access. USB-C, with OTG support, can act as a programmable host or client. Power can be supplied through either port, and in addition, from an energy harvester.We initially planned for 32 MB. But after the PCBs were made, a CPU erratum came to light. We had to search for a pin-compatible RAM chip with the right characteristics to keep things running. That’s how we landed at 16 MB. The constraint wasn’t planned, but it shaped the result.ONLY 16 MB! This is fine 🔥🐶 Zero chill: embedded limits, Erlang charm, and the joy of doing more with less.Closing the Gap By conference day the prototype could load most of OTP but stopped short of the prompt. The blocker was Unicode🚫. Two days later, we applied a targeted patch:Added a stub module unicode_util_rtems.erl that replaces the standard unicode_util on RTEMS.Adjusted the Makefile to use that stub.🔗 Patch LinkWith Unicode disabled, NANO finally booted on 4 June. We were so close! ⚡️🌈erlangEshell V16.0 … 1> ls(). .Spotlight-V100 erl_inetrc etc grisp.ini manifest nano ok⛏️ How We Carved Out Enough Memory ⛏️ Baseline: first boot managed only 7 modules with 7.4 MB free; the loader crashed soon after.Crypto out + aggressive compile/link flags: removing crypto (temporarily) and building OTP with -Os -fomit-frame-pointer -ffunction-sections -fdata-sections -Wl,--gc-sections raised free memory to 8.5 MB, allowing 45 additional modules to load.Strip BEAM files: running beam_lib:strip_release/1 saved a...
First seen: 2025-07-21 20:38
Last seen: 2025-07-22 06:44