read_serial
Read serial output from an embedded board, returning raw text plus crash keyword hits and reset counts. Call right after flashing to capture startup logs, then judge against your project criteria.
Instructions
读取串口输出,返回原始文本与客观统计(是否为空、崩溃关键字命中、复位次数)。只读,可自由调用。⚠️ 本工具不做 PASS/FAIL 判定,请对照项目的判定标准自行判断。⚠️ 要抓启动日志(初始化失败、panic backtrace),必须在 flash 成功后【立刻】调用。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | 串口设备路径。省略则自动检测(推荐:烧录后端口可能变)。 | |
| board | No | 板型 id。省略则由 sketch.yaml 的 FQBN 推断或用默认。 | |
| duration | No | 采集秒数,默认 10。 | |
| project_dir | No | 项目目录。省略则用 server 启动时的默认项目。 |