清理存量 ASCII 框图:存储栈/分区转 SVG、CH395F 时序转 Mermaid

This commit is contained in:
2026-09-11 23:01:25 +08:00
parent e16bd882a6
commit 02a32be5ea
8 changed files with 443 additions and 106 deletions
+29
View File
@@ -0,0 +1,29 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="528" viewBox="0 0 1000 528" font-family="Microsoft YaHei, Segoe UI, PingFang SC, sans-serif">
<rect x="0" y="0" width="1000" height="528" fill="#ffffff"/>
<text x="26" y="40" font-size="20" font-weight="700" fill="#0f172a">STM32F4-Base 存储软件栈</text>
<text x="26" y="62" font-size="13" fill="#64748b">GD5F2GQ5UE SPI NAND Flash(256MB)· 三层软件栈(FatFs / dhara FTL / 驱动)· 上层只依赖相邻下层</text>
<rect x="26" y="78" width="948" height="44" rx="12" fill="#eff6ff" stroke="#2563eb" stroke-opacity="0.45"/>
<text x="44" y="104" font-size="17" font-weight="700" fill="#2563eb">应用程序</text>
<text x="124" y="104" font-size="12" fill="#64748b">main · freertos(CubeMX 生成 + FreeRTOS 任务)</text>
<rect x="26" y="166" width="948" height="44" rx="12" fill="#f0fdfa" stroke="#0d9488" stroke-opacity="0.45"/>
<text x="44" y="192" font-size="17" font-weight="700" fill="#0d9488">FatFs</text>
<text x="105" y="192" font-size="12" fill="#64748b">文件系统(标准 disk_* 块设备接口)</text>
<rect x="26" y="254" width="948" height="44" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-opacity="0.45"/>
<text x="44" y="280" font-size="17" font-weight="700" fill="#16a34a">dhara FTL</text>
<text x="145" y="280" font-size="12" fill="#64748b">地址映射 · 磨损均衡 · 坏块管理 · 垃圾回收</text>
<rect x="26" y="342" width="948" height="44" rx="12" fill="#fffbeb" stroke="#d97706" stroke-opacity="0.45"/>
<text x="44" y="368" font-size="17" font-weight="700" fill="#d97706">GD5F2GQ5UE NAND Flash 驱动</text>
<text x="307" y="368" font-size="12" fill="#64748b">硬件 SPI · 页读写 · 块擦除 · BBT · 内部 ECC 使能</text>
<rect x="26" y="430" width="948" height="44" rx="12" fill="#fff1f2" stroke="#e11d48" stroke-opacity="0.45"/>
<text x="44" y="456" font-size="17" font-weight="700" fill="#e11d48">SPI1 硬件外设</text>
<text x="173" y="456" font-size="12" fill="#64748b">PB3 SCK · PB4 MISO · PB5 MOSI · 42MHz · Mode 0 · MSB First · DMA2(S0-RX / S3-TX)· 小包轮询(≤32B)/ 页数据 DMA(&gt;32B)</text>
<line x1="500.0" y1="128.0" x2="500.0" y2="151.0" stroke="#94a3b8" stroke-width="2.5"/>
<path d="M 500.0 158.0 l -6 -9 h 12 z" fill="#94a3b8"/>
<line x1="500.0" y1="216.0" x2="500.0" y2="239.0" stroke="#94a3b8" stroke-width="2.5"/>
<path d="M 500.0 246.0 l -6 -9 h 12 z" fill="#94a3b8"/>
<line x1="500.0" y1="304.0" x2="500.0" y2="327.0" stroke="#94a3b8" stroke-width="2.5"/>
<path d="M 500.0 334.0 l -6 -9 h 12 z" fill="#94a3b8"/>
<line x1="500.0" y1="392.0" x2="500.0" y2="415.0" stroke="#94a3b8" stroke-width="2.5"/>
<path d="M 500.0 422.0 l -6 -9 h 12 z" fill="#94a3b8"/>
<text x="26" y="510" font-size="12" fill="#94a3b8">数据路径:应用 → FatFs → dhara FTL → gd5f2gq5ue 驱动 → SPI1 硬件外设(单向依赖)· 详见 docs/STM32F4-Base存储架构说明.md §1</text>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+14
View File
@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1104" height="246" viewBox="0 0 1104 246" font-family="Microsoft YaHei, Segoe UI, PingFang SC, sans-serif">
<rect x="0" y="0" width="1104" height="246" fill="#ffffff"/>
<text x="40" y="40" font-size="20" font-weight="700" fill="#0f172a">GD5F2GQ5UE 物理分区布局(256MB)</text>
<text x="40" y="64" font-size="13" fill="#64748b">单分区:全片划给 FTL(无静态分区)· 块 = 128KB(64 页 × 2KB)· 共 2048 块</text>
<line x1="40" y1="96" x2="1064" y2="96" stroke="#cbd5e1" stroke-width="1"/>
<line x1="40" y1="92" x2="40" y2="100" stroke="#94a3b8" stroke-width="1.5"/>
<text x="40" y="88" font-size="12" fill="#94a3b8" text-anchor="middle">0</text>
<line x1="1064" y1="92" x2="1064" y2="100" stroke="#94a3b8" stroke-width="1.5"/>
<text x="1064" y="88" font-size="12" fill="#94a3b8" text-anchor="middle">256 MB</text>
<rect x="40" y="116" width="1024" height="74" fill="#eff6ff" stroke="#2563eb" stroke-width="1.5"/>
<text x="552.0" y="146" font-size="15" font-weight="700" fill="#0f172a" text-anchor="middle">ftl_fatfs</text>
<text x="552.0" y="170" font-size="12" fill="#2563eb" text-anchor="middle">256 MB · Block 0~2047</text>
<text x="40" y="230" font-size="12" fill="#94a3b8">ftl_fatfs:dhara FTL + FatFS 占用全部 2048 块(偏移 0 ~ 256MB)· 详见 docs/STM32F4-Base存储架构说明.md §1</text>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB