移除 OpenCode 配置与命令,技能与串口单一配置源迁移至 .dsh/skills 与 .serialtest,同步更新全部文档引用

This commit is contained in:
2026-10-10 14:05:36 +08:00
parent e89fe54a97
commit aac5f99fe9
44 changed files with 3868 additions and 180 deletions
+1 -1
View File
@@ -71,7 +71,7 @@
& '.venv\Scripts\python.exe' test/host/cfg_file/run_unit_test.py
```
> 串口端口配置在 `.opencode/serial_config.json`(单一配置源,当前 COM6/115200)。
> 串口端口配置在 `.serialtest/config.json`(单一配置源,当前 COM6/115200)。
## ⚠️ 注意
+6 -6
View File
@@ -48,7 +48,7 @@
[--done-marker 'net init: OK'] [--max-boot-ms 0]
[--raw-log] [--keep-out 20]
--port 缺省取 .opencode/serial_config.json 的 portName(单一配置源)
--port 缺省取 .serialtest/config.json 的 portName(单一配置源)
退出码(与旧版一致):
0 = PASS(采集成功 + Required 全中 + Forbidden 零命中)
@@ -70,10 +70,10 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).resolve().parent
# 本脚本位于 test/host/,仓库根需上溯两级(2026-10 实机窗口修:原 .parent 只到 test/,
# 导致 .opencode/serial_config.json 与 tools/serial_tool 路径解析错误)
# 导致 .serialtest/config.json 与 tools/serial_tool 路径解析错误)
REPO_ROOT = SCRIPT_DIR.parent.parent
SERIAL_TOOL = REPO_ROOT / "tools" / "serial_tool" / "serial_tool.py"
CFG_FILE = REPO_ROOT / ".opencode" / "serial_config.json"
CFG_FILE = REPO_ROOT / ".serialtest" / "config.json"
DEFAULT_FLASH = REPO_ROOT / "MDK-ARM" / "download.bat"
RESET_BAT = REPO_ROOT / "MDK-ARM" / "reset.bat"
DEFAULT_HEX = REPO_ROOT / "MDK-ARM" / "STM32F407-Demo" / "STM32F407-Demo.hex"
@@ -240,7 +240,7 @@ def main(argv=None):
ap = argparse.ArgumentParser(description="boot log capture + verify (pure stdlib, no PowerShell)")
ap.add_argument("--port", default="",
help="serial port (default: portName from .opencode/serial_config.json)")
help="serial port (default: portName from .serialtest/config.json)")
ap.add_argument("--baud-rate", type=int, default=115200)
ap.add_argument("--settle-ms", type=int, default=8000,
help="RX silence that ends the capture")
@@ -267,7 +267,7 @@ def main(argv=None):
help="local copy of /log/selftest.log (skips device-side fetch when given)")
ap.add_argument("--device-ip", default="192.168.1.100",
help="device IP for fetching /log/selftest.log via FTP (lftpd anonymous)")
ap.add_argument("--out-dir", default=str(Path(tempfile.gettempdir()) / "opencode"))
ap.add_argument("--out-dir", default=str(Path(tempfile.gettempdir()) / "serial-boot-test"))
ap.add_argument("--show-tail-lines", type=int, default=15)
ap.add_argument("--fw-hex", default=str(DEFAULT_HEX),
help="built image for the firmware-identity stamp and the readback "
@@ -303,7 +303,7 @@ def main(argv=None):
# 串口助手 CLI 用当前解释器(AGENTS.md 统一入口 = 仓库 .venv python)
py = sys.executable
# 端口缺省:单一配置源 .opencode/serial_config.json(UTF-8,容忍 BOM)
# 端口缺省:单一配置源 .serialtest/config.json(UTF-8,容忍 BOM)
port = args.port
if not port and CFG_FILE.is_file():
try: