test: PDF洗MD v5 第二批测试 — 12页(含寄存器/代码/位域表)

新增6页:p18(寄存器+Table)/p20-p21(PSR双图+APSR位域)/p197(MPU汇编)/p237-238(CFSR/UFSR位域描述)
原有6页:p1封面/p2目录/p12-p13正文/p51-p52指令表

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-10 16:03:04 +08:00
parent e594216bfa
commit a0549647dc
24 changed files with 1199 additions and 42 deletions
+61
View File
@@ -0,0 +1,61 @@
# PDF 转 Markdown 输出说明
**文档**STM32 Cortex®-M4 MCUs and MPUs Programming Manual (PM0214 Rev 10)
## 处理概述
本目录包含从 PDF 第 1-262 页中提取的 12 页原始文本,经 v5 提示词规则转换后的 Markdown 文件。
## 提示词来源
- 提示词文件:`/tmp/pdf-test/llm-pdf-to-md-prompt.md`
- 来源:本地仓库 `~/.hermes/knowledge/llm-pdf-to-md-prompt.md`
## 输出文件清单
| 文件名 | 对应页码 | 内容说明 |
|--------|----------|----------|
| `00_目录.md` | p2 | 目录页 |
| `1_About_this_document_p12.md` | p12 | 第1章 About this document |
| `1.3_About_the_STM32_Cortex-M4_processor_and_core_peripherals_p13.md` | p13 | 1.3节(含Figure 1框图) |
| `2.1.3_Core_registers_p18.md` | p18 | 2.1.3节 Core registers(含Figure 2 + Table 2, Table 3 |
| `2.1.4_Exceptions_and_interrupts_p20.md` | p20 | PSR寄存器(含Figure 3, Figure 4 + Table 4 |
| `2.1.4_Exceptions_and_interrupts_p21.md` | p21 | APSR寄存器描述(Table 5 |
| `3.5_Instruction_summary_p51.md` | p51 | Cortex-M4指令表(前半部分,Table 21 |
| `3.5_Instruction_summary_p52.md` | p52 | Cortex-M4指令表(后半部分,Table 21 continued |
| `4.3_Memory_Protection_Unit_p197.md` | p197 | MPU代码示例 |
| `4.4.10_Configurable_fault_status_register_p237.md` | p237 | CFSR寄存器描述(含Figure 20 |
| `4.4.11_Usage_fault_status_register_p238.md` | p238 | UFSR寄存器位描述 |
## 封面页处理
- 封面页(p1):`/tmp/pdf-test/pages/page_1.txt` 已有原始文本
- 封面页不生成正文 MD 文件,截图存档用 `imgs/page_1_cover.png`
## 原始文本来源
原始文本目录:`/tmp/pdf-test/pages/`
```
page_1.txt - 封面
page_2.txt - 目录
page_12.txt - About this document
page_13.txt - About the STM32 Cortex-M4 processor
page_18.txt - Core registers (新增)
page_20.txt - PSR registers (新增)
page_21.txt - APSR register (新增)
page_51.txt - Instruction summary
page_52.txt - Instruction summary (continued)
page_197.txt - MPU code example (新增)
page_237.txt - CFSR register (新增)
page_238.txt - UFSR register (新增)
```
## 处理规则(v5提示词)
1. **目录**:单独生成 `00_目录.md`,三列格式(章节号|标题|页码)
2. **文件名**:按 `章节号_标题_p{页码}.md` 规则命名
3. **表格**:严格还原原始结构,表头和标题行独立处理
4. **图片**:使用 `![图 X](imgs/page_{页码}_fig_{编号}.png)` 占位符
5. **寄存器缩写**:保留原文(r、rw、rc_w0 等)
6. **代码块**:汇编代码用 ` ```assembly ` 包裹