Openclaw ESP32-S3
ESP-IDF firmware for an ESP32-S3 Matrix/OpenRouter-controlled agent with local
tools for filesystem access, GPIO, shell commands, cron jobs, and ULP RISC-V
binary loading.
Build
This project targets ESP-IDF 5.5 and `esp32s3`.
On this machine, the working build command is:
$env:PATH='C:\Espressif\tools\idf-python\3.11.2;' + $env:PATH
& 'C:\Espressif\frameworks\esp-idf-v5.5.3\export.ps1'
idf.py build
Flash with:
idf.py -p COMx flash monitor
The firmware uses `partitions.csv` and expects a 16 MB flash part.
SD Card
Format the SD card as FAT and create this file:
/openclaw/config.json
Use `config.example.json` as the template. The runtime workspace is controlled
by `fs_root`; create that directory on the SD card before booting.
Default SD-SPI pins in `main/app_main.cpp`:
MISO GPIO4
MOSI GPIO5
CLK GPIO6
CS GPIO7
Runtime
At boot the firmware mounts the SD card, loads `/sdcard/openclaw/config.json`,
connects to Wi-Fi, registers tools, then starts:
- Core 0: Matrix/OpenRouter network agent
- Core 1: tool worker
The network agent reads text messages from `matrix.control_room_id`, sends them
to OpenRouter with the registered tool schemas, executes the first tool call,
and posts the result back to the Matrix room.