The Rohans — Machine Learning / Embedded OS
A micro-controller OS for the machine learning age. Chestnut builds tensor math and a Lisp REPL (Read Evaluate Print Loop) into the kernel, supporting custom model inference and runtime control by frontier models via Lisp.
=== Chestnut OS === cpu: 240 MHz apb: 80000000 Hz sd: SDHC card, 960 MB (1966080 sectors) sd: mount ok Type 'help' for commands. chestnut> lisp lisp> (define A [[1 2][3 4]]) A lisp> (@ A A) [[7 10] [15 22]]
From the boot loader to the OS, Chestnut is designed for small devices doing machine learning workloads. Tensor and matrix operations are a primitive in the kernel, and can - not only be used by your own custom models - they can also be used at runtime via Lisp.
Chestnut targets Xtensa LX7, ARM, and RISC-V processor architectures (found in ESP32, ESP32-S3 and the Raspberry Pi) and has drivers for SD cards, cameras (the Ov3660 for example), UART, I2C and basic USB devices. Chestnut gives your models direct access to the hardware without trying to be overly generic.
Chestnut gets the OS out of the way for your model. The whole OS can fit on an old 8-inch floppy disk with room to spare... but where you store your model weights is up to you.
| Runtime configuration | Approx. code size |
|---|---|
| Bare metal, hand written fixed-point matmul | 1–30 KB |
| Chestnut with kernel + shell + Lisp REPL + tensor ops + drivers | 48 KB |
| Small embedded ML runtime | 30–150 KB |
| Optimized vendor / kernel libraries | 20–200+ KB |
| Full-featured portable inference runtime | 100 KB–1 MB+ |
(Chestnut's 48 KB figure is the size of the binary's .text section
when compiling the kernel, shell, Lisp and drivers for the ESP32-S3)
Most of Chestnut is compiled code, but sitting on top of that is a Lisp REPL, and that layer can stay live and reachable while the device is running. This allows one to not only extend and overwrite parts of the system at run time, it allows frontier models (LLMs) to manipulate and change embedded devices.
Anything written as Lisp (control logic, the glue between a sensor and a model's output, small decision rules) can be redefined over the wire without re-flashing or rebooting. Connect over serial, send a new function definition, and the system behaves differently on the next call.
| Architecture | Example Platform |
|---|---|
| Xtensa LX6 | ESP32 |
| Xtensa LX7 | ESP32-S3 |
| RISC-V (RV64) | ESP32-C* |
| ARMv7 | Raspberry Pi Zero 2 W |
| ARMv6 | Raspberry Pi 1 / Zero |
| RISC-V (RV32) | Browser |
Chestnut OS is not for sale or available open source.
It is one of several commercial products by The Rohans Limited and
Beluga Navigation Systems.
Contact us if you are interested in licensing.