dsh-stm32 0.1.2 → 0.1.4

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.
Files changed (225) hide show
  1. package/README.md +92 -40
  2. package/README_EN.md +85 -36
  3. package/assets/README.md +85 -0
  4. package/assets/VERSION +1 -0
  5. package/assets/device/c0/chips.json +1108 -0
  6. package/assets/device/f0/chips.json +1570 -0
  7. package/assets/device/f1/chips.json +1238 -0
  8. package/assets/device/f1/svd/100.json +943 -0
  9. package/assets/device/f1/svd/101.json +901 -0
  10. package/assets/device/f1/svd/102.json +522 -0
  11. package/assets/device/f1/svd/103.json +1139 -0
  12. package/assets/device/f1/svd/105.json +1117 -0
  13. package/assets/device/f1/svd/107.json +1195 -0
  14. package/assets/device/f2/chips.json +674 -0
  15. package/assets/device/f3/chips.json +1318 -0
  16. package/assets/device/f4/chips.json +2942 -0
  17. package/assets/device/f7/chips.json +1710 -0
  18. package/assets/device/g0/chips.json +2102 -0
  19. package/assets/device/g4/chips.json +2494 -0
  20. package/assets/device/h5/chips.json +898 -0
  21. package/assets/device/h7/chips.json +1948 -0
  22. package/assets/device/l0/chips.json +2494 -0
  23. package/assets/device/l1/chips.json +1234 -0
  24. package/assets/device/l4/chips.json +2130 -0
  25. package/assets/device/l4+/chips.json +856 -0
  26. package/assets/device/l5/chips.json +226 -0
  27. package/assets/device/u0/chips.json +688 -0
  28. package/assets/device/u3/chips.json +310 -0
  29. package/assets/device/u5/chips.json +884 -0
  30. package/assets/device/wba/chips.json +506 -0
  31. package/assets/device/wl/chips.json +184 -0
  32. package/assets/headers/f1/stm32f100xb.h +5972 -0
  33. package/assets/headers/f1/stm32f100xe.h +6587 -0
  34. package/assets/headers/f1/stm32f101x6.h +5315 -0
  35. package/assets/headers/f1/stm32f101xb.h +5446 -0
  36. package/assets/headers/f1/stm32f101xe.h +6503 -0
  37. package/assets/headers/f1/stm32f101xg.h +6713 -0
  38. package/assets/headers/f1/stm32f102x6.h +6448 -0
  39. package/assets/headers/f1/stm32f102xb.h +6570 -0
  40. package/assets/headers/f1/stm32f103x6.h +10109 -0
  41. package/assets/headers/f1/stm32f103xb.h +10240 -0
  42. package/assets/headers/f1/stm32f103xe.h +11767 -0
  43. package/assets/headers/f1/stm32f103xg.h +11951 -0
  44. package/assets/headers/f1/stm32f105xc.h +14340 -0
  45. package/assets/headers/f1/stm32f107xc.h +15253 -0
  46. package/assets/headers/f1/stm32f1xx.h +273 -0
  47. package/assets/headers/f1/system_stm32f1xx.h +96 -0
  48. package/assets/ioc/family/C0.ioc +82 -0
  49. package/assets/ioc/family/F0.ioc +71 -0
  50. package/assets/ioc/family/F2.ioc +91 -0
  51. package/assets/ioc/family/F3.ioc +94 -0
  52. package/assets/ioc/family/F4.ioc +91 -0
  53. package/assets/ioc/family/F7.ioc +102 -0
  54. package/assets/ioc/family/G0.ioc +90 -0
  55. package/assets/ioc/family/G4.ioc +110 -0
  56. package/assets/ioc/family/H5.ioc +116 -0
  57. package/assets/ioc/family/H7.ioc +133 -0
  58. package/assets/ioc/family/L0.ioc +92 -0
  59. package/assets/ioc/family/L1.ioc +87 -0
  60. package/assets/ioc/family/L4+.ioc +92 -0
  61. package/assets/ioc/family/L4.ioc +93 -0
  62. package/assets/ioc/family/L5.ioc +91 -0
  63. package/assets/ioc/family/U0.ioc +103 -0
  64. package/assets/ioc/family/U3.ioc +113 -0
  65. package/assets/ioc/family/U5.ioc +102 -0
  66. package/assets/ioc/family/WBA.ioc +100 -0
  67. package/assets/ioc/family/WL.ioc +93 -0
  68. package/assets/ioc/minimal/STM32F100C8Tx.ioc +113 -0
  69. package/assets/ioc/minimal/STM32F100RCTx.ioc +113 -0
  70. package/assets/ioc/minimal/STM32F101C4Tx.ioc +113 -0
  71. package/assets/ioc/minimal/STM32F101C8Tx.ioc +113 -0
  72. package/assets/ioc/minimal/STM32F101RCTx.ioc +113 -0
  73. package/assets/ioc/minimal/STM32F101RFTx.ioc +113 -0
  74. package/assets/ioc/minimal/STM32F102C4Tx.ioc +113 -0
  75. package/assets/ioc/minimal/STM32F102C8Tx.ioc +113 -0
  76. package/assets/ioc/minimal/STM32F103C4Tx.ioc +113 -0
  77. package/assets/ioc/minimal/STM32F103C8Tx.ioc +113 -0
  78. package/assets/ioc/minimal/STM32F103RCTx.ioc +113 -0
  79. package/assets/ioc/minimal/STM32F103RFTx.ioc +113 -0
  80. package/assets/ioc/minimal/STM32F105RCTx.ioc +113 -0
  81. package/assets/ioc/minimal/STM32F107RCTx.ioc +113 -0
  82. package/assets/ld/f1/STM32F100C8Tx_FLASH.ld +249 -0
  83. package/assets/ld/f1/STM32F100RCTx_FLASH.ld +249 -0
  84. package/assets/ld/f1/STM32F101C4Tx_FLASH.ld +249 -0
  85. package/assets/ld/f1/STM32F101C8Tx_FLASH.ld +249 -0
  86. package/assets/ld/f1/STM32F101RCTx_FLASH.ld +249 -0
  87. package/assets/ld/f1/STM32F101RFTx_FLASH.ld +249 -0
  88. package/assets/ld/f1/STM32F102C4Tx_FLASH.ld +249 -0
  89. package/assets/ld/f1/STM32F102C8Tx_FLASH.ld +249 -0
  90. package/assets/ld/f1/STM32F103C4Tx_FLASH.ld +249 -0
  91. package/assets/ld/f1/STM32F103C8Tx_FLASH.ld +249 -0
  92. package/assets/ld/f1/STM32F103RCTx_FLASH.ld +249 -0
  93. package/assets/ld/f1/STM32F103RFTx_FLASH.ld +249 -0
  94. package/assets/ld/f1/STM32F105RCTx_FLASH.ld +249 -0
  95. package/assets/ld/f1/STM32F107RCTx_FLASH.ld +249 -0
  96. package/assets/manifest.json +1130 -0
  97. package/assets/startup/f1/startup_stm32f100xb.s +407 -0
  98. package/assets/startup/f1/startup_stm32f100xe.s +449 -0
  99. package/assets/startup/f1/startup_stm32f101x6.s +322 -0
  100. package/assets/startup/f1/startup_stm32f101xb.s +338 -0
  101. package/assets/startup/f1/startup_stm32f101xe.s +423 -0
  102. package/assets/startup/f1/startup_stm32f101xg.s +439 -0
  103. package/assets/startup/f1/startup_stm32f102x6.s +330 -0
  104. package/assets/startup/f1/startup_stm32f102xb.s +346 -0
  105. package/assets/startup/f1/startup_stm32f103x6.s +348 -0
  106. package/assets/startup/f1/startup_stm32f103xb.s +364 -0
  107. package/assets/startup/f1/startup_stm32f103xe.s +470 -0
  108. package/assets/startup/f1/startup_stm32f103xg.s +466 -0
  109. package/assets/startup/f1/startup_stm32f105xc.s +463 -0
  110. package/assets/startup/f1/startup_stm32f107xc.s +472 -0
  111. package/assets/templates/family/C0.ioc +82 -0
  112. package/assets/templates/family/F0.ioc +71 -0
  113. package/assets/templates/family/F2.ioc +91 -0
  114. package/assets/templates/family/F3.ioc +94 -0
  115. package/assets/templates/family/F4.ioc +91 -0
  116. package/assets/templates/family/F7.ioc +102 -0
  117. package/assets/templates/family/G0.ioc +90 -0
  118. package/assets/templates/family/G4.ioc +110 -0
  119. package/assets/templates/family/H5.ioc +116 -0
  120. package/assets/templates/family/H7.ioc +133 -0
  121. package/assets/templates/family/L0.ioc +92 -0
  122. package/assets/templates/family/L1.ioc +87 -0
  123. package/assets/templates/family/L4+.ioc +92 -0
  124. package/assets/templates/family/L4.ioc +93 -0
  125. package/assets/templates/family/L5.ioc +91 -0
  126. package/assets/templates/family/U0.ioc +103 -0
  127. package/assets/templates/family/U3.ioc +113 -0
  128. package/assets/templates/family/U5.ioc +102 -0
  129. package/assets/templates/family/WB.ioc +81 -0
  130. package/assets/templates/family/WBA.ioc +100 -0
  131. package/assets/templates/family/WL.ioc +93 -0
  132. package/docs/reading-guide.md +94 -71
  133. package/lib/data/chips.js +38 -51
  134. package/lib/data/clock-db.js +830 -0
  135. package/lib/data/clock-f1.js +12 -45
  136. package/lib/data/cmsis-sources.js +264 -17
  137. package/lib/data/db-presets.js +252 -0
  138. package/lib/data/device-facts.js +274 -0
  139. package/lib/data/family.js +515 -0
  140. package/lib/data/firmware-packages.js +562 -0
  141. package/lib/data/install-guides.js +2 -2
  142. package/lib/data/ioc-presets.js +248 -0
  143. package/lib/data/ioc-schema.js +1058 -0
  144. package/lib/data/rm-topics/stm32c0.json +227 -0
  145. package/lib/data/rm-topics.js +103 -0
  146. package/lib/data/search-roots.js +42 -1
  147. package/lib/data/stm32f1.js +95 -150
  148. package/lib/data/svd.js +643 -0
  149. package/lib/data/toolchain-config.js +0 -14
  150. package/lib/engine/assets.js +659 -0
  151. package/lib/engine/breakpoints.js +297 -0
  152. package/lib/engine/clock-derived.js +101 -0
  153. package/lib/engine/clock-direct.js +313 -0
  154. package/lib/engine/clock-plan.js +96 -52
  155. package/lib/engine/clock-pllmn.js +319 -0
  156. package/lib/engine/cmake-sources.js +67 -13
  157. package/lib/engine/cube-mx-guard.js +44 -0
  158. package/lib/engine/cube-programmer.js +137 -0
  159. package/lib/engine/cubemx-db.js +273 -0
  160. package/lib/engine/debug-session.js +576 -22
  161. package/lib/engine/debug.js +99 -46
  162. package/lib/engine/doctor.js +162 -19
  163. package/lib/engine/facts-acquire.js +416 -0
  164. package/lib/engine/facts.js +134 -0
  165. package/lib/engine/firmware-install.js +176 -5
  166. package/lib/engine/firmware-official.js +451 -0
  167. package/lib/engine/flash.js +317 -76
  168. package/lib/engine/gdb-mi.js +476 -0
  169. package/lib/engine/generate.js +9 -2
  170. package/lib/engine/hal-chip.js +124 -41
  171. package/lib/engine/ioc-plan.js +1247 -63
  172. package/lib/engine/ioc-rules.js +698 -0
  173. package/lib/engine/ioc-verify.js +706 -0
  174. package/lib/engine/ioc.js +43 -4
  175. package/lib/engine/msys2-install.js +4 -4
  176. package/lib/engine/probe-error.js +231 -0
  177. package/lib/engine/probe-session.js +347 -0
  178. package/lib/engine/probe.js +18 -3
  179. package/lib/engine/register-clock.js +41 -0
  180. package/lib/engine/register-gpio.js +115 -0
  181. package/lib/engine/register-linker.js +12 -7
  182. package/lib/engine/register-template.js +130 -45
  183. package/lib/engine/regs.js +43 -8
  184. package/lib/engine/rm-extract.js +144 -0
  185. package/lib/engine/rm-sources.js +360 -0
  186. package/lib/engine/rm-text.js +56 -0
  187. package/lib/engine/rtt.js +758 -0
  188. package/lib/engine/scaffold.js +185 -18
  189. package/lib/engine/toolchain-gate.js +0 -4
  190. package/lib/engine/watch.js +227 -0
  191. package/lib/index.js +12 -2
  192. package/lib/skill/stm32-workflow.js +2 -2
  193. package/lib/tools/assets.js +272 -0
  194. package/lib/tools/cache.js +8 -0
  195. package/lib/tools/debug-session.js +41 -6
  196. package/lib/tools/debug.js +41 -11
  197. package/lib/tools/doctor.js +65 -4
  198. package/lib/tools/firmware-install.js +31 -6
  199. package/lib/tools/flash.js +47 -10
  200. package/lib/tools/generate.js +25 -0
  201. package/lib/tools/ioc-apply.js +2 -0
  202. package/lib/tools/ioc-inspect.js +2 -0
  203. package/lib/tools/ioc-plan.js +59 -2
  204. package/lib/tools/ioc-verify.js +237 -0
  205. package/lib/tools/project-create.js +63 -3
  206. package/lib/tools/regs.js +453 -61
  207. package/lib/tools/route-plan.js +3 -0
  208. package/lib/tools/rtt.js +470 -0
  209. package/lib/tools/watch.js +256 -0
  210. package/package.json +5 -4
  211. package/templates/openocd/stm32c0x.cfg +83 -0
  212. package/templates/openocd/stm32u0x.cfg +64 -0
  213. package/templates/register/CMakeLists.txt +8 -2
  214. package/templates/register/Core/Inc/rtt.h +138 -0
  215. package/templates/register/Core/Src/main.c +42 -25
  216. package/templates/register/Core/Src/rtt.c +373 -0
  217. package/templates/scaffold/RTT.md +90 -0
  218. package/templates/scaffold/STM32F103XX_FLASH.ld +3 -0
  219. package/templates/scaffold/cmake/user/CMakeLists.txt +7 -0
  220. package/templates/scaffold/openocd.cfg +5 -3
  221. package/templates/scaffold/vscode/launch.json +8 -4
  222. package/docs/development-notes.md +0 -2116
  223. package/docs/dsh-stm32-plugin-/350/247/204/346/240/274.md +0 -673
  224. package/docs/logic-audit.md +0 -607
  225. package/lib/data/f1-ram.generated.js +0 -34
