erase_flash
Erase the entire flash memory on an embedded board to reset corrupted contents or prepare for a clean state. Requires user confirmation before execution.
Instructions
🔴 危险:擦除整块 flash,不可恢复。只在怀疑 flash 内容损坏或要彻底重置时用。调用后不会立即执行——服务端会先要求用户输入确认词。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | 串口设备路径。省略则自动检测(推荐:烧录后端口可能变)。 | |
| board | No | 板型 id。省略则由 sketch.yaml 的 FQBN 推断或用默认。 | |
| reason | Yes | 为什么需要擦除整块 flash。 | |
| project_dir | No | 项目目录。省略则用 server 启动时的默认项目。 |