sim_expect
Run ESP32 firmware in simulation and assert expected UART text or regex patterns to automate firmware unit and integration tests.
Instructions
Runs firmware in simulation and asserts that specific text or regex patterns appear on UART. Ideal for automated unit & integration testing in a Red-Green-Refactor agent loop.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chip | No | Target chip family. Default is s3 (ESP32-S3). | |
| wifi | No | Attach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15. | |
| board | No | Board model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards. | |
| appBin | No | Direct path to the application binary (.bin). | |
| events | No | Optional interaction events before checking patterns. | |
| ordered | No | Whether patterns must appear in exact chronological sequence (default: true). | |
| patterns | Yes | List of expected strings or regex patterns on UART output. | |
| ptableBin | No | Direct path to partition-table.bin (needed with appBin for a real ROM boot). | |
| maxSeconds | No | Max emulated seconds to wait for patterns (default 10). | |
| projectDir | No | Path to the ESP-IDF project root or build folder. If omitted, uses current working directory. | |
| bootloaderBin | No | Direct path to bootloader.bin (needed with appBin for a real ROM boot). |