ht32-code-mcp 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/PKG-INFO +1 -1
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/pyproject.toml +1 -1
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/materializer.py +12 -4
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/tests/test_tools.py +4 -1
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/.gitignore +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/.gitkeep +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/.pytest_base_final_run.log +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/DEPLOY.md +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/README.md +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/e2e_scenario_a.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/e2e_scenario_b.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/smoke_http.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/smoke_stdio.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/__init__.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/__main__.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/exporter.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/index.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/knowledge.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/release.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/server.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/src/ht32_code_mcp/usage.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/tests/conftest.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/tests/test_knowledge_grounding.py +0 -0
- {ht32_code_mcp-0.3.0 → ht32_code_mcp-0.3.1}/uv.lock +0 -0
|
@@ -714,18 +714,24 @@ class Materializer:
|
|
|
714
714
|
text = text.replace("<umfTarg>0</umfTarg>", "<umfTarg>1</umfTarg>", 1)
|
|
715
715
|
edits.append("umfTarg 0->1 (Use Memory Layout from Target Dialog)")
|
|
716
716
|
# FlashDriverDll:-FL 与裁决容量一致(官方逐 IC 值优先;仅裁决覆盖时改写)
|
|
717
|
+
# 注意 UL2CM3 参数是**按算法块分块**的:
|
|
718
|
+
# UL2CM3(... -FF0HT32F -FS00 -FL<主 Flash 容量> -FF1HT32F_OPT -FS11FF00000 -FL<OPT 区长度>)
|
|
719
|
+
# 裁决容量只属于 block 0(主 Flash);block 1 是 Option Bytes 区(另一基址/另一长度),
|
|
720
|
+
# 改写它会把 OPT 区长度错写成主 Flash 大小。故 count=1 只改首个 -FL。
|
|
717
721
|
if origin["kind"] == "official-per-ic-project":
|
|
718
722
|
m = re.search(r"(<FlashDriverDll>)(.*?)(</FlashDriverDll>)", text, re.S)
|
|
719
723
|
if m and "-FL" in m.group(2):
|
|
720
724
|
fdd = m.group(2)
|
|
721
725
|
fl = re.search(r"-FL([0-9A-Fa-f]+)", fdd)
|
|
722
726
|
if fl and int(fl.group(1), 16) != flash_size:
|
|
723
|
-
new_fdd, n = re.subn(r"-FL[0-9A-Fa-f]+", f"-FL{flash_size:X}", fdd
|
|
727
|
+
new_fdd, n = re.subn(r"-FL[0-9A-Fa-f]+", f"-FL{flash_size:X}", fdd,
|
|
728
|
+
count=1)
|
|
724
729
|
if n != 1:
|
|
725
|
-
raise ContractError(RECIPE_MISMATCH,
|
|
730
|
+
raise ContractError(RECIPE_MISMATCH,
|
|
731
|
+
f"{what}: FlashDriverDll -FL 命中异常")
|
|
726
732
|
text = text[:m.start()] + m.group(1) + new_fdd + m.group(3) + text[m.end():]
|
|
727
733
|
edits.append(f"FlashDriverDll -FL{fl.group(1)} -> -FL{flash_size:X} "
|
|
728
|
-
f"(LIBCFG adjudication)")
|
|
734
|
+
f"(LIBCFG adjudication, main alg block only)")
|
|
729
735
|
# d) dfp-derived:Define/RegisterFile/SFDFile 的器件宏替换
|
|
730
736
|
if origin["kind"] == "dfp-derived":
|
|
731
737
|
base_dev = orig_device
|
|
@@ -841,7 +847,9 @@ class Materializer:
|
|
|
841
847
|
"",
|
|
842
848
|
"## 前置条件",
|
|
843
849
|
"",
|
|
844
|
-
f"- Keil MDK-ARM 5.x(
|
|
850
|
+
f"- Keil MDK-ARM 5.x,编译器 **AC5(armcc)**(本地以 ARMCC V5.06 update 4/7 实测)"
|
|
851
|
+
f"——**本工程暂不支持 AC6(armclang)**,请在 Options for Target → Target 保持"
|
|
852
|
+
f"编译器版本为 AC5;切到 AC6 可能在编译/链接阶段报错",
|
|
845
853
|
f"- {r.recipe['pack']['device_macro_note']}(manifest 锁定 "
|
|
846
854
|
f"`{r.recipe['pack']['id']}`)",
|
|
847
855
|
"",
|
|
@@ -275,7 +275,10 @@ def _bundle_checks_v2(out_dir: Path, device: str, config_id: str = ""):
|
|
|
275
275
|
# 模板自用文件不进用户工程;README 属于用户工程
|
|
276
276
|
assert not (out_dir / "devices.json").exists()
|
|
277
277
|
assert not (out_dir / "TEMPLATE.md").exists()
|
|
278
|
-
|
|
278
|
+
readme = (out_dir / "README.md").read_text(encoding="utf-8")
|
|
279
|
+
assert readme.startswith(f"# {device}")
|
|
280
|
+
# 工具链声明必须随产物交付(仅 AC5;AC6 暂不支持)
|
|
281
|
+
assert "AC5" in readme and "不支持 AC6" in readme, "导出 README 未声明仅支持 AC5"
|
|
279
282
|
# 完整官方库(自包含) + 文件清单逐条登记
|
|
280
283
|
files = json.loads((mdir / "files.json").read_text(encoding="utf-8"))
|
|
281
284
|
registered = {f["path"] for f in files["files"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|