dsh-stm32 0.1.3 → 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 (221) hide show
  1. package/README.md +52 -38
  2. package/README_EN.md +44 -33
  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 +37 -35
  133. package/lib/data/chips.js +3 -3
  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 +239 -18
  137. package/lib/data/db-presets.js +252 -0
  138. package/lib/data/device-facts.js +99 -26
  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 +15 -14
  148. package/lib/data/svd.js +32 -16
  149. package/lib/data/toolchain-config.js +0 -14
  150. package/lib/engine/assets.js +191 -456
  151. package/lib/engine/breakpoints.js +66 -11
  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 +423 -17
  161. package/lib/engine/debug.js +25 -6
  162. package/lib/engine/doctor.js +160 -17
  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 +290 -21
  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 +1244 -60
  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 +25 -6
  177. package/lib/engine/probe-session.js +50 -14
  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 +101 -40
  183. package/lib/engine/regs.js +41 -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 +188 -30
  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 +4 -2
  192. package/lib/skill/stm32-workflow.js +2 -2
  193. package/lib/tools/assets.js +39 -108
  194. package/lib/tools/cache.js +2 -2
  195. package/lib/tools/debug-session.js +2 -2
  196. package/lib/tools/doctor.js +55 -5
  197. package/lib/tools/firmware-install.js +31 -6
  198. package/lib/tools/flash.js +32 -4
  199. package/lib/tools/generate.js +22 -0
  200. package/lib/tools/ioc-inspect.js +1 -1
  201. package/lib/tools/ioc-plan.js +56 -2
  202. package/lib/tools/ioc-verify.js +237 -0
  203. package/lib/tools/project-create.js +41 -5
  204. package/lib/tools/regs.js +8 -8
  205. package/lib/tools/route-plan.js +1 -1
  206. package/lib/tools/rtt.js +157 -34
  207. package/lib/tools/watch.js +256 -0
  208. package/package.json +5 -4
  209. package/templates/openocd/stm32c0x.cfg +83 -0
  210. package/templates/openocd/stm32u0x.cfg +64 -0
  211. package/templates/register/CMakeLists.txt +2 -2
  212. package/templates/register/Core/Inc/rtt.h +37 -2
  213. package/templates/register/Core/Src/main.c +17 -25
  214. package/templates/register/Core/Src/rtt.c +85 -9
  215. package/templates/scaffold/RTT.md +6 -2
  216. package/templates/scaffold/STM32F103XX_FLASH.ld +3 -0
  217. package/templates/scaffold/openocd.cfg +5 -3
  218. package/templates/scaffold/vscode/launch.json +8 -4
  219. package/docs/development-notes.md +0 -2487
  220. package/docs/dsh-stm32-plugin-/350/247/204/346/240/274.md +0 -673
  221. package/docs/logic-audit.md +0 -607
@@ -0,0 +1,322 @@
1
+ /**
2
+ *************** (C) COPYRIGHT 2017 STMicroelectronics ************************
3
+ * @file startup_stm32f101x6.s
4
+ * @author MCD Application Team
5
+ * @brief STM32F101x6 Devices vector table for Atollic toolchain.
6
+ * This module performs:
7
+ * - Set the initial SP
8
+ * - Set the initial PC == Reset_Handler,
9
+ * - Set the vector table entries with the exceptions ISR address
10
+ * - Configure the clock system
11
+ * - Branches to main in the C library (which eventually
12
+ * calls main()).
13
+ * After Reset the Cortex-M3 processor is in Thread mode,
14
+ * priority is Privileged, and the Stack is set to Main.
15
+ ******************************************************************************
16
+ * @attention
17
+ *
18
+ * Copyright (c) 2017-2021 STMicroelectronics.
19
+ * All rights reserved.
20
+ *
21
+ * This software is licensed under terms that can be found in the LICENSE file
22
+ * in the root directory of this software component.
23
+ * If no LICENSE file comes with this software, it is provided AS-IS.
24
+ *
25
+ ******************************************************************************
26
+ */
27
+
28
+ .syntax unified
29
+ .cpu cortex-m3
30
+ .fpu softvfp
31
+ .thumb
32
+
33
+ .global g_pfnVectors
34
+ .global Default_Handler
35
+
36
+ /* start address for the initialization values of the .data section.
37
+ defined in linker script */
38
+ .word _sidata
39
+ /* start address for the .data section. defined in linker script */
40
+ .word _sdata
41
+ /* end address for the .data section. defined in linker script */
42
+ .word _edata
43
+ /* start address for the .bss section. defined in linker script */
44
+ .word _sbss
45
+ /* end address for the .bss section. defined in linker script */
46
+ .word _ebss
47
+
48
+ .equ BootRAM, 0xF108F85F
49
+ /**
50
+ * @brief This is the code that gets called when the processor first
51
+ * starts execution following a reset event. Only the absolutely
52
+ * necessary set is performed, after which the application
53
+ * supplied main() routine is called.
54
+ * @param None
55
+ * @retval : None
56
+ */
57
+
58
+ .section .text.Reset_Handler
59
+ .weak Reset_Handler
60
+ .type Reset_Handler, %function
61
+ Reset_Handler:
62
+
63
+ /* Call the clock system initialization function.*/
64
+ bl SystemInit
65
+
66
+ /* Copy the data segment initializers from flash to SRAM */
67
+ ldr r0, =_sdata
68
+ ldr r1, =_edata
69
+ ldr r2, =_sidata
70
+ movs r3, #0
71
+ b LoopCopyDataInit
72
+
73
+ CopyDataInit:
74
+ ldr r4, [r2, r3]
75
+ str r4, [r0, r3]
76
+ adds r3, r3, #4
77
+
78
+ LoopCopyDataInit:
79
+ adds r4, r0, r3
80
+ cmp r4, r1
81
+ bcc CopyDataInit
82
+
83
+ /* Zero fill the bss segment. */
84
+ ldr r2, =_sbss
85
+ ldr r4, =_ebss
86
+ movs r3, #0
87
+ b LoopFillZerobss
88
+
89
+ FillZerobss:
90
+ str r3, [r2]
91
+ adds r2, r2, #4
92
+
93
+ LoopFillZerobss:
94
+ cmp r2, r4
95
+ bcc FillZerobss
96
+
97
+ /* Call static constructors */
98
+ bl __libc_init_array
99
+ /* Call the application's entry point.*/
100
+ bl main
101
+ bx lr
102
+ .size Reset_Handler, .-Reset_Handler
103
+
104
+ /**
105
+ * @brief This is the code that gets called when the processor receives an
106
+ * unexpected interrupt. This simply enters an infinite loop, preserving
107
+ * the system state for examination by a debugger.
108
+ *
109
+ * @param None
110
+ * @retval : None
111
+ */
112
+ .section .text.Default_Handler,"ax",%progbits
113
+ Default_Handler:
114
+ Infinite_Loop:
115
+ b Infinite_Loop
116
+ .size Default_Handler, .-Default_Handler
117
+ /******************************************************************************
118
+ *
119
+ * The minimal vector table for a Cortex M3. Note that the proper constructs
120
+ * must be placed on this to ensure that it ends up at physical address
121
+ * 0x0000.0000.
122
+ *
123
+ ******************************************************************************/
124
+ .section .isr_vector,"a",%progbits
125
+ .type g_pfnVectors, %object
126
+ .size g_pfnVectors, .-g_pfnVectors
127
+
128
+
129
+ g_pfnVectors:
130
+
131
+
132
+ .word _estack
133
+ .word Reset_Handler
134
+ .word NMI_Handler
135
+ .word HardFault_Handler
136
+ .word MemManage_Handler
137
+ .word BusFault_Handler
138
+ .word UsageFault_Handler
139
+ .word 0
140
+ .word 0
141
+ .word 0
142
+ .word 0
143
+ .word SVC_Handler
144
+ .word DebugMon_Handler
145
+ .word 0
146
+ .word PendSV_Handler
147
+ .word SysTick_Handler
148
+ .word WWDG_IRQHandler
149
+ .word PVD_IRQHandler
150
+ .word TAMPER_IRQHandler
151
+ .word RTC_IRQHandler
152
+ .word FLASH_IRQHandler
153
+ .word RCC_IRQHandler
154
+ .word EXTI0_IRQHandler
155
+ .word EXTI1_IRQHandler
156
+ .word EXTI2_IRQHandler
157
+ .word EXTI3_IRQHandler
158
+ .word EXTI4_IRQHandler
159
+ .word DMA1_Channel1_IRQHandler
160
+ .word DMA1_Channel2_IRQHandler
161
+ .word DMA1_Channel3_IRQHandler
162
+ .word DMA1_Channel4_IRQHandler
163
+ .word DMA1_Channel5_IRQHandler
164
+ .word DMA1_Channel6_IRQHandler
165
+ .word DMA1_Channel7_IRQHandler
166
+ .word ADC1_IRQHandler
167
+ .word 0
168
+ .word 0
169
+ .word 0
170
+ .word 0
171
+ .word EXTI9_5_IRQHandler
172
+ .word 0
173
+ .word 0
174
+ .word 0
175
+ .word 0
176
+ .word TIM2_IRQHandler
177
+ .word TIM3_IRQHandler
178
+ .word 0
179
+ .word I2C1_EV_IRQHandler
180
+ .word I2C1_ER_IRQHandler
181
+ .word 0
182
+ .word 0
183
+ .word SPI1_IRQHandler
184
+ .word 0
185
+ .word USART1_IRQHandler
186
+ .word USART2_IRQHandler
187
+ .word 0
188
+ .word EXTI15_10_IRQHandler
189
+ .word RTC_Alarm_IRQHandler
190
+ .word 0
191
+ .word 0
192
+ .word 0
193
+ .word 0
194
+ .word 0
195
+ .word 0
196
+ .word 0
197
+ .word 0
198
+ .word BootRAM /* @0x108. This is for boot in RAM mode for
199
+ STM32F10x Low Density devices.*/
200
+
201
+ /*******************************************************************************
202
+ *
203
+ * Provide weak aliases for each Exception handler to the Default_Handler.
204
+ * As they are weak aliases, any function with the same name will override
205
+ * this definition.
206
+ *
207
+ *******************************************************************************/
208
+
209
+ .weak NMI_Handler
210
+ .thumb_set NMI_Handler,Default_Handler
211
+
212
+ .weak HardFault_Handler
213
+ .thumb_set HardFault_Handler,Default_Handler
214
+
215
+ .weak MemManage_Handler
216
+ .thumb_set MemManage_Handler,Default_Handler
217
+
218
+ .weak BusFault_Handler
219
+ .thumb_set BusFault_Handler,Default_Handler
220
+
221
+ .weak UsageFault_Handler
222
+ .thumb_set UsageFault_Handler,Default_Handler
223
+
224
+ .weak SVC_Handler
225
+ .thumb_set SVC_Handler,Default_Handler
226
+
227
+ .weak DebugMon_Handler
228
+ .thumb_set DebugMon_Handler,Default_Handler
229
+
230
+ .weak PendSV_Handler
231
+ .thumb_set PendSV_Handler,Default_Handler
232
+
233
+ .weak SysTick_Handler
234
+ .thumb_set SysTick_Handler,Default_Handler
235
+
236
+ .weak WWDG_IRQHandler
237
+ .thumb_set WWDG_IRQHandler,Default_Handler
238
+
239
+ .weak PVD_IRQHandler
240
+ .thumb_set PVD_IRQHandler,Default_Handler
241
+
242
+ .weak TAMPER_IRQHandler
243
+ .thumb_set TAMPER_IRQHandler,Default_Handler
244
+
245
+ .weak RTC_IRQHandler
246
+ .thumb_set RTC_IRQHandler,Default_Handler
247
+
248
+ .weak FLASH_IRQHandler
249
+ .thumb_set FLASH_IRQHandler,Default_Handler
250
+
251
+ .weak RCC_IRQHandler
252
+ .thumb_set RCC_IRQHandler,Default_Handler
253
+
254
+ .weak EXTI0_IRQHandler
255
+ .thumb_set EXTI0_IRQHandler,Default_Handler
256
+
257
+ .weak EXTI1_IRQHandler
258
+ .thumb_set EXTI1_IRQHandler,Default_Handler
259
+
260
+ .weak EXTI2_IRQHandler
261
+ .thumb_set EXTI2_IRQHandler,Default_Handler
262
+
263
+ .weak EXTI3_IRQHandler
264
+ .thumb_set EXTI3_IRQHandler,Default_Handler
265
+
266
+ .weak EXTI4_IRQHandler
267
+ .thumb_set EXTI4_IRQHandler,Default_Handler
268
+
269
+ .weak DMA1_Channel1_IRQHandler
270
+ .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
271
+
272
+ .weak DMA1_Channel2_IRQHandler
273
+ .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
274
+
275
+ .weak DMA1_Channel3_IRQHandler
276
+ .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
277
+
278
+ .weak DMA1_Channel4_IRQHandler
279
+ .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
280
+
281
+ .weak DMA1_Channel5_IRQHandler
282
+ .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
283
+
284
+ .weak DMA1_Channel6_IRQHandler
285
+ .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
286
+
287
+ .weak DMA1_Channel7_IRQHandler
288
+ .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
289
+
290
+ .weak ADC1_IRQHandler
291
+ .thumb_set ADC1_IRQHandler,Default_Handler
292
+
293
+ .weak EXTI9_5_IRQHandler
294
+ .thumb_set EXTI9_5_IRQHandler,Default_Handler
295
+
296
+ .weak TIM2_IRQHandler
297
+ .thumb_set TIM2_IRQHandler,Default_Handler
298
+
299
+ .weak TIM3_IRQHandler
300
+ .thumb_set TIM3_IRQHandler,Default_Handler
301
+
302
+ .weak I2C1_EV_IRQHandler
303
+ .thumb_set I2C1_EV_IRQHandler,Default_Handler
304
+
305
+ .weak I2C1_ER_IRQHandler
306
+ .thumb_set I2C1_ER_IRQHandler,Default_Handler
307
+
308
+ .weak SPI1_IRQHandler
309
+ .thumb_set SPI1_IRQHandler,Default_Handler
310
+
311
+ .weak USART1_IRQHandler
312
+ .thumb_set USART1_IRQHandler,Default_Handler
313
+
314
+ .weak USART2_IRQHandler
315
+ .thumb_set USART2_IRQHandler,Default_Handler
316
+
317
+ .weak EXTI15_10_IRQHandler
318
+ .thumb_set EXTI15_10_IRQHandler,Default_Handler
319
+
320
+ .weak RTC_Alarm_IRQHandler
321
+ .thumb_set RTC_Alarm_IRQHandler,Default_Handler
322
+
@@ -0,0 +1,338 @@
1
+ /**
2
+ *************** (C) COPYRIGHT 2017 STMicroelectronics ************************
3
+ * @file startup_stm32f101xb.s
4
+ * @author MCD Application Team
5
+ * @brief STM32F101xB Devices vector table for Atollic toolchain.
6
+ * This module performs:
7
+ * - Set the initial SP
8
+ * - Set the initial PC == Reset_Handler,
9
+ * - Set the vector table entries with the exceptions ISR address
10
+ * - Configure the clock system
11
+ * - Branches to main in the C library (which eventually
12
+ * calls main()).
13
+ * After Reset the Cortex-M3 processor is in Thread mode,
14
+ * priority is Privileged, and the Stack is set to Main.
15
+ ******************************************************************************
16
+ * @attention
17
+ *
18
+ * Copyright (c) 2017-2021 STMicroelectronics.
19
+ * All rights reserved.
20
+ *
21
+ * This software is licensed under terms that can be found in the LICENSE file
22
+ * in the root directory of this software component.
23
+ * If no LICENSE file comes with this software, it is provided AS-IS.
24
+ *
25
+ ******************************************************************************
26
+ */
27
+
28
+ .syntax unified
29
+ .cpu cortex-m3
30
+ .fpu softvfp
31
+ .thumb
32
+
33
+ .global g_pfnVectors
34
+ .global Default_Handler
35
+
36
+ /* start address for the initialization values of the .data section.
37
+ defined in linker script */
38
+ .word _sidata
39
+ /* start address for the .data section. defined in linker script */
40
+ .word _sdata
41
+ /* end address for the .data section. defined in linker script */
42
+ .word _edata
43
+ /* start address for the .bss section. defined in linker script */
44
+ .word _sbss
45
+ /* end address for the .bss section. defined in linker script */
46
+ .word _ebss
47
+
48
+ .equ BootRAM, 0xF108F85F
49
+ /**
50
+ * @brief This is the code that gets called when the processor first
51
+ * starts execution following a reset event. Only the absolutely
52
+ * necessary set is performed, after which the application
53
+ * supplied main() routine is called.
54
+ * @param None
55
+ * @retval : None
56
+ */
57
+
58
+ .section .text.Reset_Handler
59
+ .weak Reset_Handler
60
+ .type Reset_Handler, %function
61
+ Reset_Handler:
62
+
63
+ /* Call the clock system initialization function.*/
64
+ bl SystemInit
65
+
66
+ /* Copy the data segment initializers from flash to SRAM */
67
+ ldr r0, =_sdata
68
+ ldr r1, =_edata
69
+ ldr r2, =_sidata
70
+ movs r3, #0
71
+ b LoopCopyDataInit
72
+
73
+ CopyDataInit:
74
+ ldr r4, [r2, r3]
75
+ str r4, [r0, r3]
76
+ adds r3, r3, #4
77
+
78
+ LoopCopyDataInit:
79
+ adds r4, r0, r3
80
+ cmp r4, r1
81
+ bcc CopyDataInit
82
+
83
+ /* Zero fill the bss segment. */
84
+ ldr r2, =_sbss
85
+ ldr r4, =_ebss
86
+ movs r3, #0
87
+ b LoopFillZerobss
88
+
89
+ FillZerobss:
90
+ str r3, [r2]
91
+ adds r2, r2, #4
92
+
93
+ LoopFillZerobss:
94
+ cmp r2, r4
95
+ bcc FillZerobss
96
+
97
+ /* Call static constructors */
98
+ bl __libc_init_array
99
+ /* Call the application's entry point.*/
100
+ bl main
101
+ bx lr
102
+ .size Reset_Handler, .-Reset_Handler
103
+
104
+ /**
105
+ * @brief This is the code that gets called when the processor receives an
106
+ * unexpected interrupt. This simply enters an infinite loop, preserving
107
+ * the system state for examination by a debugger.
108
+ *
109
+ * @param None
110
+ * @retval : None
111
+ */
112
+ .section .text.Default_Handler,"ax",%progbits
113
+ Default_Handler:
114
+ Infinite_Loop:
115
+ b Infinite_Loop
116
+ .size Default_Handler, .-Default_Handler
117
+ /******************************************************************************
118
+ *
119
+ * The minimal vector table for a Cortex M3. Note that the proper constructs
120
+ * must be placed on this to ensure that it ends up at physical address
121
+ * 0x0000.0000.
122
+ *
123
+ ******************************************************************************/
124
+ .section .isr_vector,"a",%progbits
125
+ .type g_pfnVectors, %object
126
+ .size g_pfnVectors, .-g_pfnVectors
127
+
128
+
129
+ g_pfnVectors:
130
+
131
+ .word _estack
132
+ .word Reset_Handler
133
+ .word NMI_Handler
134
+ .word HardFault_Handler
135
+ .word MemManage_Handler
136
+ .word BusFault_Handler
137
+ .word UsageFault_Handler
138
+ .word 0
139
+ .word 0
140
+ .word 0
141
+ .word 0
142
+ .word SVC_Handler
143
+ .word DebugMon_Handler
144
+ .word 0
145
+ .word PendSV_Handler
146
+ .word SysTick_Handler
147
+ .word WWDG_IRQHandler
148
+ .word PVD_IRQHandler
149
+ .word TAMPER_IRQHandler
150
+ .word RTC_IRQHandler
151
+ .word FLASH_IRQHandler
152
+ .word RCC_IRQHandler
153
+ .word EXTI0_IRQHandler
154
+ .word EXTI1_IRQHandler
155
+ .word EXTI2_IRQHandler
156
+ .word EXTI3_IRQHandler
157
+ .word EXTI4_IRQHandler
158
+ .word DMA1_Channel1_IRQHandler
159
+ .word DMA1_Channel2_IRQHandler
160
+ .word DMA1_Channel3_IRQHandler
161
+ .word DMA1_Channel4_IRQHandler
162
+ .word DMA1_Channel5_IRQHandler
163
+ .word DMA1_Channel6_IRQHandler
164
+ .word DMA1_Channel7_IRQHandler
165
+ .word ADC1_IRQHandler
166
+ .word 0
167
+ .word 0
168
+ .word 0
169
+ .word 0
170
+ .word EXTI9_5_IRQHandler
171
+ .word 0
172
+ .word 0
173
+ .word 0
174
+ .word 0
175
+ .word TIM2_IRQHandler
176
+ .word TIM3_IRQHandler
177
+ .word TIM4_IRQHandler
178
+ .word I2C1_EV_IRQHandler
179
+ .word I2C1_ER_IRQHandler
180
+ .word I2C2_EV_IRQHandler
181
+ .word I2C2_ER_IRQHandler
182
+ .word SPI1_IRQHandler
183
+ .word SPI2_IRQHandler
184
+ .word USART1_IRQHandler
185
+ .word USART2_IRQHandler
186
+ .word USART3_IRQHandler
187
+ .word EXTI15_10_IRQHandler
188
+ .word RTC_Alarm_IRQHandler
189
+ .word 0
190
+ .word 0
191
+ .word 0
192
+ .word 0
193
+ .word 0
194
+ .word 0
195
+ .word 0
196
+ .word 0
197
+ .word BootRAM /* @0x108. This is for boot in RAM mode for
198
+ STM32F10x Medium Density devices. */
199
+
200
+ /*******************************************************************************
201
+ *
202
+ * Provide weak aliases for each Exception handler to the Default_Handler.
203
+ * As they are weak aliases, any function with the same name will override
204
+ * this definition.
205
+ *
206
+ *******************************************************************************/
207
+
208
+ .weak NMI_Handler
209
+ .thumb_set NMI_Handler,Default_Handler
210
+
211
+ .weak HardFault_Handler
212
+ .thumb_set HardFault_Handler,Default_Handler
213
+
214
+ .weak MemManage_Handler
215
+ .thumb_set MemManage_Handler,Default_Handler
216
+
217
+ .weak BusFault_Handler
218
+ .thumb_set BusFault_Handler,Default_Handler
219
+
220
+ .weak UsageFault_Handler
221
+ .thumb_set UsageFault_Handler,Default_Handler
222
+
223
+ .weak SVC_Handler
224
+ .thumb_set SVC_Handler,Default_Handler
225
+
226
+ .weak DebugMon_Handler
227
+ .thumb_set DebugMon_Handler,Default_Handler
228
+
229
+ .weak PendSV_Handler
230
+ .thumb_set PendSV_Handler,Default_Handler
231
+
232
+ .weak SysTick_Handler
233
+ .thumb_set SysTick_Handler,Default_Handler
234
+
235
+ .weak WWDG_IRQHandler
236
+ .thumb_set WWDG_IRQHandler,Default_Handler
237
+
238
+ .weak PVD_IRQHandler
239
+ .thumb_set PVD_IRQHandler,Default_Handler
240
+
241
+ .weak TAMPER_IRQHandler
242
+ .thumb_set TAMPER_IRQHandler,Default_Handler
243
+
244
+ .weak RTC_IRQHandler
245
+ .thumb_set RTC_IRQHandler,Default_Handler
246
+
247
+ .weak FLASH_IRQHandler
248
+ .thumb_set FLASH_IRQHandler,Default_Handler
249
+
250
+ .weak RCC_IRQHandler
251
+ .thumb_set RCC_IRQHandler,Default_Handler
252
+
253
+ .weak EXTI0_IRQHandler
254
+ .thumb_set EXTI0_IRQHandler,Default_Handler
255
+
256
+ .weak EXTI1_IRQHandler
257
+ .thumb_set EXTI1_IRQHandler,Default_Handler
258
+
259
+ .weak EXTI2_IRQHandler
260
+ .thumb_set EXTI2_IRQHandler,Default_Handler
261
+
262
+ .weak EXTI3_IRQHandler
263
+ .thumb_set EXTI3_IRQHandler,Default_Handler
264
+
265
+ .weak EXTI4_IRQHandler
266
+ .thumb_set EXTI4_IRQHandler,Default_Handler
267
+
268
+ .weak DMA1_Channel1_IRQHandler
269
+ .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
270
+
271
+ .weak DMA1_Channel2_IRQHandler
272
+ .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
273
+
274
+ .weak DMA1_Channel3_IRQHandler
275
+ .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
276
+
277
+ .weak DMA1_Channel4_IRQHandler
278
+ .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
279
+
280
+ .weak DMA1_Channel5_IRQHandler
281
+ .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
282
+
283
+ .weak DMA1_Channel6_IRQHandler
284
+ .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
285
+
286
+ .weak DMA1_Channel7_IRQHandler
287
+ .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
288
+
289
+ .weak ADC1_IRQHandler
290
+ .thumb_set ADC1_IRQHandler,Default_Handler
291
+
292
+ .weak EXTI9_5_IRQHandler
293
+ .thumb_set EXTI9_5_IRQHandler,Default_Handler
294
+
295
+ .weak TIM2_IRQHandler
296
+ .thumb_set TIM2_IRQHandler,Default_Handler
297
+
298
+ .weak TIM3_IRQHandler
299
+ .thumb_set TIM3_IRQHandler,Default_Handler
300
+
301
+ .weak TIM4_IRQHandler
302
+ .thumb_set TIM4_IRQHandler,Default_Handler
303
+
304
+ .weak I2C1_EV_IRQHandler
305
+ .thumb_set I2C1_EV_IRQHandler,Default_Handler
306
+
307
+ .weak I2C1_ER_IRQHandler
308
+ .thumb_set I2C1_ER_IRQHandler,Default_Handler
309
+
310
+ .weak I2C2_EV_IRQHandler
311
+ .thumb_set I2C2_EV_IRQHandler,Default_Handler
312
+
313
+ .weak I2C2_ER_IRQHandler
314
+ .thumb_set I2C2_ER_IRQHandler,Default_Handler
315
+
316
+ .weak SPI1_IRQHandler
317
+ .thumb_set SPI1_IRQHandler,Default_Handler
318
+
319
+ .weak SPI2_IRQHandler
320
+ .thumb_set SPI2_IRQHandler,Default_Handler
321
+
322
+ .weak USART1_IRQHandler
323
+ .thumb_set USART1_IRQHandler,Default_Handler
324
+
325
+ .weak USART2_IRQHandler
326
+ .thumb_set USART2_IRQHandler,Default_Handler
327
+
328
+ .weak USART3_IRQHandler
329
+ .thumb_set USART3_IRQHandler,Default_Handler
330
+
331
+ .weak EXTI15_10_IRQHandler
332
+ .thumb_set EXTI15_10_IRQHandler,Default_Handler
333
+
334
+ .weak RTC_Alarm_IRQHandler
335
+ .thumb_set RTC_Alarm_IRQHandler,Default_Handler
336
+
337
+
338
+