diff --git a/.dsh/skills/mem-budget/SKILL.md b/.dsh/skills/mem-budget/SKILL.md index 38a4da4f..2dcef7c7 100644 --- a/.dsh/skills/mem-budget/SKILL.md +++ b/.dsh/skills/mem-budget/SKILL.md @@ -15,7 +15,7 @@ whenToUse: 新增任务/加大缓冲/改栈/接入日志之前之后、链接报 # scripts/ram_report.py (.map → RAM/Flash 分区与按文件占用表) # scripts/stack_report.py (.htm 静态调用图 → 每任务最坏链 vs 配置栈) # 叠加运行时水位(有真机日志时): -& '.venv\Scripts\python.exe' scripts/stack_report.py -s tools\serial_tool\state\serial.log +& '.venv\Scripts\python.exe' scripts/stack_report.py -s .dsh\skills\serial-assistant\scripts\state\serial.log ``` 退出码:0=全部通过 / 1=有任务不达标 / 2=解析错误(.htm/.map 缺失先重跑构建)。 diff --git a/.dsh/skills/new-machine-setup/SKILL.md b/.dsh/skills/new-machine-setup/SKILL.md index 6f7936bc..3b63667b 100644 --- a/.dsh/skills/new-machine-setup/SKILL.md +++ b/.dsh/skills/new-machine-setup/SKILL.md @@ -32,7 +32,7 @@ whenToUse: 换新机器/新克隆要把环境搭起来、构建或烧录报"环 `Get-PnpDevice -Class Ports` 能看到 COMx、`reset.bat list` 能看到探针 SN。 4. **验收三连**(全绿才算环境就绪): ```powershell - & '.venv\Scripts\python.exe' tools/serial_tool/serial_tool.py selftest # 23/23 PASS + & '.venv\Scripts\python.exe' .dsh/skills/serial-assistant/scripts/serial_tool.py selftest # 23/23 PASS & "MDK-ARM\build.bat" # exit 0 & "MDK-ARM\reset.bat" list # 列出探针 ``` diff --git a/.dsh/skills/new-source-file/SKILL.md b/.dsh/skills/new-source-file/SKILL.md index 09806a2b..7b23c98e 100644 --- a/.dsh/skills/new-source-file/SKILL.md +++ b/.dsh/skills/new-source-file/SKILL.md @@ -36,5 +36,5 @@ cmake --build simulator/build --config Debug # 0 警告 - **禁止**把源文件复制进 `simulator/`——两端共用 `Drivers/BSP/` 原件(UI_界面制作流程.md C7) - 只注册 `.c`(含 `.s`);`.h` 靠 include 路径找到,不加工程 - 漏注册的典型症状:一端编译失败(undefined reference)或一端行为悄悄停留在旧逻辑 -- 注册完成后跑回归:UI 文件 → `ui-verify` skill;其他模块 → `@test`(`test/host/run_boot_test.py`) +- 注册完成后跑回归:UI 文件 → `ui-verify` skill;其他模块 → `@test`(`.dsh/skills/serial-boot-test/scripts/run_boot_test.py`) - 改过 `CMakeLists.txt` 后需重新 `cmake -B build` 配置 diff --git a/.dsh/skills/serial-boot-test/scripts/verify_log.py b/.dsh/skills/serial-boot-test/scripts/verify_log.py index a036def6..39f35543 100644 --- a/.dsh/skills/serial-boot-test/scripts/verify_log.py +++ b/.dsh/skills/serial-boot-test/scripts/verify_log.py @@ -5,7 +5,7 @@ 输出结构化判定(格式与旧 PowerShell 版逐字一致,下游文档/习惯不受影响)。 用法: - & '.venv\\Scripts\\python.exe' test/host/verify_log.py --log-path + & '.venv\\Scripts\\python.exe' .dsh/skills/serial-boot-test/scripts/verify_log.py --log-path [--required 'marker1;marker2'] [--forbidden 'FAIL;ERROR;HardFault;assert;[ERR]'] [--require-suite-summary 'Storage Tests;GD5F2GQ5UE Tests'] diff --git a/.gitignore b/.gitignore index b06ee784..647a78fc 100644 --- a/.gitignore +++ b/.gitignore @@ -128,8 +128,8 @@ docs/images/*.png # Python venv (unified env, see AGENTS.md "Python 环境"; rebuild via requirements.txt) .venv/ -# Serial assistant (tools/serial_tool) runtime state (daemon log/meta, local runtime artifacts) -tools/serial_tool/state/ +# Serial assistant runtime state (daemon log/meta, local runtime artifacts) +.dsh/skills/serial-assistant/scripts/state/ # CI 运行时产物(.gitea/workflows/ci.yml 的 S3 步骤在 runner 工作区落盘的日志; # 零依赖存档方案——落在工作区目录而非上传 artifact,故必须忽略以免误提交) diff --git a/AGENTS.md b/AGENTS.md index bcc340fc..5a2472b5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,7 +16,7 @@ STM32F407ZGTx @168MHz(HSE 8MHz → PLL M=4/N=168/P=2);**仅 Keil MDK-ARM v ## 构建与验证 - `@build` = `& "MDK-ARM\build.bat"`(仓库根目录用**相对路径**);退出码 0 = 0 错误 0 警告,1 = 有警告或错误(查 `MDK-ARM/build_log.txt`),2 = `DTU_KEIL_UV4` 未设/无效(换机必设,见 `docs/环境与部署/本地工具路径环境变量方案.md`);UV4 路径经 `DTU_KEIL_UV4` 环境变量解析(**不再硬编码**;显式设置但无效会立即报错、不静默回退) -- `@test` / `test/host/run_boot_test.py` 一键闭环(2026-09-20 起为纯 Python 标准库实现,替代 PowerShell 版;`& '.venv\Scripts\python.exe' test/host/run_boot_test.py`):开串口+清日志 → 烧录(`MDK-ARM/download.bat`,下载后 Reset&Run;快路径 `--flash-cmd "MDK-ARM\reset.bat flash"`)→ **固件身份戳**(从刚烧进去的 hex 里抠 `fw build: