crosspad_log
Capture consolidated logs from either a built PC simulator binary or a connected ESP32-S3 device over serial, filtering lines and controlling capture duration and line limits with a single tool.
Instructions
[PC | ESP HW] Capture logs (consolidated; replaces crosspad_log_pc and crosspad_log_idf in v6).
• target='pc' → spawn the built sim binary, capture stdout/stderr, then kill it. Fields used: timeout_seconds (default 5), max_lines (default 200). port and filter MUST be omitted.
• target='idf' → read serial from a connected ESP32-S3 via pyserial (no TTY needed). Fields used: port (auto-detected if omitted), timeout_seconds (default 10), max_lines (default 500), filter (substring, case-insensitive).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | idf only. Serial port path. Auto-detected if omitted; required when multiple devices connected. MUST be omitted for target=pc. | |
| filter | No | idf only. Case-insensitive substring filter — only matching lines returned. MUST be omitted for target=pc. | |
| target | Yes | 'pc' = run+capture sim binary (uses timeout_seconds?,max_lines? — port/filter MUST be omitted); 'idf' = read serial from connected ESP device (uses port?,timeout_seconds?,max_lines?,filter?,reset_to_boot?). | |
| max_lines | No | Max output lines. Defaults: 200 (pc), 500 (idf). | |
| reset_to_boot | No | idf only. Pulse the device reset (esptool DTR/RTS sequence, works through the STM bridge) before capturing, so the log starts at boot t=0. Use for boot-time profiling. Default false (passive read of the running device). | |
| timeout_seconds | No | Capture duration in seconds. Defaults: 5 (pc), 10 (idf). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| error | No | ||
| lines | No | ||
| stderr | No | ||
| stdout | No | ||
| success | Yes | ||
| exe_path | No | ||
| exit_code | No | ||
| truncated | No | ||
| line_count | No | ||
| duration_seconds | No |