esp32.diy

NucleoOS: Web-Native OS with Offline AI for M5Stack Cardputer

Oct 13, 2026 · 5 min read

Intermediate 62 stars 4 forks C NOASSERTION Updated 2026-10-12

Costellazioni — 6DOF space combat in a procedural star system

TL;DR NucleoOS turns the M5Stack Cardputer into a real multi-app operating system with an offline AI assistant, a browser-based desktop shell, voice transcription, games, and a security toolkit — all on one ESP32-S3 with no PSRAM. A single universal binary supports both the original Cardputer and the Cardputer ADV, and you can flash it in minutes with a web flasher.
What you need
  • M5Stack Cardputer
  • M5Stack Cardputer ADV (Stamp-S3A)
  • microSD card (FAT32 formatted)
BoardM5Stack Cardputer / Cardputer ADV (ESP32-S3)
FrameworkESP-IDF
LanguageC
LicensePolyForm Noncommercial 1.0.0
Latest Releasev0.7.2
DifficultyIntermediate

What You Will Build

NucleoOS is not a menu of tools — it is a complete operating system for the M5Stack Cardputer. Flash it once and you get two user interfaces from a single binary: a native UI on the Cardputer's 240×135 screen, and a desktop-class web shell served directly by the device and rendered in any browser on your local network.

The split is the key architectural idea. Heavy work — file management, spreadsheets, AI inference, WebGPU image generation — runs in the browser where there is plenty of memory. The microcontroller handles what it does best: games, sensors, audio, and the always-available offline AI engine.

Out of the box you get ANIMA (an offline-first AI assistant), bilingual voice output, on-device voice transcription via Vosk WebAssembly, a full space game called Costellazioni (both browser and native versions), Game Boy and Game Gear emulation, an SSH terminal, a spreadsheet with an AI copilot, a security lab, OTA updates with A/B rollback, and a collection of pocket instruments including a bubble level, protractor, pedometer, and mic spectrum analyzer.

Costellazioni — landing on a world surface with biome discoveries\2
Costellazioni — landing on a world surface with biome discoveries
Costellazioni — the galaxy map, plotting a hyperspace jump\2
Costellazioni — the galaxy map, plotting a hyperspace jump
ANIMA offline AI assistant running in the NucleoOS browser shell\2
ANIMA offline AI assistant running in the NucleoOS browser shell
AI Chat connected to a cloud model (Groq shown) from the browser shell\2
AI Chat connected to a cloud model (Groq shown) from the browser shell

What You Need

Hardware

Software for flashing

Optional — for richer AI responses

No PSRAM, no extra shields, and no cloud account are required to get started.

Typical use cases

Offline AI Assistant

ANIMA answers device queries, unit conversions, arithmetic, and general questions entirely on-device when no network is available, with no hallucination on grounded facts thanks to its C-based NL engine.

Pocket Security Lab

Wi-Fi sniffing to pcap, deauth and beacon suites, BLE scanning, BadUSB DuckyScript runner, and Evil Portal testing — all operated from the Cardputer keyboard or the browser shell.

Portable Game Console

Runs native multiplayer games over ESP-NOW, emulates Game Boy and Game Gear from your own ROMs on the SD card, and streams the full Costellazioni space game to the browser.

Browser Desktop Shell

Serves a full PWA desktop — file manager, spreadsheet, SSH terminal, Paint with AI image generation, and AI chat — to any browser on the local network, with no cloud dependency required.

How NucleoOS Works

The ESP32-S3 on the Cardputer has no PSRAM and roughly 512 KB of RAM. NucleoOS is designed around that constraint. The native firmware runs on ESP-IDF and FreeRTOS, drives the Cardputer screen and peripherals, and simultaneously runs an HTTP server that serves a Progressive Web App (PWA) from the SD card. A /api/screen endpoint streams the physical panel as a BMP — so the browser can mirror the device screen at essentially zero heap cost.

ANIMA's AI engine works as a cascade. Grounded facts come first: device actions, battery level, Wi-Fi status, time, dates, unit conversions, and arithmetic are answered exactly from a C engine that cannot invent values. Then, if configured, it queries a local model on your PC (Ollama, LM Studio, llama.cpp, or Jan). Next in line is a cloud model if you have a key. Finally, there is an in-browser option: a full LLM running on WebGPU (Qwen3-1.7B) or the device's own NL engine compiled to WebAssembly. In Private mode, every internet step is skipped and nothing leaves your machine.

Voice output uses a concatenative TTS engine (Italian and English) that pre-vocalizes a finite vocabulary on the PC and assembles the right audio clips at runtime. The result is natural-sounding speech with near-zero RAM cost on the device.

Each native game reboots the Cardputer into a fresh heap for maximum available RAM — a deliberate design choice that keeps complex games running on a no-PSRAM chip.

Flash and First Boot

Option 1 — Web flasher (recommended)

  1. Open indecenti.github.io/NucleoOs in Chrome or Edge on a desktop.
  2. Plug the Cardputer in with a USB-C cable.
  3. Click Connect & install NucleoOS.
  4. Press reset on the Cardputer when prompted.

Option 2 — M5Launcher

Copy nucleoos-<version>.bin from the latest release to the SD card and install it through the Launcher's SD installer. NucleoOS then runs alongside your other firmwares.

Option 3 — esptool

esptool --chip esp32s3 --baud 921600 write_flash 0x0 nucleoos-latest.bin

Prepare the SD card

Format the microSD card FAT32. On first boot, the wizard can download the card content (apps, web OS, ANIMA knowledge) over Wi-Fi automatically — verified, resumable, and skippable. Alternatively, extract nucleoos-latest-sd.zip from the latest release to the card root so that /apps, /www, /system, and /data sit at the top level. The zip is SD content only, never firmware.

First boot wizard

The Cardputer's built-in keyboard guides you through choosing a language, connecting to Wi-Fi (or starting the device's own access point), and giving the device a name. The screen then displays a local IP address. Open it in any browser on the same network and enter the 6-digit PIN shown under Control Center ▸ Web or Settings ▸ Device to pair.

OTA updates are offered automatically in Settings ▸ Updates with checksum verification, A/B slots, and automatic rollback: if new firmware crashes before completing its first run, the Cardputer reverts to the previous version on its own.

Ideas to Extend It — and Limitations to Know

Ways to go further

Limitations to be aware of

Verdict

NucleoOS is one of the most architecturally ambitious ESP32 firmwares available: it turns a pocket keyboard computer into a genuine multi-app OS with offline AI, a browser desktop, voice, games, and a security toolkit — without PSRAM. The design is disciplined and honest about the hardware's limits, putting heavy computation in the browser where it belongs and keeping the microcontroller focused on what it does well. The noncommercial license and the inclusion of offensive security tools mean you should read the terms carefully before using it outside a personal research or learning context.

Sources

github.comindecenti/NucleoOs — repository & README

Facts in this article come from the project's public README and GitHub metadata at the time of writing. Images belong to their respective owners and link back to the original source.