@@ -58,6 +58,568 @@ export const FIRMWARE_FAMILIES = {
58
58
  },
59
59
  ],
60
60
  },
61
+ F2: {
62
+ family: "F2",
63
+ packageBase: "STM32Cube_FW_F2",
64
+ defaultVersion: "1.9.3",
65
+ halDir: "Drivers/STM32F2xx_HAL_Driver",
66
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32F2xx",
67
+ coreRepo: "STM32CubeF2",
68
+ coreRef: "master",
69
+ coreIncludeDir: "Drivers/CMSIS/Include",
70
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm3.h"],
71
+ archives: [
72
+ {
73
+ id: "hal",
74
+ label: "HAL 驱动(stm32f2xx-hal-driver)",
75
+ repo: "stm32f2xx-hal-driver",
76
+ ref: "master",
77
+ dirs: [
78
+ { from: "Inc", to: "Drivers/STM32F2xx_HAL_Driver/Inc" },
79
+ { from: "Src", to: "Drivers/STM32F2xx_HAL_Driver/Src" },
80
+ ],
81
+ urls: archiveUrls("stm32f2xx-hal-driver", "master"),
82
+ },
83
+ {
84
+ id: "device",
85
+ label: "CMSIS 设备支持(cmsis-device-f2)",
86
+ repo: "cmsis-device-f2",
87
+ ref: "master",
88
+ dirs: [
89
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32F2xx/Include" },
90
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32F2xx/Source" },
91
+ ],
92
+ urls: archiveUrls("cmsis-device-f2", "master"),
93
+ },
94
+ ],
95
+ },
96
+ F3: {
97
+ family: "F3",
98
+ packageBase: "STM32Cube_FW_F3",
99
+ defaultVersion: "1.11.5",
100
+ halDir: "Drivers/STM32F3xx_HAL_Driver",
101
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32F3xx",
102
+ coreRepo: "STM32CubeF3",
103
+ coreRef: "master",
104
+ coreIncludeDir: "Drivers/CMSIS/Include",
105
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm4.h"],
106
+ archives: [
107
+ {
108
+ id: "hal",
109
+ label: "HAL 驱动(stm32f3xx-hal-driver)",
110
+ repo: "stm32f3xx-hal-driver",
111
+ ref: "master",
112
+ dirs: [
113
+ { from: "Inc", to: "Drivers/STM32F3xx_HAL_Driver/Inc" },
114
+ { from: "Src", to: "Drivers/STM32F3xx_HAL_Driver/Src" },
115
+ ],
116
+ urls: archiveUrls("stm32f3xx-hal-driver", "master"),
117
+ },
118
+ {
119
+ id: "device",
120
+ label: "CMSIS 设备支持(cmsis-device-f3)",
121
+ repo: "cmsis-device-f3",
122
+ ref: "master",
123
+ dirs: [
124
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32F3xx/Include" },
125
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32F3xx/Source" },
126
+ ],
127
+ urls: archiveUrls("cmsis-device-f3", "master"),
128
+ },
129
+ ],
130
+ },
131
+ F7: {
132
+ family: "F7",
133
+ packageBase: "STM32Cube_FW_F7",
134
+ defaultVersion: "1.17.4",
135
+ halDir: "Drivers/STM32F7xx_HAL_Driver",
136
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32F7xx",
137
+ coreRepo: "STM32CubeF7",
138
+ coreRef: "master",
139
+ coreIncludeDir: "Drivers/CMSIS/Include",
140
+ // CM7 的 core_cm7.h 会 include cachel1_armv7.h(L1 cache 维护):漏了它编译直接 fatal error。
141
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "cachel1_armv7.h", "core_cm7.h"],
142
+ archives: [
143
+ {
144
+ id: "hal",
145
+ label: "HAL 驱动(stm32f7xx-hal-driver)",
146
+ repo: "stm32f7xx-hal-driver",
147
+ ref: "master",
148
+ dirs: [
149
+ { from: "Inc", to: "Drivers/STM32F7xx_HAL_Driver/Inc" },
150
+ { from: "Src", to: "Drivers/STM32F7xx_HAL_Driver/Src" },
151
+ ],
152
+ urls: archiveUrls("stm32f7xx-hal-driver", "master"),
153
+ },
154
+ {
155
+ id: "device",
156
+ label: "CMSIS 设备支持(cmsis-device-f7)",
157
+ repo: "cmsis-device-f7",
158
+ ref: "master",
159
+ dirs: [
160
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32F7xx/Include" },
161
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32F7xx/Source" },
162
+ ],
163
+ urls: archiveUrls("cmsis-device-f7", "master"),
164
+ },
165
+ ],
166
+ },
167
+ G0: {
168
+ family: "G0",
169
+ packageBase: "STM32Cube_FW_G0",
170
+ defaultVersion: "1.6.2",
171
+ halDir: "Drivers/STM32G0xx_HAL_Driver",
172
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32G0xx",
173
+ coreRepo: "STM32CubeG0",
174
+ coreRef: "master",
175
+ coreIncludeDir: "Drivers/CMSIS/Include",
176
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm0plus.h"],
177
+ archives: [
178
+ {
179
+ id: "hal",
180
+ label: "HAL 驱动(stm32g0xx-hal-driver)",
181
+ repo: "stm32g0xx-hal-driver",
182
+ ref: "master",
183
+ dirs: [
184
+ { from: "Inc", to: "Drivers/STM32G0xx_HAL_Driver/Inc" },
185
+ { from: "Src", to: "Drivers/STM32G0xx_HAL_Driver/Src" },
186
+ ],
187
+ urls: archiveUrls("stm32g0xx-hal-driver", "master"),
188
+ },
189
+ {
190
+ id: "device",
191
+ label: "CMSIS 设备支持(cmsis-device-g0)",
192
+ repo: "cmsis-device-g0",
193
+ ref: "master",
194
+ dirs: [
195
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32G0xx/Include" },
196
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32G0xx/Source" },
197
+ ],
198
+ urls: archiveUrls("cmsis-device-g0", "master"),
199
+ },
200
+ ],
201
+ },
202
+ L1: {
203
+ family: "L1",
204
+ packageBase: "STM32Cube_FW_L1",
205
+ defaultVersion: "1.10.6",
206
+ halDir: "Drivers/STM32L1xx_HAL_Driver",
207
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32L1xx",
208
+ coreRepo: "STM32CubeL1",
209
+ coreRef: "master",
210
+ coreIncludeDir: "Drivers/CMSIS/Include",
211
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm3.h"],
212
+ archives: [
213
+ {
214
+ id: "hal",
215
+ label: "HAL 驱动(stm32l1xx-hal-driver)",
216
+ repo: "stm32l1xx-hal-driver",
217
+ ref: "master",
218
+ dirs: [
219
+ { from: "Inc", to: "Drivers/STM32L1xx_HAL_Driver/Inc" },
220
+ { from: "Src", to: "Drivers/STM32L1xx_HAL_Driver/Src" },
221
+ ],
222
+ urls: archiveUrls("stm32l1xx-hal-driver", "master"),
223
+ },
224
+ {
225
+ id: "device",
226
+ label: "CMSIS 设备支持(cmsis-device-l1)",
227
+ repo: "cmsis-device-l1",
228
+ ref: "master",
229
+ dirs: [
230
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32L1xx/Include" },
231
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32L1xx/Source" },
232
+ ],
233
+ urls: archiveUrls("cmsis-device-l1", "master"),
234
+ },
235
+ ],
236
+ },
237
+ L4: {
238
+ family: "L4",
239
+ packageBase: "STM32Cube_FW_L4",
240
+ defaultVersion: "1.18.2",
241
+ halDir: "Drivers/STM32L4xx_HAL_Driver",
242
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32L4xx",
243
+ coreRepo: "STM32CubeL4",
244
+ coreRef: "master",
245
+ coreIncludeDir: "Drivers/CMSIS/Include",
246
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm4.h"],
247
+ archives: [
248
+ {
249
+ id: "hal",
250
+ label: "HAL 驱动(stm32l4xx-hal-driver)",
251
+ repo: "stm32l4xx-hal-driver",
252
+ ref: "master",
253
+ dirs: [
254
+ { from: "Inc", to: "Drivers/STM32L4xx_HAL_Driver/Inc" },
255
+ { from: "Src", to: "Drivers/STM32L4xx_HAL_Driver/Src" },
256
+ ],
257
+ urls: archiveUrls("stm32l4xx-hal-driver", "master"),
258
+ },
259
+ {
260
+ id: "device",
261
+ label: "CMSIS 设备支持(cmsis-device-l4)",
262
+ repo: "cmsis-device-l4",
263
+ ref: "master",
264
+ dirs: [
265
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32L4xx/Include" },
266
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32L4xx/Source" },
267
+ ],
268
+ urls: archiveUrls("cmsis-device-l4", "master"),
269
+ },
270
+ ],
271
+ },
272
+ U0: {
273
+ family: "U0",
274
+ packageBase: "STM32Cube_FW_U0",
275
+ defaultVersion: "1.2.0",
276
+ halDir: "Drivers/STM32U0xx_HAL_Driver",
277
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32U0xx",
278
+ coreRepo: "STM32CubeU0",
279
+ coreRef: "main",
280
+ coreIncludeDir: "Drivers/CMSIS/Include",
281
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm0plus.h"],
282
+ archives: [
283
+ {
284
+ id: "hal",
285
+ label: "HAL 驱动(stm32u0xx-hal-driver)",
286
+ repo: "stm32u0xx-hal-driver",
287
+ ref: "main",
288
+ dirs: [
289
+ { from: "Inc", to: "Drivers/STM32U0xx_HAL_Driver/Inc" },
290
+ { from: "Src", to: "Drivers/STM32U0xx_HAL_Driver/Src" },
291
+ ],
292
+ urls: archiveUrls("stm32u0xx-hal-driver", "main"),
293
+ },
294
+ {
295
+ id: "device",
296
+ label: "CMSIS 设备支持(cmsis-device-u0)",
297
+ repo: "cmsis-device-u0",
298
+ ref: "main",
299
+ dirs: [
300
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32U0xx/Include" },
301
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32U0xx/Source" },
302
+ ],
303
+ urls: archiveUrls("cmsis-device-u0", "main"),
304
+ },
305
+ ],
306
+ },
307
+ C0: {
308
+ family: "C0",
309
+ packageBase: "STM32Cube_FW_C0",
310
+ defaultVersion: "1.4.1",
311
+ halDir: "Drivers/STM32C0xx_HAL_Driver",
312
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32C0xx",
313
+ coreRepo: "STM32CubeC0",
314
+ coreRef: "main",
315
+ coreIncludeDir: "Drivers/CMSIS/Include",
316
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm0plus.h"],
317
+ archives: [
318
+ {
319
+ id: "hal",
320
+ label: "HAL 驱动(stm32c0xx-hal-driver)",
321
+ repo: "stm32c0xx-hal-driver",
322
+ ref: "main",
323
+ dirs: [
324
+ { from: "Inc", to: "Drivers/STM32C0xx_HAL_Driver/Inc" },
325
+ { from: "Src", to: "Drivers/STM32C0xx_HAL_Driver/Src" },
326
+ ],
327
+ urls: archiveUrls("stm32c0xx-hal-driver", "main"),
328
+ },
329
+ {
330
+ id: "device",
331
+ label: "CMSIS 设备支持(cmsis-device-c0)",
332
+ repo: "cmsis-device-c0",
333
+ ref: "main",
334
+ dirs: [
335
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32C0xx/Include" },
336
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32C0xx/Source" },
337
+ ],
338
+ urls: archiveUrls("cmsis-device-c0", "main"),
339
+ },
340
+ ],
341
+ },
342
+ H5: {
343
+ family: "H5",
344
+ packageBase: "STM32Cube_FW_H5",
345
+ defaultVersion: "1.5.1",
346
+ halDir: "Drivers/STM32H5xx_HAL_Driver",
347
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32H5xx",
348
+ coreRepo: "STM32CubeH5",
349
+ coreRef: "main",
350
+ coreIncludeDir: "Drivers/CMSIS/Include",
351
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv8.h", "core_cm33.h"],
352
+ archives: [
353
+ {
354
+ id: "hal",
355
+ label: "HAL 驱动(stm32h5xx_hal_driver)",
356
+ repo: "stm32h5xx_hal_driver",
357
+ ref: "main",
358
+ dirs: [
359
+ { from: "Inc", to: "Drivers/STM32H5xx_HAL_Driver/Inc" },
360
+ { from: "Src", to: "Drivers/STM32H5xx_HAL_Driver/Src" },
361
+ ],
362
+ urls: archiveUrls("stm32h5xx_hal_driver", "main"),
363
+ },
364
+ {
365
+ id: "device",
366
+ label: "CMSIS 设备支持(cmsis_device_h5)",
367
+ repo: "cmsis_device_h5",
368
+ ref: "main",
369
+ dirs: [
370
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32H5xx/Include" },
371
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32H5xx/Source" },
372
+ ],
373
+ urls: archiveUrls("cmsis_device_h5", "main"),
374
+ },
375
+ ],
376
+ },
377
+ U5: {
378
+ family: "U5",
379
+ packageBase: "STM32Cube_FW_U5",
380
+ defaultVersion: "1.8.0",
381
+ halDir: "Drivers/STM32U5xx_HAL_Driver",
382
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32U5xx",
383
+ coreRepo: "STM32CubeU5",
384
+ coreRef: "main",
385
+ coreIncludeDir: "Drivers/CMSIS/Include",
386
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv8.h", "core_cm33.h"],
387
+ archives: [
388
+ {
389
+ id: "hal",
390
+ label: "HAL 驱动(stm32u5xx_hal_driver)",
391
+ repo: "stm32u5xx_hal_driver",
392
+ ref: "main",
393
+ dirs: [
394
+ { from: "Inc", to: "Drivers/STM32U5xx_HAL_Driver/Inc" },
395
+ { from: "Src", to: "Drivers/STM32U5xx_HAL_Driver/Src" },
396
+ ],
397
+ urls: archiveUrls("stm32u5xx_hal_driver", "main"),
398
+ },
399
+ {
400
+ id: "device",
401
+ label: "CMSIS 设备支持(cmsis_device_u5)",
402
+ repo: "cmsis_device_u5",
403
+ ref: "main",
404
+ dirs: [
405
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32U5xx/Include" },
406
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32U5xx/Source" },
407
+ ],
408
+ urls: archiveUrls("cmsis_device_u5", "main"),
409
+ },
410
+ ],
411
+ },
412
+ WBA: {
413
+ family: "WBA",
414
+ packageBase: "STM32Cube_FW_WBA",
415
+ defaultVersion: "1.7.0",
416
+ halDir: "Drivers/STM32WBAxx_HAL_Driver",
417
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32WBAxx",
418
+ coreRepo: "STM32CubeWBA",
419
+ coreRef: "main",
420
+ coreIncludeDir: "Drivers/CMSIS/Include",
421
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv8.h", "core_cm33.h"],
422
+ archives: [
423
+ {
424
+ id: "hal",
425
+ label: "HAL 驱动(stm32wbaxx_hal_driver)",
426
+ repo: "stm32wbaxx_hal_driver",
427
+ ref: "main",
428
+ dirs: [
429
+ { from: "Inc", to: "Drivers/STM32WBAxx_HAL_Driver/Inc" },
430
+ { from: "Src", to: "Drivers/STM32WBAxx_HAL_Driver/Src" },
431
+ ],
432
+ urls: archiveUrls("stm32wbaxx_hal_driver", "main"),
433
+ },
434
+ {
435
+ id: "device",
436
+ label: "CMSIS 设备支持(cmsis_device_wba)",
437
+ repo: "cmsis_device_wba",
438
+ ref: "main",
439
+ dirs: [
440
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32WBAxx/Include" },
441
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32WBAxx/Source" },
442
+ ],
443
+ urls: archiveUrls("cmsis_device_wba", "main"),
444
+ },
445
+ ],
446
+ },
447
+ L5: {
448
+ family: "L5",
449
+ packageBase: "STM32Cube_FW_L5",
450
+ defaultVersion: "1.5.0",
451
+ halDir: "Drivers/STM32L5xx_HAL_Driver",
452
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32L5xx",
453
+ coreRepo: "STM32CubeL5",
454
+ coreRef: "master",
455
+ coreIncludeDir: "Drivers/CMSIS/Include",
456
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv8.h", "core_cm33.h"],
457
+ archives: [
458
+ {
459
+ id: "hal",
460
+ label: "HAL 驱动(stm32l5xx_hal_driver)",
461
+ repo: "stm32l5xx_hal_driver",
462
+ ref: "master",
463
+ dirs: [
464
+ { from: "Inc", to: "Drivers/STM32L5xx_HAL_Driver/Inc" },
465
+ { from: "Src", to: "Drivers/STM32L5xx_HAL_Driver/Src" },
466
+ ],
467
+ urls: archiveUrls("stm32l5xx_hal_driver", "master"),
468
+ },
469
+ {
470
+ id: "device",
471
+ label: "CMSIS 设备支持(cmsis_device_l5)",
472
+ repo: "cmsis_device_l5",
473
+ ref: "master",
474
+ dirs: [
475
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32L5xx/Include" },
476
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32L5xx/Source" },
477
+ ],
478
+ urls: archiveUrls("cmsis_device_l5", "master"),
479
+ },
480
+ ],
481
+ },
482
+ WB: {
483
+ family: "WB",
484
+ packageBase: "STM32Cube_FW_WB",
485
+ defaultVersion: "1.23.0",
486
+ halDir: "Drivers/STM32WBxx_HAL_Driver",
487
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32WBxx",
488
+ coreRepo: "STM32CubeWB",
489
+ coreRef: "master",
490
+ coreIncludeDir: "Drivers/CMSIS/Include",
491
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm4.h"],
492
+ archives: [
493
+ {
494
+ id: "hal",
495
+ label: "HAL 驱动(stm32wbxx_hal_driver)",
496
+ repo: "stm32wbxx_hal_driver",
497
+ ref: "master",
498
+ dirs: [
499
+ { from: "Inc", to: "Drivers/STM32WBxx_HAL_Driver/Inc" },
500
+ { from: "Src", to: "Drivers/STM32WBxx_HAL_Driver/Src" },
501
+ ],
502
+ urls: archiveUrls("stm32wbxx_hal_driver", "master"),
503
+ },
504
+ {
505
+ id: "device",
506
+ label: "CMSIS 设备支持(cmsis_device_wb)",
507
+ repo: "cmsis_device_wb",
508
+ ref: "master",
509
+ dirs: [
510
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32WBxx/Include" },
511
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32WBxx/Source" },
512
+ ],
513
+ urls: archiveUrls("cmsis_device_wb", "master"),
514
+ },
515
+ ],
516
+ },
517
+ WL: {
518
+ family: "WL",
519
+ packageBase: "STM32Cube_FW_WL",
520
+ defaultVersion: "1.3.0",
521
+ halDir: "Drivers/STM32WLxx_HAL_Driver",
522
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32WLxx",
523
+ coreRepo: "STM32CubeWL",
524
+ coreRef: "main",
525
+ coreIncludeDir: "Drivers/CMSIS/Include",
526
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "core_cm4.h"],
527
+ archives: [
528
+ {
529
+ id: "hal",
530
+ label: "HAL 驱动(stm32wlxx_hal_driver)",
531
+ repo: "stm32wlxx_hal_driver",
532
+ ref: "main",
533
+ dirs: [
534
+ { from: "Inc", to: "Drivers/STM32WLxx_HAL_Driver/Inc" },
535
+ { from: "Src", to: "Drivers/STM32WLxx_HAL_Driver/Src" },
536
+ ],
537
+ urls: archiveUrls("stm32wlxx_hal_driver", "main"),
538
+ },
539
+ {
540
+ id: "device",
541
+ label: "CMSIS 设备支持(cmsis_device_wl)",
542
+ repo: "cmsis_device_wl",
543
+ ref: "main",
544
+ dirs: [
545
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32WLxx/Include" },
546
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32WLxx/Source" },
547
+ ],
548
+ urls: archiveUrls("cmsis_device_wl", "main"),
549
+ },
550
+ ],
551
+ },
552
+ H7: {
553
+ family: "H7",
554
+ packageBase: "STM32Cube_FW_H7",
555
+ defaultVersion: "1.11.0",
556
+ halDir: "Drivers/STM32H7xx_HAL_Driver",
557
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32H7xx",
558
+ coreRepo: "STM32CubeH7",
559
+ coreRef: "master",
560
+ coreIncludeDir: "Drivers/CMSIS/Include",
561
+ // CM7 的 core_cm7.h 会 include cachel1_armv7.h(L1 cache 维护):漏了它编译直接 fatal error。
562
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv7.h", "cachel1_armv7.h", "core_cm7.h"],
563
+ archives: [
564
+ {
565
+ id: "hal",
566
+ label: "HAL 驱动(stm32h7xx_hal_driver)",
567
+ repo: "stm32h7xx_hal_driver",
568
+ ref: "master",
569
+ dirs: [
570
+ { from: "Inc", to: "Drivers/STM32H7xx_HAL_Driver/Inc" },
571
+ { from: "Src", to: "Drivers/STM32H7xx_HAL_Driver/Src" },
572
+ ],
573
+ urls: archiveUrls("stm32h7xx_hal_driver", "master"),
574
+ },
575
+ {
576
+ id: "device",
577
+ label: "CMSIS 设备支持(cmsis_device_h7)",
578
+ repo: "cmsis_device_h7",
579
+ ref: "master",
580
+ dirs: [
581
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32H7xx/Include" },
582
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32H7xx/Source" },
583
+ ],
584
+ urls: archiveUrls("cmsis_device_h7", "master"),
585
+ },
586
+ ],
587
+ },
588
+ U3: {
589
+ family: "U3",
590
+ packageBase: "STM32Cube_FW_U3",
591
+ defaultVersion: "1.2.0",
592
+ halDir: "Drivers/STM32U3xx_HAL_Driver",
593
+ deviceDir: "Drivers/CMSIS/Device/ST/STM32U3xx",
594
+ coreRepo: "STM32CubeU3",
595
+ coreRef: "main",
596
+ coreIncludeDir: "Drivers/CMSIS/Include",
597
+ coreHeaders: ["cmsis_compiler.h", "cmsis_gcc.h", "cmsis_version.h", "mpu_armv8.h", "core_cm33.h"],
598
+ archives: [
599
+ {
600
+ id: "hal",
601
+ label: "HAL 驱动(stm32u3xx-hal-driver)",
602
+ repo: "stm32u3xx-hal-driver",
603
+ ref: "main",
604
+ dirs: [
605
+ { from: "Inc", to: "Drivers/STM32U3xx_HAL_Driver/Inc" },
606
+ { from: "Src", to: "Drivers/STM32U3xx_HAL_Driver/Src" },
607
+ ],
608
+ urls: archiveUrls("stm32u3xx-hal-driver", "main"),
609
+ },
610
+ {
611
+ id: "device",
612
+ label: "CMSIS 设备支持(cmsis-device-u3)",
613
+ repo: "cmsis-device-u3",
614
+ ref: "main",
615
+ dirs: [
616
+ { from: "Include", to: "Drivers/CMSIS/Device/ST/STM32U3xx/Include" },
617
+ { from: "Source", to: "Drivers/CMSIS/Device/ST/STM32U3xx/Source" },
618
+ ],
619
+ urls: archiveUrls("cmsis-device-u3", "main"),
620
+ },
621
+ ],
622
+ },
61
623
  };
62
624
  /** 从型号(STM32F103C8T6)或族名(F1)里认族;认不出返回空串。 */
63
625
  export function firmwareFamilyOf(text) {
@@ -55,10 +55,10 @@ export function cubeMxGuide() {
55
55
  },
56
56
  {
57
57
  title: "自检",
58
- detail: "stm32_env_probe 的 tools 里 cubemx 与 cubemx-java 都应带 path;缺 jre 的话无头生成会直接报 java 找不到。",
58
+ detail: "stm32_doctor 的 tools 里 cubemx 与 cubemx-java 都应带 path;缺 jre 的话无头生成会直接报 java 找不到。",
59
59
  },
60
60
  ],
61
- verify: "stm32_env_probe → capabilities.generate 为 true(cubemx 与 cubemx-java 都找到)。",
61
+ verify: "stm32_doctor → capabilities.generate 为 true(cubemx 与 cubemx-java 都找到)。",
62
62
  portable: "一台机器上 GUI 装一次,把整个安装目录拷到目标机任意路径(jre 在目录里,不依赖系统 Java),"
63
63
  + "再把 cubeMxRoot 指过去即可。",
64
64
  };