绘图流程沉淀为 draw-diagram skill,SVG 收拢到 docs/images/
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1560" height="1000" viewBox="0 0 1560 1000" font-family="Microsoft YaHei, Segoe UI, PingFang SC, sans-serif">
|
||||
<rect x="0" y="0" width="1560" height="1000" 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">STM32F407ZGTx @168MHz · FreeRTOS V10.3.1 (CMSIS-RTOS2) · 上层只依赖相邻下层</text>
|
||||
<rect x="26" y="78" width="1508" height="92" 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="134" y="104" font-size="12" fill="#64748b">顶层共享配置 · 被 UI 与基础服务共用</text>
|
||||
<rect x="44" y="116" width="394" height="38" rx="8" fill="#ffffff" stroke="#2563eb" stroke-opacity="0.55"/>
|
||||
<text x="241" y="139" font-size="13" fill="#1e293b" text-anchor="middle">net_cfg(网口配置:IP/掩码/网关/MAC + Flash 持久化)</text>
|
||||
<rect x="26" y="214" width="741" height="188" rx="12" fill="#f5f3ff" stroke="#7c3aed" stroke-opacity="0.45"/>
|
||||
<text x="44" y="240" font-size="17" font-weight="700" fill="#7c3aed">② UI 层</text>
|
||||
<text x="129" y="240" font-size="12" fill="#64748b">Drivers/BSP/UI · 与 PC 模拟器共用</text>
|
||||
<rect x="44" y="252" width="162" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="125" y="275" font-size="13" fill="#1e293b" text-anchor="middle">ui_port(显示端口)</text>
|
||||
<rect x="216" y="252" width="275" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="354" y="275" font-size="13" fill="#1e293b" text-anchor="middle">ui_menu / ui_menu_view(级联菜单)</text>
|
||||
<rect x="502" y="252" width="179" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="592" y="275" font-size="13" fill="#1e293b" text-anchor="middle">ui_menu_tab(菜单表)</text>
|
||||
<rect x="44" y="300" width="236" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="162" y="323" font-size="13" fill="#1e293b" text-anchor="middle">ui_content_page(内容页框架)</text>
|
||||
<rect x="290" y="300" width="179" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="380" y="323" font-size="13" fill="#1e293b" text-anchor="middle">ui_page_*(5 页插件)</text>
|
||||
<rect x="480" y="300" width="238" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="599" y="323" font-size="13" fill="#1e293b" text-anchor="middle">ui_net_sink(远程显示 :7003)</text>
|
||||
<rect x="44" y="348" width="208" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="148" y="371" font-size="13" fill="#1e293b" text-anchor="middle">ui_font_cn_12(中文字体)</text>
|
||||
<rect x="262" y="348" width="172" height="38" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-opacity="0.55"/>
|
||||
<text x="348" y="371" font-size="13" fill="#1e293b" text-anchor="middle">ui_deco(浅 V 装饰)</text>
|
||||
<rect x="793" y="214" width="741" height="188" rx="12" fill="#f0fdfa" stroke="#0d9488" stroke-opacity="0.45"/>
|
||||
<text x="811" y="240" font-size="17" font-weight="700" fill="#0d9488">③ 基础服务层</text>
|
||||
<text x="935" y="240" font-size="12" fill="#64748b">应用侧服务 / 编排</text>
|
||||
<rect x="811" y="252" width="170" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="896" y="275" font-size="13" fill="#1e293b" text-anchor="middle">app_main(启动编排)</text>
|
||||
<rect x="991" y="252" width="177" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="1080" y="275" font-size="13" fill="#1e293b" text-anchor="middle">sys_clock(墙钟基准)</text>
|
||||
<rect x="1179" y="252" width="185" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="1271" y="275" font-size="13" fill="#1e293b" text-anchor="middle">sys_events(就绪屏障)</text>
|
||||
<rect x="811" y="300" width="162" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="892" y="323" font-size="13" fill="#1e293b" text-anchor="middle">app_cfg(编译开关)</text>
|
||||
<rect x="983" y="300" width="276" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="1122" y="323" font-size="13" fill="#1e293b" text-anchor="middle">task/(net · ui · adc* · rs485*)</text>
|
||||
<rect x="1270" y="300" width="148" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="1344" y="323" font-size="13" fill="#1e293b" text-anchor="middle">lftpd(FTP :21)</text>
|
||||
<rect x="811" y="348" width="227" height="38" rx="8" fill="#ffffff" stroke="#0d9488" stroke-opacity="0.55"/>
|
||||
<text x="924" y="371" font-size="13" fill="#1e293b" text-anchor="middle">time_sync(TCP 对时 :8888)</text>
|
||||
<rect x="26" y="446" width="1508" height="92" rx="12" fill="#f0fdf4" stroke="#16a34a" stroke-opacity="0.45"/>
|
||||
<text x="44" y="472" font-size="17" font-weight="700" fill="#16a34a">④ 中间件层</text>
|
||||
<text x="151" y="472" font-size="12" fill="#64748b">通用库 / 协议栈</text>
|
||||
<rect x="44" y="484" width="284" height="38" rx="8" fill="#ffffff" stroke="#16a34a" stroke-opacity="0.55"/>
|
||||
<text x="186" y="507" font-size="13" fill="#1e293b" text-anchor="middle">net_socket / net_select(BSD API)</text>
|
||||
<rect x="338" y="484" width="147" height="38" rx="8" fill="#ffffff" stroke="#16a34a" stroke-opacity="0.55"/>
|
||||
<text x="412" y="507" font-size="13" fill="#1e293b" text-anchor="middle">FatFs(文件系统)</text>
|
||||
<rect x="495" y="484" width="186" height="38" rx="8" fill="#ffffff" stroke="#16a34a" stroke-opacity="0.55"/>
|
||||
<text x="588" y="507" font-size="13" fill="#1e293b" text-anchor="middle">nand_ftl(dhara FTL)</text>
|
||||
<rect x="692" y="484" width="164" height="38" rx="8" fill="#ffffff" stroke="#16a34a" stroke-opacity="0.55"/>
|
||||
<text x="774" y="507" font-size="13" fill="#1e293b" text-anchor="middle">LVGL v9.2(图形库)</text>
|
||||
<rect x="866" y="484" width="186" height="38" rx="8" fill="#ffffff" stroke="#16a34a" stroke-opacity="0.55"/>
|
||||
<text x="960" y="507" font-size="13" fill="#1e293b" text-anchor="middle">util(crc · ringbuf)</text>
|
||||
<rect x="26" y="582" width="1508" height="92" rx="12" fill="#fffbeb" stroke="#d97706" stroke-opacity="0.45"/>
|
||||
<text x="44" y="608" font-size="17" font-weight="700" fill="#d97706">⑤ 驱动层</text>
|
||||
<text x="134" y="608" font-size="12" fill="#64748b">Drivers/BSP · 芯片时序/中断</text>
|
||||
<rect x="44" y="620" width="178" height="38" rx="8" fill="#ffffff" stroke="#d97706" stroke-opacity="0.55"/>
|
||||
<text x="133" y="643" font-size="13" fill="#1e293b" text-anchor="middle">ch395f(SPI2 + DMA)</text>
|
||||
<rect x="232" y="620" width="163" height="38" rx="8" fill="#ffffff" stroke="#d97706" stroke-opacity="0.55"/>
|
||||
<text x="314" y="643" font-size="13" fill="#1e293b" text-anchor="middle">gd5f2gq5ue(SPI1)</text>
|
||||
<rect x="406" y="620" width="195" height="38" rx="8" fill="#ffffff" stroke="#d97706" stroke-opacity="0.55"/>
|
||||
<text x="503" y="643" font-size="13" fill="#1e293b" text-anchor="middle">tpafe5160(并行 16 位)</text>
|
||||
<rect x="611" y="620" width="133" height="38" rx="8" fill="#ffffff" stroke="#d97706" stroke-opacity="0.55"/>
|
||||
<text x="677" y="643" font-size="13" fill="#1e293b" text-anchor="middle">sd2506(I2C1)</text>
|
||||
<rect x="754" y="620" width="171" height="38" rx="8" fill="#ffffff" stroke="#d97706" stroke-opacity="0.55"/>
|
||||
<text x="840" y="643" font-size="13" fill="#1e293b" text-anchor="middle">rs485(UART5 + DE)</text>
|
||||
<rect x="26" y="718" width="1508" height="92" rx="12" fill="#f1f5f9" stroke="#475569" stroke-opacity="0.45"/>
|
||||
<text x="44" y="744" font-size="17" font-weight="700" fill="#475569">⑥ 内核 / HAL</text>
|
||||
<text x="176" y="744" font-size="12" fill="#64748b">调度 · 外设抽象</text>
|
||||
<rect x="44" y="756" width="329" height="38" rx="8" fill="#ffffff" stroke="#475569" stroke-opacity="0.55"/>
|
||||
<text x="208" y="779" font-size="13" fill="#1e293b" text-anchor="middle">FreeRTOS V10.3.1(CMSIS-RTOS2 · heap_4)</text>
|
||||
<rect x="383" y="756" width="189" height="38" rx="8" fill="#ffffff" stroke="#475569" stroke-opacity="0.55"/>
|
||||
<text x="478" y="779" font-size="13" fill="#1e293b" text-anchor="middle">STM32 HAL(时基 TIM7)</text>
|
||||
<rect x="582" y="756" width="144" height="38" rx="8" fill="#ffffff" stroke="#475569" stroke-opacity="0.55"/>
|
||||
<text x="655" y="779" font-size="13" fill="#1e293b" text-anchor="middle">CMSIS / 启动文件</text>
|
||||
<rect x="26" y="854" width="1508" height="92" rx="12" fill="#fff1f2" stroke="#e11d48" stroke-opacity="0.45"/>
|
||||
<text x="44" y="880" font-size="17" font-weight="700" fill="#e11d48">⑦ 硬件</text>
|
||||
<text x="117" y="880" font-size="12" fill="#64748b">STM32F407ZGTx @168MHz</text>
|
||||
<rect x="44" y="892" width="179" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="133" y="915" font-size="13" fill="#1e293b" text-anchor="middle">CH395F 以太网(SPI2)</text>
|
||||
<rect x="233" y="892" width="201" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="334" y="915" font-size="13" fill="#1e293b" text-anchor="middle">GD5F2GQ5UE NAND(SPI1)</text>
|
||||
<rect x="445" y="892" width="182" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="536" y="915" font-size="13" fill="#1e293b" text-anchor="middle">TPAFE5160 ADC(并行)</text>
|
||||
<rect x="637" y="892" width="163" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="718" y="915" font-size="13" fill="#1e293b" text-anchor="middle">SD2506 RTC(I2C1)</text>
|
||||
<rect x="810" y="892" width="140" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="881" y="915" font-size="13" fill="#1e293b" text-anchor="middle">RS-485(UART5)</text>
|
||||
<rect x="961" y="892" width="182" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="1052" y="915" font-size="13" fill="#1e293b" text-anchor="middle">USART1 调试(115200)</text>
|
||||
<rect x="1153" y="892" width="77" height="38" rx="8" fill="#ffffff" stroke="#e11d48" stroke-opacity="0.55"/>
|
||||
<text x="1192" y="915" font-size="13" fill="#1e293b" text-anchor="middle">6x LED</text>
|
||||
<line x1="780.0" y1="176.0" x2="780.0" y2="199.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 780.0 206.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<line x1="396.5" y1="408.0" x2="396.5" y2="431.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 396.5 438.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<line x1="1163.5" y1="408.0" x2="1163.5" y2="431.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 1163.5 438.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<line x1="780.0" y1="544.0" x2="780.0" y2="567.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 780.0 574.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<line x1="780.0" y1="680.0" x2="780.0" y2="703.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 780.0 710.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<line x1="780.0" y1="816.0" x2="780.0" y2="839.0" stroke="#94a3b8" stroke-width="2.5"/>
|
||||
<path d="M 780.0 846.0 l -6 -9 h 12 z" fill="#94a3b8"/>
|
||||
<text x="26" y="982" font-size="12" fill="#94a3b8">上层只依赖相邻下层(单向);UI 层与基础服务层同级并列,均使用顶层 net_cfg。跨层调用细节见 docs/项目架构总览.md §1.2 * 预留未接入调度</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user