复位目标
resetRestore the target MCU to its initial variable values while keeping breakpoints intact. The target then halts at the entry point; set run_after to resume automatically.
Instructions
复位目标 MCU(变量回到初值、断点保留)。行为说明(真机实测,与旧描述不同):复位后目标停在复位向量、处于停止态,程序不会自行往下跑——必须再调 run(或 run_timeout / run_to_line)才会开始执行;实测复位后 get_status 返回"已停止",正因为不 run 就没有任何串口输出。返回带 state_after_reset(stopped/running)与 stopped_after_reset 说明这一点;run_after=true 可在复位成功后自动 run(等价于复位后自己再调一次 run),适合「重新跑一遍看串口输出」的场景。 【参数】必填: 无;可选: run_after 【调用示例】{} 【风险】高——不可逆:会改写目标 Flash/内存,或关闭/重启用户的 Keil 实例。执行前确认目标与工程正确。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_after | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |