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
@@ -0,0 +1,273 @@
1
+ /**
2
+ ******************************************************************************
3
+ * @file stm32f1xx.h
4
+ * @author MCD Application Team
5
+ * @brief CMSIS STM32F1xx Device Peripheral Access Layer Header File.
6
+ *
7
+ * The file is the unique include file that the application programmer
8
+ * is using in the C source code, usually in main.c. This file contains:
9
+ * - Configuration section that allows to select:
10
+ * - The STM32F1xx device used in the target application
11
+ * - To use or not the peripheral's drivers in application code(i.e.
12
+ * code will be based on direct access to peripheral's registers
13
+ * rather than drivers API), this option is controlled by
14
+ * "#define USE_HAL_DRIVER"
15
+ *
16
+ ******************************************************************************
17
+ * @attention
18
+ *
19
+ * Copyright (c) 2017-2021 STMicroelectronics.
20
+ * All rights reserved.
21
+ *
22
+ * This software is licensed under terms that can be found in the LICENSE file
23
+ * in the root directory of this software component.
24
+ * If no LICENSE file comes with this software, it is provided AS-IS.
25
+ *
26
+ ******************************************************************************
27
+ */
28
+
29
+ /** @addtogroup CMSIS
30
+ * @{
31
+ */
32
+
33
+ /** @addtogroup stm32f1xx
34
+ * @{
35
+ */
36
+
37
+ #ifndef __STM32F1XX_H
38
+ #define __STM32F1XX_H
39
+
40
+ #ifdef __cplusplus
41
+ extern "C" {
42
+ #endif /* __cplusplus */
43
+
44
+ /** @addtogroup Library_configuration_section
45
+ * @{
46
+ */
47
+
48
+ /**
49
+ * @brief STM32 Family
50
+ */
51
+ #if !defined (STM32F1)
52
+ #define STM32F1
53
+ #endif /* STM32F1 */
54
+
55
+ /* Uncomment the line below according to the target STM32L device used in your
56
+ application
57
+ */
58
+
59
+ #if !defined (STM32F100xB) && !defined (STM32F100xE) && !defined (STM32F101x6) && \
60
+ !defined (STM32F101xB) && !defined (STM32F101xE) && !defined (STM32F101xG) && !defined (STM32F102x6) && !defined (STM32F102xB) && !defined (STM32F103x6) && \
61
+ !defined (STM32F103xB) && !defined (STM32F103xE) && !defined (STM32F103xG) && !defined (STM32F105xC) && !defined (STM32F107xC)
62
+ /* #define STM32F100xB */ /*!< STM32F100C4, STM32F100R4, STM32F100C6, STM32F100R6, STM32F100C8, STM32F100R8, STM32F100V8, STM32F100CB, STM32F100RB and STM32F100VB */
63
+ /* #define STM32F100xE */ /*!< STM32F100RC, STM32F100VC, STM32F100ZC, STM32F100RD, STM32F100VD, STM32F100ZD, STM32F100RE, STM32F100VE and STM32F100ZE */
64
+ /* #define STM32F101x6 */ /*!< STM32F101C4, STM32F101R4, STM32F101T4, STM32F101C6, STM32F101R6 and STM32F101T6 Devices */
65
+ /* #define STM32F101xB */ /*!< STM32F101C8, STM32F101R8, STM32F101T8, STM32F101V8, STM32F101CB, STM32F101RB, STM32F101TB and STM32F101VB */
66
+ /* #define STM32F101xE */ /*!< STM32F101RC, STM32F101VC, STM32F101ZC, STM32F101RD, STM32F101VD, STM32F101ZD, STM32F101RE, STM32F101VE and STM32F101ZE */
67
+ /* #define STM32F101xG */ /*!< STM32F101RF, STM32F101VF, STM32F101ZF, STM32F101RG, STM32F101VG and STM32F101ZG */
68
+ /* #define STM32F102x6 */ /*!< STM32F102C4, STM32F102R4, STM32F102C6 and STM32F102R6 */
69
+ /* #define STM32F102xB */ /*!< STM32F102C8, STM32F102R8, STM32F102CB and STM32F102RB */
70
+ /* #define STM32F103x6 */ /*!< STM32F103C4, STM32F103R4, STM32F103T4, STM32F103C6, STM32F103R6 and STM32F103T6 */
71
+ /* #define STM32F103xB */ /*!< STM32F103C8, STM32F103R8, STM32F103T8, STM32F103V8, STM32F103CB, STM32F103RB, STM32F103TB and STM32F103VB */
72
+ /* #define STM32F103xE */ /*!< STM32F103RC, STM32F103VC, STM32F103ZC, STM32F103RD, STM32F103VD, STM32F103ZD, STM32F103RE, STM32F103VE and STM32F103ZE */
73
+ /* #define STM32F103xG */ /*!< STM32F103RF, STM32F103VF, STM32F103ZF, STM32F103RG, STM32F103VG and STM32F103ZG */
74
+ /* #define STM32F105xC */ /*!< STM32F105R8, STM32F105V8, STM32F105RB, STM32F105VB, STM32F105RC and STM32F105VC */
75
+ /* #define STM32F107xC */ /*!< STM32F107RB, STM32F107VB, STM32F107RC and STM32F107VC */
76
+ #endif
77
+
78
+ /* Tip: To avoid modifying this file each time you need to switch between these
79
+ devices, you can define the device in your toolchain compiler preprocessor.
80
+ */
81
+
82
+ #if !defined (USE_HAL_DRIVER)
83
+ /**
84
+ * @brief Comment the line below if you will not use the peripherals drivers.
85
+ In this case, these drivers will not be included and the application code will
86
+ be based on direct access to peripherals registers
87
+ */
88
+ /*#define USE_HAL_DRIVER */
89
+ #endif /* USE_HAL_DRIVER */
90
+
91
+ /**
92
+ * @brief CMSIS Device version number
93
+ */
94
+ #define __STM32F1_CMSIS_VERSION_MAIN (0x04) /*!< [31:24] main version */
95
+ #define __STM32F1_CMSIS_VERSION_SUB1 (0x03) /*!< [23:16] sub1 version */
96
+ #define __STM32F1_CMSIS_VERSION_SUB2 (0x05) /*!< [15:8] sub2 version */
97
+ #define __STM32F1_CMSIS_VERSION_RC (0x00) /*!< [7:0] release candidate */
98
+ #define __STM32F1_CMSIS_VERSION ((__STM32F1_CMSIS_VERSION_MAIN << 24)\
99
+ |(__STM32F1_CMSIS_VERSION_SUB1 << 16)\
100
+ |(__STM32F1_CMSIS_VERSION_SUB2 << 8 )\
101
+ |(__STM32F1_CMSIS_VERSION_RC))
102
+
103
+ /**
104
+ * @}
105
+ */
106
+
107
+ /** @addtogroup Device_Included
108
+ * @{
109
+ */
110
+
111
+ #if defined(STM32F100xB)
112
+ #include "stm32f100xb.h"
113
+ #elif defined(STM32F100xE)
114
+ #include "stm32f100xe.h"
115
+ #elif defined(STM32F101x6)
116
+ #include "stm32f101x6.h"
117
+ #elif defined(STM32F101xB)
118
+ #include "stm32f101xb.h"
119
+ #elif defined(STM32F101xE)
120
+ #include "stm32f101xe.h"
121
+ #elif defined(STM32F101xG)
122
+ #include "stm32f101xg.h"
123
+ #elif defined(STM32F102x6)
124
+ #include "stm32f102x6.h"
125
+ #elif defined(STM32F102xB)
126
+ #include "stm32f102xb.h"
127
+ #elif defined(STM32F103x6)
128
+ #include "stm32f103x6.h"
129
+ #elif defined(STM32F103xB)
130
+ #include "stm32f103xb.h"
131
+ #elif defined(STM32F103xE)
132
+ #include "stm32f103xe.h"
133
+ #elif defined(STM32F103xG)
134
+ #include "stm32f103xg.h"
135
+ #elif defined(STM32F105xC)
136
+ #include "stm32f105xc.h"
137
+ #elif defined(STM32F107xC)
138
+ #include "stm32f107xc.h"
139
+ #else
140
+ #error "Please select first the target STM32F1xx device used in your application (in stm32f1xx.h file)"
141
+ #endif
142
+
143
+ /**
144
+ * @}
145
+ */
146
+
147
+ /** @addtogroup Exported_types
148
+ * @{
149
+ */
150
+ typedef enum
151
+ {
152
+ RESET = 0,
153
+ SET = !RESET
154
+ } FlagStatus, ITStatus;
155
+
156
+ typedef enum
157
+ {
158
+ DISABLE = 0,
159
+ ENABLE = !DISABLE
160
+ } FunctionalState;
161
+ #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
162
+
163
+ typedef enum
164
+ {
165
+ SUCCESS = 0U,
166
+ ERROR = !SUCCESS
167
+ } ErrorStatus;
168
+
169
+ /**
170
+ * @}
171
+ */
172
+
173
+
174
+ /** @addtogroup Exported_macros
175
+ * @{
176
+ */
177
+ #define SET_BIT(REG, BIT) ((REG) |= (BIT))
178
+
179
+ #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT))
180
+
181
+ #define READ_BIT(REG, BIT) ((REG) & (BIT))
182
+
183
+ #define CLEAR_REG(REG) ((REG) = (0x0))
184
+
185
+ #define WRITE_REG(REG, VAL) ((REG) = (VAL))
186
+
187
+ #define READ_REG(REG) ((REG))
188
+
189
+ #define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
190
+
191
+ #define POSITION_VAL(VAL) (__CLZ(__RBIT(VAL)))
192
+
193
+ /* Use of CMSIS compiler intrinsics for register exclusive access */
194
+ /* Atomic 32-bit register access macro to set one or several bits */
195
+ #define ATOMIC_SET_BIT(REG, BIT) \
196
+ do { \
197
+ uint32_t val; \
198
+ do { \
199
+ val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \
200
+ } while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
201
+ } while(0)
202
+
203
+ /* Atomic 32-bit register access macro to clear one or several bits */
204
+ #define ATOMIC_CLEAR_BIT(REG, BIT) \
205
+ do { \
206
+ uint32_t val; \
207
+ do { \
208
+ val = __LDREXW((__IO uint32_t *)&(REG)) & ~(BIT); \
209
+ } while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
210
+ } while(0)
211
+
212
+ /* Atomic 32-bit register access macro to clear and set one or several bits */
213
+ #define ATOMIC_MODIFY_REG(REG, CLEARMSK, SETMASK) \
214
+ do { \
215
+ uint32_t val; \
216
+ do { \
217
+ val = (__LDREXW((__IO uint32_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
218
+ } while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \
219
+ } while(0)
220
+
221
+ /* Atomic 16-bit register access macro to set one or several bits */
222
+ #define ATOMIC_SETH_BIT(REG, BIT) \
223
+ do { \
224
+ uint16_t val; \
225
+ do { \
226
+ val = __LDREXH((__IO uint16_t *)&(REG)) | (BIT); \
227
+ } while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
228
+ } while(0)
229
+
230
+ /* Atomic 16-bit register access macro to clear one or several bits */
231
+ #define ATOMIC_CLEARH_BIT(REG, BIT) \
232
+ do { \
233
+ uint16_t val; \
234
+ do { \
235
+ val = __LDREXH((__IO uint16_t *)&(REG)) & ~(BIT); \
236
+ } while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
237
+ } while(0)
238
+
239
+ /* Atomic 16-bit register access macro to clear and set one or several bits */
240
+ #define ATOMIC_MODIFYH_REG(REG, CLEARMSK, SETMASK) \
241
+ do { \
242
+ uint16_t val; \
243
+ do { \
244
+ val = (__LDREXH((__IO uint16_t *)&(REG)) & ~(CLEARMSK)) | (SETMASK); \
245
+ } while ((__STREXH(val,(__IO uint16_t *)&(REG))) != 0U); \
246
+ } while(0)
247
+
248
+
249
+ /**
250
+ * @}
251
+ */
252
+
253
+ #if defined (USE_HAL_DRIVER)
254
+ #include "stm32f1xx_hal.h"
255
+ #endif /* USE_HAL_DRIVER */
256
+
257
+
258
+ #ifdef __cplusplus
259
+ }
260
+ #endif /* __cplusplus */
261
+
262
+ #endif /* __STM32F1xx_H */
263
+ /**
264
+ * @}
265
+ */
266
+
267
+ /**
268
+ * @}
269
+ */
270
+
271
+
272
+
273
+
@@ -0,0 +1,96 @@
1
+ /**
2
+ ******************************************************************************
3
+ * @file system_stm32f1xx.h
4
+ * @author MCD Application Team
5
+ * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
6
+ ******************************************************************************
7
+ * @attention
8
+ *
9
+ * Copyright (c) 2017-2021 STMicroelectronics.
10
+ * All rights reserved.
11
+ *
12
+ * This software is licensed under terms that can be found in the LICENSE file
13
+ * in the root directory of this software component.
14
+ * If no LICENSE file comes with this software, it is provided AS-IS.
15
+ *
16
+ ******************************************************************************
17
+ */
18
+
19
+ /** @addtogroup CMSIS
20
+ * @{
21
+ */
22
+
23
+ /** @addtogroup stm32f10x_system
24
+ * @{
25
+ */
26
+
27
+ /**
28
+ * @brief Define to prevent recursive inclusion
29
+ */
30
+ #ifndef __SYSTEM_STM32F10X_H
31
+ #define __SYSTEM_STM32F10X_H
32
+
33
+ #ifdef __cplusplus
34
+ extern "C" {
35
+ #endif
36
+
37
+ /** @addtogroup STM32F10x_System_Includes
38
+ * @{
39
+ */
40
+
41
+ /**
42
+ * @}
43
+ */
44
+
45
+
46
+ /** @addtogroup STM32F10x_System_Exported_types
47
+ * @{
48
+ */
49
+
50
+ extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
51
+ extern const uint8_t AHBPrescTable[16U]; /*!< AHB prescalers table values */
52
+ extern const uint8_t APBPrescTable[8U]; /*!< APB prescalers table values */
53
+
54
+ /**
55
+ * @}
56
+ */
57
+
58
+ /** @addtogroup STM32F10x_System_Exported_Constants
59
+ * @{
60
+ */
61
+
62
+ /**
63
+ * @}
64
+ */
65
+
66
+ /** @addtogroup STM32F10x_System_Exported_Macros
67
+ * @{
68
+ */
69
+
70
+ /**
71
+ * @}
72
+ */
73
+
74
+ /** @addtogroup STM32F10x_System_Exported_Functions
75
+ * @{
76
+ */
77
+
78
+ extern void SystemInit(void);
79
+ extern void SystemCoreClockUpdate(void);
80
+ /**
81
+ * @}
82
+ */
83
+
84
+ #ifdef __cplusplus
85
+ }
86
+ #endif
87
+
88
+ #endif /*__SYSTEM_STM32F10X_H */
89
+
90
+ /**
91
+ * @}
92
+ */
93
+
94
+ /**
95
+ * @}
96
+ */
@@ -0,0 +1,82 @@
1
+ #MicroXplorer Configuration settings - do not modify
2
+ CAD.formats=
3
+ CAD.pinconfig=
4
+ CAD.provider=
5
+ File.Version=6
6
+ KeepUserPlacement=true
7
+ Mcu.CPN=STM32C031C6T6
8
+ Mcu.Family=STM32C0
9
+ Mcu.IP0=CORTEX_M0+
10
+ Mcu.IP1=NVIC
11
+ Mcu.IP2=RCC
12
+ Mcu.IPNb=3
13
+ Mcu.Name=STM32C031C(4-6)Tx
14
+ Mcu.Package=LQFP48
15
+ Mcu.PinsNb=0
16
+ Mcu.ThirdPartyNb=0
17
+ Mcu.UserConstants=
18
+ Mcu.UserName=STM32C031C6Tx
19
+ MxCube.Version=6.15.0
20
+ MxDb.Version=DB.6.0.150
21
+ NVIC.ForceEnableDMAVector=true
22
+ NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
23
+ NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
24
+ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
25
+ NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
26
+ NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:false
27
+ PinOutPanel.RotationAngle=0
28
+ ProjectManager.AskForMigrate=true
29
+ ProjectManager.BackupPrevious=false
30
+ ProjectManager.CompilerLinker=GCC
31
+ ProjectManager.CompilerOptimize=6
32
+ ProjectManager.ComputerToolchain=false
33
+ ProjectManager.CoupleFile=false
34
+ ProjectManager.CustomerFirmwarePackage=
35
+ ProjectManager.DefaultFWLocation=true
36
+ ProjectManager.DeletePrevious=true
37
+ ProjectManager.DeviceId=STM32C031C6Tx
38
+ ProjectManager.FirmwarePackage=STM32Cube FW_C0 V1.4.1
39
+ ProjectManager.FreePins=false
40
+ ProjectManager.HalAssertFull=false
41
+ ProjectManager.HeapSize=0x200
42
+ ProjectManager.KeepUserCode=true
43
+ ProjectManager.LastFirmware=true
44
+ ProjectManager.LibraryCopy=0
45
+ ProjectManager.MainLocation=Src
46
+ ProjectManager.NoMain=false
47
+ ProjectManager.PreviousToolchain=
48
+ ProjectManager.ProjectBuild=false
49
+ ProjectManager.ProjectFileName=demo.ioc
50
+ ProjectManager.ProjectName=__PROJECT_NAME__
51
+ ProjectManager.ProjectStructure=
52
+ ProjectManager.RegisterCallBack=
53
+ ProjectManager.StackSize=0x400
54
+ ProjectManager.TargetToolchain=CMake
55
+ ProjectManager.ToolChainLocation=
56
+ ProjectManager.UAScriptAfterPath=
57
+ ProjectManager.UAScriptBeforePath=
58
+ ProjectManager.UnderRoot=false
59
+ ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,0-MX_CORTEX_M0+_Init-CORTEX_M0+-false-HAL-true
60
+ RCC.ADCFreq_Value=12000000
61
+ RCC.AHBFreq_Value=12000000
62
+ RCC.APBFreq_Value=12000000
63
+ RCC.APBTimFreq_Value=12000000
64
+ RCC.CortexFreq_Value=12000000
65
+ RCC.EXTERNAL_CLOCK_VALUE=12288000
66
+ RCC.FCLKCortexFreq_Value=12000000
67
+ RCC.FamilyName=M
68
+ RCC.HCLKFreq_Value=12000000
69
+ RCC.HSE_VALUE=8000000
70
+ RCC.HSI_VALUE=48000000
71
+ RCC.I2C1Freq_Value=12000000
72
+ RCC.I2S1Freq_Value=12000000
73
+ RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APBFreq_Value,APBTimFreq_Value,CortexFreq_Value,EXTERNAL_CLOCK_VALUE,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2S1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,PWRFreq_Value,SYSCLKFreq_VALUE,USART1Freq_Value
74
+ RCC.LSCOPinFreq_Value=32000
75
+ RCC.LSE_VALUE=32768
76
+ RCC.LSI_VALUE=32000
77
+ RCC.MCO1PinFreq_Value=12000000
78
+ RCC.MCO2PinFreq_Value=12000000
79
+ RCC.PWRFreq_Value=12000000
80
+ RCC.SYSCLKFreq_VALUE=12000000
81
+ RCC.USART1Freq_Value=12000000
82
+ board=custom
@@ -0,0 +1,71 @@
1
+ #MicroXplorer Configuration settings - do not modify
2
+ CAD.formats=
3
+ CAD.pinconfig=
4
+ CAD.provider=
5
+ File.Version=6
6
+ KeepUserPlacement=true
7
+ Mcu.CPN=STM32F030C8T6
8
+ Mcu.Family=STM32F0
9
+ Mcu.IP0=NVIC
10
+ Mcu.IP1=RCC
11
+ Mcu.IP2=SYS
12
+ Mcu.IPNb=3
13
+ Mcu.Name=STM32F030C8Tx
14
+ Mcu.Package=LQFP48
15
+ Mcu.Pin0=PA13
16
+ Mcu.Pin1=PA14
17
+ Mcu.PinsNb=2
18
+ Mcu.ThirdPartyNb=0
19
+ Mcu.UserConstants=
20
+ Mcu.UserName=STM32F030C8Tx
21
+ MxCube.Version=6.15.0
22
+ MxDb.Version=DB.6.0.150
23
+ NVIC.ForceEnableDMAVector=true
24
+ NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
25
+ NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
26
+ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
27
+ NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
28
+ NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:false
29
+ PA13.Mode=Serial_Wire
30
+ PA13.Signal=SYS_SWDIO
31
+ PA14.Mode=Serial_Wire
32
+ PA14.Signal=SYS_SWCLK
33
+ PinOutPanel.RotationAngle=0
34
+ ProjectManager.AskForMigrate=true
35
+ ProjectManager.BackupPrevious=false
36
+ ProjectManager.CompilerLinker=GCC
37
+ ProjectManager.CompilerOptimize=6
38
+ ProjectManager.ComputerToolchain=false
39
+ ProjectManager.CoupleFile=false
40
+ ProjectManager.CustomerFirmwarePackage=
41
+ ProjectManager.DefaultFWLocation=true
42
+ ProjectManager.DeletePrevious=true
43
+ ProjectManager.DeviceId=STM32F030C8Tx
44
+ ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.6
45
+ ProjectManager.FreePins=false
46
+ ProjectManager.HalAssertFull=false
47
+ ProjectManager.HeapSize=0x200
48
+ ProjectManager.KeepUserCode=true
49
+ ProjectManager.LastFirmware=true
50
+ ProjectManager.LibraryCopy=0
51
+ ProjectManager.MainLocation=Src
52
+ ProjectManager.NoMain=false
53
+ ProjectManager.PreviousToolchain=
54
+ ProjectManager.ProjectBuild=false
55
+ ProjectManager.ProjectFileName=demo.ioc
56
+ ProjectManager.ProjectName=__PROJECT_NAME__
57
+ ProjectManager.ProjectStructure=
58
+ ProjectManager.RegisterCallBack=
59
+ ProjectManager.StackSize=0x400
60
+ ProjectManager.TargetToolchain=CMake
61
+ ProjectManager.ToolChainLocation=
62
+ ProjectManager.UAScriptAfterPath=
63
+ ProjectManager.UAScriptBeforePath=
64
+ ProjectManager.UnderRoot=false
65
+ ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true
66
+ RCC.FamilyName=M
67
+ RCC.IPParameters=FamilyName,PLLCLKFreq_Value,PLLMCOFreq_Value,TimSysFreq_Value
68
+ RCC.PLLCLKFreq_Value=8000000
69
+ RCC.PLLMCOFreq_Value=4000000
70
+ RCC.TimSysFreq_Value=8000000
71
+ board=custom
@@ -0,0 +1,91 @@
1
+ #MicroXplorer Configuration settings - do not modify
2
+ CAD.formats=
3
+ CAD.pinconfig=
4
+ CAD.provider=
5
+ File.Version=6
6
+ KeepUserPlacement=true
7
+ Mcu.CPN=STM32F207ZGT6
8
+ Mcu.Family=STM32F2
9
+ Mcu.IP0=NVIC
10
+ Mcu.IP1=RCC
11
+ Mcu.IP2=SYS
12
+ Mcu.IPNb=3
13
+ Mcu.Name=STM32F207Z(C-E-F-G)Tx
14
+ Mcu.Package=LQFP144
15
+ Mcu.Pin0=PA13
16
+ Mcu.Pin1=PA14
17
+ Mcu.PinsNb=2
18
+ Mcu.ThirdPartyNb=0
19
+ Mcu.UserConstants=
20
+ Mcu.UserName=STM32F207ZGTx
21
+ MxCube.Version=6.15.0
22
+ MxDb.Version=DB.6.0.150
23
+ NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
24
+ NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
25
+ NVIC.ForceEnableDMAVector=true
26
+ NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
27
+ NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
28
+ NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
29
+ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
30
+ NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
31
+ NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
32
+ NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false
33
+ NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
34
+ PA13.Mode=Serial_Wire
35
+ PA13.Signal=SYS_JTMS-SWDIO
36
+ PA14.Mode=Serial_Wire
37
+ PA14.Signal=SYS_JTCK-SWCLK
38
+ PinOutPanel.RotationAngle=0
39
+ ProjectManager.AskForMigrate=true
40
+ ProjectManager.BackupPrevious=false
41
+ ProjectManager.CompilerLinker=GCC
42
+ ProjectManager.CompilerOptimize=6
43
+ ProjectManager.ComputerToolchain=false
44
+ ProjectManager.CoupleFile=false
45
+ ProjectManager.CustomerFirmwarePackage=
46
+ ProjectManager.DefaultFWLocation=true
47
+ ProjectManager.DeletePrevious=true
48
+ ProjectManager.DeviceId=STM32F207ZGTx
49
+ ProjectManager.FirmwarePackage=STM32Cube FW_F2 V1.9.6
50
+ ProjectManager.FreePins=false
51
+ ProjectManager.HalAssertFull=false
52
+ ProjectManager.HeapSize=0x200
53
+ ProjectManager.KeepUserCode=true
54
+ ProjectManager.LastFirmware=true
55
+ ProjectManager.LibraryCopy=0
56
+ ProjectManager.MainLocation=Src
57
+ ProjectManager.NoMain=false
58
+ ProjectManager.PreviousToolchain=
59
+ ProjectManager.ProjectBuild=false
60
+ ProjectManager.ProjectFileName=demo.ioc
61
+ ProjectManager.ProjectName=__PROJECT_NAME__
62
+ ProjectManager.ProjectStructure=
63
+ ProjectManager.RegisterCallBack=
64
+ ProjectManager.StackSize=0x400
65
+ ProjectManager.TargetToolchain=CMake
66
+ ProjectManager.ToolChainLocation=
67
+ ProjectManager.UAScriptAfterPath=
68
+ ProjectManager.UAScriptBeforePath=
69
+ ProjectManager.UnderRoot=false
70
+ ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true
71
+ RCC.48MHZClocksFreq_Value=48000000
72
+ RCC.AHBFreq_Value=16000000
73
+ RCC.APB1Freq_Value=16000000
74
+ RCC.APB2Freq_Value=16000000
75
+ RCC.CortexFreq_Value=16000000
76
+ RCC.FamilyName=M
77
+ RCC.HSE_VALUE=25000000
78
+ RCC.HSI_VALUE=16000000
79
+ RCC.I2SClocksFreq_Value=96000000
80
+ RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1Freq_Value,APB2Freq_Value,CortexFreq_Value,FamilyName,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S
81
+ RCC.LSE_VALUE=32768
82
+ RCC.LSI_VALUE=32000
83
+ RCC.PLLCLKFreq_Value=96000000
84
+ RCC.RTCFreq_Value=32000
85
+ RCC.RTCHSEDivFreq_Value=12500000
86
+ RCC.SYSCLKFreq_VALUE=16000000
87
+ RCC.VCOI2SOutputFreq_Value=192000000
88
+ RCC.VCOInputFreq_Value=1000000
89
+ RCC.VCOOutputFreq_Value=192000000
90
+ RCC.VcooutputI2S=96000000
91
+ board=custom