Quick start
Install the tools, create an esp-hal project and run it on a board, with what each step prints.
This page takes you from an installed espx binary to a board printing its boot log. If you have not built espx yet, start with Installation. You need one ESP32 dev board on a USB data cable. The examples use an ESP32-C6, the default chip.
Install the tools
setup reads the tool manifest, downloads each tool it lacks, then adds rust-src and the RISC-V targets:
Lines starting with => are progress on stderr. Lines starting with ok are results on stdout. Run it again and each tool and target says already installed instead.
Create a project
espx runs esp-generate --headless for the ESP32-C6 with the log option, then writes a README and an AGENTS.md:
For another chip, pass --chip esp32c3 or any id from espx chips. For a known dev board, pass --board xiao-esp32c6 and espx picks its chip and records its pins. Projects covers the options.
Plug in the board and look for it
devices lists the serial ports with a dev board on them, with the USB interface (native USB, or a CP210x, CH34x, FTDI or PL2303 bridge) and any name you gave the board. With exactly one board attached, every command finds it on its own.
Build, flash and watch
espx builds with cargo build --release, prints the image size against the app partition, then hands the terminal to cargo espflash flash --release --monitor:
espflash writes the bootloader, partition table and app, resets the board and shows its serial output. After the ROM banner and the second-stage bootloader's lines, the template logs INFO - Hello world!. Press Ctrl+R to reset the board and Ctrl+C to exit. The image size above is illustrative; yours depends on the template and the chip.
Run it unattended
Add --until and --timeout and espx reads the port itself, waits for a line and exits:
It exits 0 on the first matching line and 124 if the minute runs out. The same flags work on espx monitor, and --json prints one JSON event per line. See Scripts and CI.
When something goes wrong
no board found: nothing with a known USB serial interface is attached. Check the cable carries data, then runespx devices --allto list every serial port.several boards are connected: pass--portwith a port, a board id or a board name, or bind the project to one board. See Boards and ports.needs a person:above the error: espx could not get the bootloader to answer, also at 115200 baud. Hold BOOT, tap RESET, release BOOT, and flash again. If the line says the board is not on the USB bus, replug it.- A build error: espx prints cargo's diagnostics exactly as cargo would. Fix them and run again.
Next
- Build and flash: the commands
runcombines, and what happens on each step. - Monitor and replay: decoded logs, boot reasons, panics and recordings.
- MCP server: give a coding agent the same loop.