Design once in OE-Studio, target any board via boards/<id>/board.yaml, and ship sub-8 ms, zero-tear, 100 KB Flash, 3 KB DRAM embedded UIs — with zero LVGL, zero Arduino_GFX, and zero vendor BSPs.
Most embedded UI stacks force an ugly trade-off: either accept 40 MHz vendor BSPs, ~500 KB Flash / 50+ KB internal DRAM bloat, and 25–40 ms frame drops, or spend months hand-coding pixel loops tied to a single PCB.
optimi_embedded (oe_*) gives you both worlds — silicon-level speed AND a multi-board, visual authoring workflow:
- 🔌 Multi-Board by Design (
oe_board+oe_hal+oe_gfx_geom.h) — Every board is declared in a validatedboards/<id>/board.yaml(display geometry, shape, pixel format, pinout, power rails, IMU mount, RF limits, quirks, and its ownbaseline.json). Build-timetools/gen_board.pygeneratesoe_board_config.hand propagates it across the entire firmware with 0 B runtime overhead. Switch targets withidf.py -DOE_BOARD=<id> buildor add an out-of-tree board viaOE_BOARD_DIRwithout forking the SDK. - 🎨 OE-Studio — Visual Embedded UI IDE & Native C Compiler — Design, prototype, localize, reflow across screen shapes, and flash directly to hardware from a zero-dependency browser studio. Exports native
oe_uiC by default (-77% Flash, -100% PSRAM vs. LVGL shim) or clean LVGL 9 C in one click. 👉 Explore OE-Studio in depth → - 🚀 2×–12× Faster Than Stock BSP + LVGL — Measured on our reference board (Waveshare ESP32-S3-Touch-AMOLED-1.75C,
466×466round CO5300 @80 MHzQSPI):10.43 msfull-circle push/swipe,4.47 ms3D engine,6.13 msBayer globe,0.67 mslabel update, and0.00 ms/0SPI bytes when idle. - 🧩 Drop-In LVGL v8/v9 Compatibility Shim — Already have LVGL screens? Keep your existing
lv_btn_create/lv_subject_*/lv_anim_timeline_*/lv_translation_*code untouched while shrinking the UI stack ~8× (0 Binternal DRAM). - 🔋 Wearable-Grade Power & Formal Reliability — Automatic
240 ↔ 80 MHzDFS,-92%idle wakeups via hardware touch IRQ (< 15 µswake), CO53000x39 IDMON8-color AOD, on-demand IMU standby, and 18 formally specified state machines (SM-1–SM-18) backed by 140 C++ host tests (ASan + UBSan) and 121 OE-Studio tests.
Stop hand-tuning pixel coordinates in C structs and waiting 45 seconds per rebuild.
OE-Studio is a built-in, zero-npm-dependency visual UI studio, XML-to-C compiler, interactive simulator, and MCP agent server that runs locally in your browser (node oe_studio/bin/oe-studio.js serve examples/oe_xml):
- Pixel-Exact Live Preview — Renders your UI through the real
oe_uiC++ renderer (not an approximate HTML/CSS mockup), complete with round-bezel safe-area guides, snap-to-grid, 8-point resize handles, and live widget pool telemetry. - Interactive Play Mode — Click buttons, drag sliders and arcs, pick dropdowns/rollers, step spinboxes, trigger page transitions, and test state bindings right in the browser before touching hardware.
- One-Click Multi-Form-Factor Reflow — Switch between round watch panels and rectangular displays; OE-Studio offers an automatic, single-step undoable reflow that rescales geometry, border radii, flow rows,
<use>part slots, font sizes, and label wrap widths so every string fits its container. - Design System, Localization & Motion — Manage Design Tokens (with inline RGB pickers), Looks, reusable Components (
<part-def>), Strings (CSV/JSON import, primary language switcher, live RTL Split View for Hebrew/Arabic), and Motion timeline scrubbers. - Native
oe_uiC or LVGL 9 C Export + Direct USB Flash — Export deterministic, zero-runtime-overhead C99/C11 code (defaulting to ultra-lean nativeoe_uiC, or toggle to LVGL 9 C) and Flash directly to a connected ESP32-S3 over USB from the toolbar. - Team-Ready History & AI Agent Co-Design — Interactive Action Stack undo/redo, versioned
.oe-history/diffs, Developer Identity & XML Revision Tracking (⚙ Settings),studio-versioncompatibility checks, automated Golden UI Checks, and a native MCP Server so coding agents can inspect, edit, preview, and test screens live beside you.
👉 Read the full OE-Studio Guide (for Developers, Designers & Product Teams) →
Every board lives in boards/<id>/ with a single declarative source of truth:
boards/
├── board.schema.json # JSON Schema (draft 2020-12)
├── waveshare_esp32s3_touch_amoled_175/ # Reference board: 466×466 round AMOLED (1.75 & 1.75C)
│ ├── board.yaml # Pins, variants, display, rails, IMU mount, RF limits, quirks
│ ├── board.cpp # SM-17 bring-up (bus → rails → variant latch → drivers)
│ ├── baseline.json # This board's measured silicon benchmark baseline
│ ├── sdkconfig.board # Board-specific flash/PSRAM/target Kconfig
│ └── partitions.csv # Board-specific partition table
├── ci_probe_rect/ # 410×502 rectangular AMOLED compile/geometry probe
└── host_sim/ # Host simulator board for C++20 regression tests
Select a board at build time (or point at an out-of-tree board directory without modifying the SDK):
# Build for the default reference board (Waveshare ESP32-S3-Touch-AMOLED-1.75 / 1.75C)
idf.py -DOE_BOARD=waveshare_esp32s3_touch_amoled_175 build flash monitor
# Build for another board or an out-of-tree custom board
idf.py -DOE_BOARD=ci_probe_rect build
# Or via menuconfig: CONFIG_OE_BOARD_CUSTOM=y + CONFIG_OE_BOARD_DIR=/path/to/my_boardIn firmware, one call brings up the board cleanly in SM-17 order (INV-BD1–INV-BD5):
#include "oe_board.h"
#include "oe_gfx_geom.h" // Compile-time dg::CX, dg::CY, dg::SAFE_*, dg::px()
extern "C" void app_main(void) {
oe_board_t board = {};
ESP_ERROR_CHECK(oe_board_init(&board, OE_BOARD_INIT_ALL));
// board.disp->width / height / shape / frame_budget_us live in flash .rodata (0 B DRAM)
}Board Identification Policy: Every board in
boards/<id>/has its ownframe_budget_usandbaseline.json— boards are never silently compared against each other. All silicon benchmarks quoted below were measured on the Reference Board:
- Board: Waveshare ESP32-S3-Touch-AMOLED-1.75C (
boards/waveshare_esp32s3_touch_amoled_175)- Silicon:
ESP32-S3R8Dual-Core Xtensa LX7 @ 240 MHz active / 80 MHz idle DFS, 8 MB Octal PSRAM @ 80 MHz, 32 MB QIO Flash @ 80 MHz- Display:
466×466round AMOLED, Chipone CO5300 QSPI @ 80 MHz,RGB565-BE- Baseline Record:
boards/waveshare_esp32s3_touch_amoled_175/baseline.json
The same 7 benchmark scenes built four ways — stock, lvgl_oe, and oe compat sharing bench/common/bench_scenes.cpp, plus pure native oe_ui (bench/oe_native/main/main.cpp) — timed on the same Waveshare ESP32-S3-Touch-AMOLED-1.75C board (render + push until the last pixel leaves DMA):
Scene (ms/frame avg · Waveshare AMOLED 1.75C, v0.7.0) |
Stock BSP + LVGL 8.4 | LVGL 8.4 on oe drivers |
oe (LVGL compat) |
oe_native (pure oe_ui) |
|---|---|---|---|---|
| Idle (nothing changes) | 0 frames | 0 frames | 0 frames | 0 frames |
| Label (one text update) | 2.01 | 1.72 | 0.64 | 0.64 |
| Widgets (slider + arc + bar) | 7.75 | 6.41 | 2.17 | 2.17 |
| Full-screen redraw | 39.60 (107 slow) | 30.18 (161 slow) | 9.34 † (0 slow) | 9.34 † (0 slow) |
| Scroll (20-row list) | 34.77 (119 slow) | 25.82 (185 slow) | 8.34 † (0 slow) | 8.30 † (0 slow) |
| Slide screen load | 38.25 (74 slow) | 28.27 (123 slow) | 9.98 (0 slow) | 9.98 (0 slow) |
| Fade screen load | 99.61 (38 slow) | 89.95 (42 slow) | 14.41 (0 slow) | 14.41 (0 slow) |
† Spread over 3 frames to stay under 16 ms (~21/s full screens vs 32/s for LVGL on oe_co5300). oe_lvgl_compat adds 0.00–0.04 ms/frame and 6.3 KB flash over pure native oe_ui (399,664 B vs 393,184 B). Full method & build projects: bench/README.md.
Measured via esp_timer_get_time() (1 µs) across 2,078 / 2,078 consecutive rendered frames (0 slow > 16.00 ms, 7.79 ms active gallery mean):
| Metric (Waveshare ESP32-S3-Touch-AMOLED-1.75C) | Stock Waveshare BSP + LVGL v8.4 | optimi_embedded (oe_*) |
Real Silicon Gain |
|---|---|---|---|
| Static / Idle Screen | 5–10 ms wake/poll @ 240 MHz |
0.00 ms (0 SPI, 10 Hz IRQ @ 80 MHz DFS) |
-92% wakeups, 3× lower idle clock |
| Rolling Odometer Digit | 6.80 ms |
0.57 ms |
11.9× faster |
3D IMU Bayer Engine (280×280) |
~28+ ms |
4.47 ms (5.38 ms max) |
~6.3× faster (224 FPS eq.) |
Dithered Bayer Globe (320×320) |
~32+ ms |
6.13 ms (7.04 ms max) |
~5.2× faster (163 FPS eq.) |
Verlet Spider Web (330×322) |
~26+ ms |
6.27 ms (6.76 ms max) |
~4.1× faster (159 FPS eq.) |
Full-Screen 466×466 Shaders |
~45+ ms |
11.09–12.16 ms (zero-PSRAM stream) |
~4× faster (60 FPS locked) |
| Full-Screen 2-Screen Swipe | 36–38 ms (26 FPS) |
10.43 ms (10.69 ms max) |
3.6× faster (60 FPS locked) |
| Active Touch I²C Latency | 2.2–5.0 ms (vTaskDelay) |
0.35 ms (0.00 ms idle, < 15 µs IRQ) |
~10× faster |
| Total Core SDK Flash / Static DRAM | ~495 KB / ~48–75 KB |
100.14 KB / 3.08 KB (0 B UI) |
4.9× smaller Flash, >15× less DRAM |
Pick only what your firmware needs — every component is standalone with zero BSP/LVGL dependencies:
| Layer | Components | Highlights |
|---|---|---|
| Board & HAL | oe_board, oe_hal |
boards/<id>/board.yaml → build-time oe_board_config.h, SM-17 oe_board_init(), .rodata oe_disp_info_t, IMU mount & touch rotation transforms, RF limits. |
| Display & 2D Graphics | oe_co5300, oe_gfx |
80 MHz QSPI ping-pong DMA, shape-aware oe_disp_push_frame_*, PIE 128-bit SIMD (oe_gfx_simd.h), oe_gfx_geom.h, 8 SIL OFL 1.1 AA fonts (40.5 KB), BiDi/RTL text, transitive dirty-rect merger. |
| UI & XML Runtime | oe_ui, oe_lvgl_compat, oe_xml_rt |
26+ retained-mode widgets, flex & grid layouts, 5-language RTL keyboard, animated screen loads, Bayer gradients, drop-in #include "lvgl.h" shim (7 Kconfig extensions), optional zero-DOM streaming SAX XML runtime (CONFIG_OE_XML_RUNTIME). |
| Shaders & Audio | oe_shader, oe_es8311, oe_es7210 |
Zero-PSRAM IRAM fragment shader engine (~11 ms on Waveshare 1.75C), pop-free Core 0 I²S DAC + PA FSM (ES8311), dual-mic capture + Q15 VAD (ES7210). |
| Sensors, Power & Connectivity | oe_cst9217, oe_qmi8658, oe_power, oe_i2c_bus, oe_wifi, oe_ble, oe_sd, oe_ext_io |
IRQ-gated touch with ESD recovery, board-mounted 6-axis IMU + WoM, DFS + AOD + Light Sleep power manager, hardened Wi-Fi STA + NimBLE BLE 5.0 coex, 1-bit SDMMC, safe expansion IO. |
Remove lvgl from idf_component.yml, add oe_lvgl_compat to REQUIRES, bind your context once, and compile your existing LVGL v8/v9 screens untouched:
#include "lvgl.h" // Drops straight onto oe_ui (0 B internal DRAM!)
oe_ui_ctx_t *ui = (oe_ui_ctx_t *)heap_caps_calloc(1, sizeof(oe_ui_ctx_t), MALLOC_CAP_SPIRAM);
oe_ui_ctx_init(ui, OE_DISP_W, OE_DISP_H);
oe_lvgl_bind_ctx(ui);
lv_obj_t *scr = lv_obj_create(NULL);
lv_obj_t *btn = lv_btn_create(scr);
lv_obj_set_size(btn, 160, 48);
lv_obj_align(btn, LV_ALIGN_CENTER, 0, 0);
lv_obj_t *lbl = lv_label_create(btn);
lv_label_set_text(lbl, "LAUNCH");
lv_obj_center(lbl);
lv_obj_add_event_cb(btn, on_launch_cb, LV_EVENT_CLICKED, NULL);
lv_scr_load(scr);See exact per-extension ELF byte costs in docs/LVGL_PORTING.md.
New here? Follow
GETTING_STARTED.mdfor the complete zero-to-flashing walkthrough (hardware links, OS setup, running OE-Studio with or without AI MCP, and one-click USB flashing) — or jump straight intodocs/OE_STUDIO_MCP.mdto connect Claude Code, Cursor, VS Code, Antigravity, Windsurf, or Codex CLI.
# 1. Launch OE-Studio in your browser (zero npm install!)
node oe_studio/bin/oe-studio.js serve examples/oe_xml
# 2. Run all 261 automated host & studio tests (< 5 s)
./tests/run_tests.sh # 140 C++ host tests (use OE_SANITIZE=1 for ASan/UBSan)
(cd oe_studio && npm test) # 121 OE-Studio compiler/API/MCP/golden tests
# 3. Build & flash the 21-demo showcase to the reference board (Waveshare AMOLED 1.75 / 1.75C)
source ~/esp/esp-idf/export.sh
idf.py -DOE_BOARD=waveshare_esp32s3_touch_amoled_175 -p /dev/cu.usbmodem* build flash monitorLive USB-Serial Commands (while monitor is open):
b— Run the automated 60 FPS hardware benchmark sweep right on your boardn/p/0–9/a/c–h/j/\— Navigate all 21 demos (incl. Spaceballs State of the Art, Dot-Cube 3D, Neon Fluid, RGB Cube, Native XML Fitness, and HW Diagnostics)s— Cycle Battery Saver profile |m— Power telemetry |i— Live IMU axes
- 🚀 Getting Started (
GETTING_STARTED.md) — Fastest path from zero to flashing (where to buy boards, 5-minute setup, Studio with or without AI MCP). - 🎨 OE-Studio Guide (
oe_studio/README.md) — Full walkthrough of the visual UI studio (+ MCP Harness Setup, API/MCP Reference, XML Dialect, Native C Target). - 🔌 Multi-Board Architecture (
docs/BOARD_ARCHITECTURE.md) & Reference Board Page (waveshare_esp32s3_touch_amoled_175) — Board metadata schema,oe_board/oe_hal, and adding new boards (boards/TEMPLATE.md). - 🤖 AGENTS.md — Building Firmware with
optimi_embedded— Integration rules for you or your coding agent. - 🚀 Usage Guide & Cookbook (Goal → Minimal Implementation) — Copy-paste recipes covering
oe_board_init(), 0-frame idle UI, RTL keyboard, LVGL porting, shaders, IMU, audio, power, and Wi-Fi. - 📘 Boards & Per-Board Hardware Cookbooks (
boards/README.md) — Requirement-driven guides starting with Waveshare ESP32-S3-Touch-AMOLED-1.75 / 1.75C (COOKBOOK.md). - 📊 Four-Way UI Stack Benchmark & Baseline Benchmark Report — All silicon numbers attributed by board.
- 🧙 BLACKMAGIC.md — Measured Performance Tricks & Pitfalls — Living log of ESP32-S3 optimizations and honest negative results.
- 🔣 Symbol Contact Sheet (
docs/Symbol_Contact_Sheet.png) — 75 Phosphor Fill (MIT) symbols (OE_SYMBOL_*native + 62LV_SYMBOL_*compat aliases) embedded inoe_font_ui_15/20/26. - 📡 BLE 5.0 Capabilities Guide (
docs/BLE_CAPABILITIES.md) — 13 opt-in Kconfig BLE features (HID media/kbd/mouse, Passkey pairing, DIS, CTS, Find Me, 2M PHY/DLE, Coded PHY, Apple AMS/ANCS, Central GATT client, Wi-Fi provisioning, BLE OTA, iBeacon & BTHome v2). - 🛡️ Formal State Machines (
SM-1–SM-17) & Developingoptimi_embedded— Invariants, regression matrix (T01–T120), and maintainer workflow.
Contributions are welcome — see CONTRIBUTING.md.
Released under the MIT License (Copyright (c) 2026 Tom Sella (@tsella)). Pre-rasterized bitmap fonts in components/oe_gfx/src/oe_fonts.c are generated from SIL OFL 1.1 open-source typefaces, and club dancer rotoscope frames in oe_demos/demos/dance_roto_data.h are derived from Pexels License footage — see THIRD_PARTY_LICENSES.md.
