OpenC6 BIOS
github.com/rompass/openc6-bios- Category
- Developer Tools
- Rank
- No. 1161Tools index
Previous survey · No. 1152 ·
- Pricing
- Open Source
- Type
- TOOL
- GitHub
- 309 stars
- Latest release
- v2.0.0
- Date
About
OpenC6 is an open-source firmware platform for the ESP32-C6 (RV32IMAC) that separates hardware initialization from user-space code, following a BIOS and payload design. It provides a custom system call ABI, management of the independent LP-Core coprocessor, and an A/B OTA update system meant to prevent bricked devices. It targets 8MB flash and was tested on the ESP32-C6-Zero.
What it does
Turns a small RISC-V Wi-Fi chip into something closer to a tiny PC. A resident host boots first, then loads separate programs from USB, Wi-Fi or its own flash filesystem and runs them in an unprivileged mode, where the chip's memory protection unit stops them from touching kernel memory or peripheral registers. Programs reach the hardware through a numbered table of calls for printing, memory, GPIO pins, TCP sockets and files. Up to eight run at once, managed from a Unix-style shell, a browser setup page, and a low-power coprocessor that watches temperature and the main core.
Why it's ranked here
Real memory isolation on a microcontroller is uncommon, and here it is concrete code: the sandbox programs four hardware protection entries so a program gets read, write and execute on its own slice of RAM, no access to kernel RAM, and read-execute on flash. The payload guide documents every call by number with its register conventions, so outsiders can build against it. MIT licensed. It ranks below general embedded platforms because it is built around one board's pinout and the setup web server has no login.
What's good
The isolation is checkable rather than claimed: a payload that touches kernel RAM traps, the host prints a register dump and ends the process, and the guide lists the fault codes to expect. The USB loader is careful, with a sync preamble, a size check against the free arena before any byte lands, an acknowledgement every 64 bytes and a five second stall timeout. Pins the host needs, including the USB lines, flash bus and boot button, are masked so payload access returns an error instead of breaking the board.
Tradeoffs
The built-in web server registers its settings, reboot, defaults and firmware update endpoints with no authentication, and reading settings returns the saved Wi-Fi password in plain text. Anyone who reaches the page can read credentials or trigger an update. The flash layout has one factory slot plus one update slot, not two interchangeable update slots. The sandbox code switches off both main timer watchdogs and restores them only when the last payload exits. A USB-loaded payload session ends in a full chip restart. If GCC is missing, setup installs it with sudo through pacman or apt and stops on other distributions.
How to use it well
Suits embedded engineers and hobbyists who want to experiment with process isolation, system calls and job control on an ESP32-C6, or push compiled programs to a device without reflashing it. Start from the example payloads and the documented compiler flags: position-independent code with no standard library is required, and ESP-IDF 6.1 or newer must be installed. Keep the board on a trusted network, or use the setup page only in its own access point mode. It does not replace a production firmware stack: Wi-Fi still runs on FreeRTOS and Espressif's closed Wi-Fi libraries underneath.
Technical notes+
components/sandbox/sandbox_pmp.c writes pmpcfg1 as 0x0D080F08: TOR entries 4..7 give NONE below the arena, RWX on the arena, NONE up to SOC_IROM_LOW and R-X over IROM, after clearing pmpcfg0; entries 8+ are left off so MMIO at 0x60000000 is default-deny. components/sandbox/sandbox_core.c keeps MAX_SANDBOX_TASKS = 8 slots with 8 socket fds each, a per-task bump heap with a first-fit free list (blocks tagged 0x53424D4F), and sandbox_wdt_disable / sandbox_wdt_restore around TIMG0 and TIMG1, restoring mtvec, mie and mscratch when the last sandbox unregisters. components/boot_manager/boot_menu.c waits for 0x5A 0xA5 plus a little-endian 32-bit length, NAKs anything over the arena, ACKs every 64 bytes, then calls esp_restart after sandbox_run. components/web_ui/web_server.c registers /api/settings (GET and POST), /api/sysinfo, /api/reboot, /api/defaults and /api/trigger_ota with no auth check, and the GET handler echoes wifi_pass. partitions.csv defines bios_fw (factory) and ota_0 at 1.5 MB each and a 0x4E0000 openc6_fs data partition ending at 8 MB. openc6_abi.h sets OPENC6_ABI_VERSION 2 and magic 0x43364249. main/main.c only calls bios_core_start.
Observed
- License
- MIT (LICENSE)
- Language
- C on ESP-IDF, built with CMake
- Build requirement
- ESP-IDF v6.1 or newer (README.md)
- Target hardware
- ESP32-C6, 8 MB flash layout (partitions.csv)
- Interfaces
- USB serial shell, HTTP setup page and JSON endpoints, numbered syscall table for payloads
- Web endpoint authentication
- None registered; settings GET returns the stored Wi-Fi password (components/web_ui/web_server.c)
- Firmware slots
- One factory app slot plus one OTA slot (partitions.csv)
- Concurrent payloads
- 8 process slots (components/sandbox/sandbox_core.c)
- Payload format
- Position-independent flat binary, no standard library (docs/payload_development.md)
Read from README.md, Makefile, LICENSE, CMakeLists.txt, main/main.c, docs/payload_development.md, components/sandbox/sandbox_core.c, components/sandbox/sandbox_pmp.c, components/boot_manager/boot_menu.c, components/openc6_abi/include/openc6_abi.h, components/web_ui/web_server.c, partitions.csv.
Tags
Media
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.