pio_flash_and_verify
Build and flash firmware to a connected board, then monitor the boot log to verify it starts correctly. Passes when an expected log line appears, fails on crash patterns, and times out if no match occurs.
Instructions
Hardware-in-the-loop check with no human: build + flash (pio run -t upload), then open the serial port and watch the boot log until expect (regex) matches -> verdict pass, or fail_on matches -> verdict fail with the crash automatically decoded to file:line, or timeout_s elapses -> verdict timeout. Port and baud come from platformio.ini (monitor_port/monitor_speed) or the single detected board. Set expect to a line your firmware prints once it is healthy, e.g. 'WiFi connected'. Blocked under build_only/read_only policy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| baud | No | ||
| expect | No | setup done|ready|started|Booting|loop | |
| fail_on | No | Guru Meditation|panic'ed|abort\(\) was called|assert failed|HardFault|Hard Fault|BusFault|UsageFault|MemManage|stack overflow|Task watchdog|Brownout|CORRUPT HEAP|Backtrace:|rst:0x[0-9a-f]+ \((?:SW_CPU_RESET|TG\dWDT_SYS_RESET|RTCWDT_RTC_RESET|PANIC) | |
| settle_s | No | ||
| max_lines | No | ||
| timeout_s | No | ||
| project_dir | No | ||
| upload_port | No | ||
| monitor_port | No | ||
| stop_open_sessions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||