Repository navigation
Home
English | Português (BR)
CelerOS is a lightweight, open-source GUI operating system with a JavaScript
app runtime for ESP32 microcontrollers. It turns cheap display boards into a
small "smartwatch-grade" device: an immediate-mode UI on top of LovyanGFX, a
Duktape JS engine running sandboxed apps from flash or SD, an App Store with
over-the-air updates, and a USB companion tool (celerctl) for day-to-day
development.
| Launcher | App Store | Settings |
|---|---|---|
![]() |
![]() |
![]() |
Captured from the real framebuffer of a SmartDisplay 4" (firmware 1.5) via celerctl screencap.
| Watchface on the Waveshare watch | Launcher on the watch |
|---|---|
![]() |
![]() |
Captured from the real framebuffer of the Waveshare watch via celerctl screencap (over the native USB).
Firmware 1.18.0 — the native-glass round (JS API levels 59–62):
-
Native core draws straight to the glass —
System.nativeScreen()(API 60) hands the loaded blob a framebuffer view (the RGB panel's own framebuffer on the SmartDisplay, lines shipped by GDMA) andSystem.nativeGrab()reads it back; the Anemoia NES emulator runs 52–60 fps with sound at 480x450.System.setAlpha(0..255)(API 59) blends the immediate primitives with the target (JS API). -
The gamepad became an OS input —
Input.pad/Input.padState()(API 61) is a broadcast channel (current state, no queue): the resident Controle BT driver injects the pad and the launcher moves focus, opens apps and exits with guide, while the right stick drives the pointer with R2 to click. Apps with the"input"permission read the same channel every frame. -
Bluetooth keyboards and mice —
BT.state().kind(API 62) classifies the connected device from the HID Report Map (kbd/mouse/combo/pad), a physical keyboard types into every text field (US layout, Shift/Caps, Enter/Esc) and theceleros.hiddep decodes reports on top ofceleros.gamepad's parser. Bluetooth headphones still do not work: the S3 radio has no Bluetooth Classic (A2DP). -
Crash forensics for native code — the
crash.txtline carries the architectural panic reason and the exec base of the loaded blob; the native loader keeps the image in internal RAM with the scratch in PSRAM. -
Leaner idle — the largest-free-block probe behind
System.delay/UI.endruns every 500 ms on PSRAM boards.
Firmware 1.15.0, before that — the loadable-native round (JS API levels 57–58):
-
Loadable native code (SPIKE) — a self-contained C/C++ blob (
core.bin, CLRN format) compiled outside the firmware is loaded withSystem.nativeLoad(), called withSystem.nativeCall(), fed withnativeWrite/nativeLoadFile/nativeSaveFile/nativeDraw/nativeAudio(API 58) and freed withSystem.nativeFree();System.appDir()exposes the installed package path. S3 boards with PSRAM only. -
Anemoia, the NES emulator — a whole NES core ships as a
core.binblob with the ROM loaded from the app folder; Bluetooth LE gamepad transport (BT.*, API 57) with parsing in theceleros.gamepaddep. - Internal RAM wave — jsnet stack, web POST bodies, screencap row buffers and mic WAV encodes moved PSRAM-first and the BLE controller pools were trimmed: the bench went from 88 B to ~26 KB stable internal RAM.
Firmware 1.14.0, before that — the OS first-class round (JS API level 56):
-
App contract enforced on device —
app.jsonapiis checked before the heap is created (an incompatible app gets a native "update required" screen instead of aTypeErrorcrash) and the declaredmainentry is honored. NewApp.info()exposes id/name/version/dataDir/api/runtimeApi and the granted permissions; newNet.fetch()waits for the network, retries GETs with backoff and always returns a typed result (NO_NETWORK/TIMEOUT/TRANSPORT/HTTP/TRUNCATED) instead of a silentnull. - Boot resilience — interrupted app installs are journaled and rolled back to the last version that ran; a system-app update on an unstable boot is reverted; 3 failed boots in a row enter safe mode (home app and autostart withheld, with an on-screen notice).
- Native update policy — the automatic firmware check moved out of the Nucleo app into an OS service (pure gates host-tested; checks cached for 5 minutes so the old app does not double-hit the hub).
- Bench-hardened edges — honest scan/connect errors in the WiFi portal, the dog's OLED I²C bus closed to apps, watch touch/IMU pins denied to apps, encoder input fix and the game.ui 1.4 modal tap layer; the factory module image shrank ~12–30% per module (the same bytes the hub serves).
Firmware 1.13.0, before that — the CelerKit round (JS API levels 52–55):
-
CelerKit UI 2.0 — factory and hub apps rewritten on the
celeros.appkit (style/icons/widgets/rows/list/form/caps): App Store 3.0, Settings, Installer (transactional install with rollback) and 14+ more apps (app development guide). -
WiFi became a JS app —
System.openWifiSetup()now launchesceleros.wifi2.0.0, which drives the native captive portal throughSystem.wifiPortal*; theAIobject became a build option (CELEROS_JS_AI, off on the CYD). (API 52) -
Native UI extras on S3 —
UI.custom,UI.clip/UI.unclipandUI.extras(CELEROS_UI_EXTRAS): the firmware clears/clips an app-declared area and repaints it only on a full frame or signature change (JS API). -
Games as native Studio projects — Detona!, Arrasa!, Lenda de Celer and Supernova are scenes/tilemaps in
studio_games/(single source; the flathub_apps/copies were removed), with the Celer Studio program mode (runtime:"app") and AI copilot alongside. -
Hardware bench round — a generic I2C bus for apps (
System.i2c, API 54) with the protocol living in the sharedceleros.hw.*driver libraries (servo, motor, LED, button, PCA9685; PCNT quadrature encoder and DHT11/DHT22 on API 55),System.gpio.servoUsfor fine calibration, and the service network windowSystem.wifiWake(API 53). The reference app is Hardware Lab on the hub.
Firmware 1.12.0, before that — the forensics round (JS API level 51):
- Crash forensics — crash.txt + crash screen/QR on glass boards, the agent reporting firmware crashes, WiFi passwords encrypted at rest (AES-CCM), USB MSC on the watch and app session telemetry.
-
Glass state —
System.isScreenOn()/System.screenState()(API 51); the game engine sleeps with the screen (E.onSleep/E.onWake).
Firmware 1.11.6, before that — the fleet round (JS API level 50):
-
Signed OTA —
update.jsoncarries an ECDSA P-256 signature overversion,api_version,firmware_sha256andvariant; the firmware verifies it against the embedded public key and the stream SHA-256 before switching slots. HTTPS manifests without a valid signature are refused. The private key stays outside the repository. -
Fleet agent —
celeros.agent(system app) runs a background service with heartbeat and commands for signed OTA, app updates, self-update, reboot, sync and diagnostics;caps.ota_signedtells a control plane whether the device verifies signatures (fleet agent). -
Background network + OTA — services use
Net.request/Net.download(net) andSystem.otaStart/restart/installZip(system) without pumping the foreground app (JS API). -
Eight boards — the headless ESP32-S3 devkit (
devkit-s3, USB Host) joins SmartDisplay, CYD/CYD-VSPI, robot dog, watch, devkit and ESP32-CAM; each has its own signed OTA channel (supported boards). - 1.11.0–1.11.5 added the stream SHA-256 check,
System.epoch(), the app.zip installer, app eviction before OTA and the hardfirmware_sha256gate for HTTPS.
Firmware 1.8.2, before that — the games round (JS API level 36):
-
Supernova 2.4, Detona! 0.8 and Arrasa! 1.1 — three full games now riding CelerGame, the game engine delivered as a shared dependency family (
celeros.gamecore +.fx/.spr/.tilemap/.uimodules): a 480×480 sprite shooter on a native canvas (API 28), a grid bomberman whose 1×1 duel plays over the Bluetooth mesh — lobby, invite and best of 3 rounds in the same arena built from a shared seed, with only discrete one-frame events crossing the radio — and a slingshot-vs-goblin-fortresses physics game. The monolithicceleros.enginestays on the hub as a 1.2.5 compatibility shim that assembles the family. -
Shared dependencies on the hub (API 30) — the game engine family, physics, mesh, SFX and grid libraries install once and every app reuses them (
deps.json): app packages got smaller and the app size ceiling rose from 128 KB to 1 MB. -
Native verlet physics (
System.verlet*, API 31) — integration, relaxation and collisions in C++ for worlds with thousands of points; Physics Drop 4 and the Bench Fisica app already ride it. The physics dependency is at 2.1: the oldP.world/P.tiles/P.flowhelpers are gone (2.0) — grids moved toceleros.grid, tumbling crates toSystem.rigid*. -
Native rigid bodies (
System.rigid*+System.drawSprite, API 33, S3 boards) — boxes that rotate, stack and topple, circles that roll, impacts that break pieces and fast projectiles that never tunnel through a thin plank; Arrasa! (slingshot vs. goblin fortresses, 10 levels with stars) is built on it. -
Games that sound and move right —
System.sfxmixes sound effects into the music (API 32 — a single audio slot used to freeze the game), only the rectangles that changed go to the glass (up to 8 dirty boxes per frame), and the SmartDisplay panel interrupt left the JavaScript core: the image no longer shakes and PSRAM boards gain up to ~2× more frames per second. - 1.8.1, in between, made over-the-air updates survive the trip: a dropped connection resumes by HTTP Range from the last written byte with growing back-off, and
celerctl pushverifies the board actually booted the slot it wrote.
Firmware 1.8, before that (JS API level 27) — the pack:
- The pack ("matilha") — devices discover each other and form a multi-hop Bluetooth mesh (CelerNet, API 26–27): every node relays by itself, presence carries each device's role, messages travel direct or broadcast up to 434 B across up to 8 hops, and the Pack hands the playing chiptune to the neighbour with a speaker — from the exact same beat (mesh page).
- Six apps that live on the mesh (App Store): Sonar (radar by rings of hops, real RTT ping/loss, census), Batata Quente (hot potato by unicast), Mural (message board that reaches devices that were off, via Trickle), Sentinela (IMU/mic watchdog with two-way alarm), Coral (4-voice choir with synchronised entry) and Pong Duplo (mirrored pong over the Celer Link) (mesh page).
- Bench-hardened radio (3 boards) — fragmented unicast now actually arrives (copies patch each other's lost fragments), relays step out of the burst's way and self-cancel, the radio arbitrates mesh × Celer Link × app scans, and Wi-Fi roaming only scans when the signal is weak (a connected scan deafened Bluetooth ~9 s every 39 s).
-
RAM to live with the pack — measured stacks,
.bssoff to PSRAM on the S3 boards, CelerLink retry leak fixed: the watch holds mesh + phone link + Wi-Fi without starving internal RAM. - meshsim in CI — the mesh apps run for real on N simulated nodes in the host suite: lockstep virtual clock, an air that models TTL/hops, fragments with per-link loss, the 96-packet all-or-nothing TX queue, Pack envelopes and Celer Link pairing.
Firmware 1.7, earlier in October: the talking dog — AI.speak() TTS played live (API 24), the LLM writing its own choreography (dog_script), the hop gait with the belly spin, AI barks in QOA, celerctl over Wi-Fi (Debug Bridge + provision), celerctl top profiling, persistent /local/log logs and a robustness round through the runtime.
Firmware 1.6: the UI toolkit (UI.*, API 22), multi-file apps with require() (API 23), voice 2.0 and Celer Link sealed with AES-GCM frames (API 21).
Earlier in the 1.5 cycle: on-device AI (AI.chat, API 18–20), voice and the wake word "Hi Celer" on-device (API 19–20), the JavaScript debugger over USB, watch deep sleep with a ULP-RISC-V sentinel, Phone Link over Gadgetbridge (Phone.*, API 15), watchface plugins (API 16), runtime APIs 12–17, the barebone devkit board, the CelerOS Flasher and the App SDK.
| Page | What it covers |
|---|---|
| Supported boards | The SmartDisplay 4", the CYD family, the robot dog, the Waveshare watch and the barebone devkit — and how to add a new board |
| Building and flashing | ESP-IDF 6.1, per-board builds, the LittleFS data partition and the test harness |
| Troubleshooting | Common build, flash, touch, Wi-Fi and web problems — and their fixes |
| Architecture | Boot flow, firmware layers, the JS runtime and code conventions |
| Robot dog | The SpotPear/ZZPET robot dog: full reverse-engineered pinout, bring-up firmware, the CelerOS board, the BLE "Celer Link" remote and voice commands ("hi celer, senta") |
| Waveshare watch | The AMOLED 2.06 smartwatch board: pinout ported from the Rust firmware, the Watchface home app, the AOD/deep-sleep screen ladder (with the ULP sentinel) and the Sensors API |
| Barebone devkit | The headless 4 MB ESP32 devkit: System.button() + LED, headless apps and the OTA channel |
| System apps | What lives in data/, the app.json rules and how apps reach the device |
| Web interface | File manager, firmware upload and the live screen mirror in the browser |
| Tools |
celerctl, the JS debugger, celerhub, the local OTA server and asset generators |
| celerctl (USB) | Command reference and the HostLink wire protocol |
| OTA updates | The update.json manifest, channels and web upload |
| Fleet agent |
celeros.agent: heartbeat, commands, signed OTA, app updates and the svchost contract |
| App development guide | How to package a JS app: app.json, folders, icons |
| Watchface plugins | How installed apps add widget lines to the watch face (watchface.js, API 16) |
| JS API | Full reference of the runtime (System, Net, FS, AI, Mic, WakeWord globals) |
| Contributing | Conventions, tests, CI and how to send a PR |
The pages above are the English originals; the Português (BR) section in the sidebar has the Portuguese translations.
- JavaScript app runtime — interactive ES5 apps run natively on Duktape (API level 62): canvas-style drawing, touch and the coupled on-screen keyboard, file system, HTTP/JSON networking.
-
On-device AI & voice —
AI.chat()talks to DeepSeek or OpenRouter from any app (async, TLS, function calling; keys stay outside the JS sandbox),Mic.*records 16 kHz WAV behind amicpermission, and the bundled Chat IA and Qwen apps are a chat client and a push-to-talk voice assistant. On the robot dog the wake word "Hi Celer" runs on-device and voice commands ("hi celer, senta") drive the legs (WakeWord.*, API 20 — robot dog). -
JavaScript debugger —
celerctl debug MyApp: Duktape debugger over USB with breakpoints, stepping, eval, watches and an automatic pause on uncaught errors (tools). - Immediate-mode UI — the same apps scale from 240x320 up to 480x480.
- System apps in JS — Settings, App Store, Installer, Help, Web Server, Terminal, Snake, Chat IA, Qwen and the demos live in the LittleFS partition; boards overlay their home apps (Watchface, Dog Face, Barebone).
- App Store & Installer — install apps from the CelerOS Hub over Wi-Fi or from the SD card.
-
Over-the-air updates — from the device itself, from the browser or via
celerctl ota push. -
Live screen from the browser —
/screenmirrors the display over Wi-Fi and forwards your clicks as touches. -
Board hardware in JS — RGB LED, light sensor with auto-brightness,
speaker (
System.beep), relay lines and servos (System.gpio.servo) on supported boards; robot boards add battery, microphone, capacitive touch pad and NeoPixel (System.battery/micLevel/touchPad/neopixel); the watch adds an IMU with pedometer and raise-to-wake (Sensors.accel/steps/temp), a battery, an RTC that keeps time without network and audio volume (System.setVolume); the headless devkit exposes the BOOT button (System.button(), API 17). - Watch-grade power management — the screen ladder dims after a few seconds, falls back to an always-on face with anti burn-in, then goes to automatic deep sleep guarded by a ULP-RISC-V sentinel that watches the buttons, the battery and the cable (PWR wakes it in ~100 ms); the watch boots straight into its watch face.
-
Celer Link (BLE) — a Bluetooth LE link between nearby CelerOS devices
(API 9): a board on a robot runs
CelerLink.start(), another one drives it withscan()/connect()/send()— see the robot dog page and the Celer Remote app in the hub. Since API 11 it pairs with a 6-digit code and a challenge-response key per bond. Runs on the SmartDisplay, the watch and the robot dog. -
Phone Link (Gadgetbridge) — the watch pairs with Android over BLE
posing as a Bangle.js: notifications with a full-screen alert, music
control, weather, incoming calls and find-my-phone (
Phone.*, API 15 — watch page). -
Notifications & alarms — a system notification center (
System.notify; on the watch an incoming notification wakes the screen) and persistent alarms with their own ringing screen (API 15). -
Watchface plugins — installed apps extend the watch face with widget
lines (
watchface.js+System.launchApp, API 16 — plugins page). -
CelerOS Flasher & App SDK — no-toolchain GUI flashing from
GitHub releases, and
tools/sdk/celer.jsfor scaffolding, linting, emulating (one PNG per clock milestone with pixel diffs) and publishing apps (tools). -
Wi-Fi via captive portal — a
CelerOS-Setup-XXXXaccess point to configure it from your phone. -
celerctl— an adb-style USB companion: shell, push/pull, logcat (timestamps, filters, non-destructive dump), the JS debugger, screencap and in-place firmware updates. The last app error persists to/local/lastcrash.txt(lasterrorin the shell).
- Repository · README in English · README em português
- Issues — bugs and ideas
- History: CelerOS started as a fork of KryonOS, by Haris.
This wiki is generated automatically by CI from
wiki/ in the
repository — edit there, not on the web.
Esta wiki e gerada automaticamente pelo CI a partir de wiki/ no repositorio. Edicoes feitas pela web serao sobrescritas.
Get started
Under the hood
Tools
Robotics
Wearables
Barebone
JavaScript apps
Contributing
Português (BR)




