1
1
/ **
2
2
******************************************************************************
3
- * @file startup_stm32l073xx .s
3
+ * @file startup_stm32l071xx .s
4
4
* @author MCD Application Team
5
- * @brief STM32L073xx Devices vector table for Atollic TrueSTUDIO toolchain.
5
+ * @brief STM32L071xx Devices vector table for GCC toolchain.
6
6
* This module performs:
7
7
* - Set the initial SP
8
8
* - Set the initial PC == Reset_Handler ,
12
12
* After Reset the Cortex - M0 + processor is in Thread mode ,
13
13
* priority is Privileged , and the Stack is set to Main.
14
14
******************************************************************************
15
- *
15
+ *
16
16
* Redistribution and use in source and binary forms , with or without modification ,
17
17
* are permitted provided th at the following conditions are met:
18
18
* 1 . Redistributions of source code must retain the above copyright notice ,
@@ -53,6 +53,10 @@ defined in linker script */
53
53
. word _sdata
54
54
/ * end address for the .data section. defined in linker script * /
55
55
. word _edata
56
+ / * start address for the .bss section. defined in linker script * /
57
+ . word _sbss
58
+ / * end address for the .bss section. defined in linker script * /
59
+ . word _ebss
56
60
57
61
. section .text.Reset_Handler
58
62
.weak Reset_Handler
@@ -77,6 +81,19 @@ LoopCopyDataInit:
77
81
adds r2 , r0 , r1
78
82
cmp r2 , r3
79
83
bcc CopyDataInit
84
+ ldr r2 , =_sbss
85
+ b LoopFillZerobss
86
+ / * Zero fill the bss segment. * /
87
+ FillZerobss:
88
+ movs r3 , # 0
89
+ str r3 , [ r2 ]
90
+ adds r2 , r2 , # 4
91
+
92
+
93
+ LoopFillZerobss:
94
+ ldr r3 , = _ebss
95
+ cmp r2 , r3
96
+ bcc FillZerobss
80
97
81
98
/ * Call the clock system intitialization function. * /
82
99
bl SystemInit
@@ -138,11 +155,11 @@ g_pfnVectors:
138
155
. word PVD_IRQHandler / * PVD through EXTI Line detection * /
139
156
. word RTC_IRQHandler / * RTC through the EXTI line * /
140
157
. word FLASH_IRQHandler / * FLASH * /
141
- . word RCC_CRS_IRQHandler / * RCC and CRS * /
158
+ . word RCC_IRQHandler / * RCC * /
142
159
. word EXTI0_1_IRQHandler / * EXTI Line 0 and 1 * /
143
160
. word EXTI2_3_IRQHandler / * EXTI Line 2 and 3 * /
144
161
. word EXTI4_15_IRQHandler / * EXTI Line 4 to 15 * /
145
- . word TSC_IRQHandler / * TSC * /
162
+ . word 0 / * Reserved * /
146
163
. word DMA1_Channel1_IRQHandler / * DMA1 Channel 1 * /
147
164
. word DMA1_Channel2_3_IRQHandler / * DMA1 Channel 2 and Channel 3 * /
148
165
. word DMA1_Channel4_5_6_7_IRQHandler / * DMA1 Channel 4 , Channel 5 , Channel 6 and Channel 7 * /
@@ -151,7 +168,7 @@ g_pfnVectors:
151
168
. word USART4_5_IRQHandler / * USART4 and USART 5 * /
152
169
. word TIM2_IRQHandler / * TIM2 * /
153
170
. word TIM3_IRQHandler / * TIM3 * /
154
- . word TIM6_DAC_IRQHandler / * TIM6 and DAC * /
171
+ . word TIM6_IRQHandler / * TIM6 and DAC * /
155
172
. word TIM7_IRQHandler / * TIM7 * /
156
173
. word 0 / * Reserved * /
157
174
. word TIM21_IRQHandler / * TIM21 * /
@@ -163,9 +180,9 @@ g_pfnVectors:
163
180
. word SPI2_IRQHandler / * SPI2 * /
164
181
. word USART1_IRQHandler / * USART1 * /
165
182
. word USART2_IRQHandler / * USART2 * /
166
- . word RNG_LPUART1_IRQHandler / * RNG and LPUART1 * /
167
- . word LCD_IRQHandler / * LCD * /
168
- . word USB_IRQHandler / * USB * /
183
+ . word LPUART1_IRQHandler / * LPUART1 * /
184
+ . word 0 / * Reserved * /
185
+ . word 0 / * Reserved * /
169
186
170
187
/ *******************************************************************************
171
188
*
@@ -202,8 +219,8 @@ g_pfnVectors:
202
219
.weak FLASH_IRQHandler
203
220
.thumb_set FLASH_IRQHandler , Default_Handler
204
221
205
- .weak RCC_CRS_IRQHandler
206
- .thumb_set RCC_CRS_IRQHandler , Default_Handler
222
+ .weak RCC_IRQHandler
223
+ .thumb_set RCC_IRQHandler , Default_Handler
207
224
208
225
.weak EXTI0_1_IRQHandler
209
226
.thumb_set EXTI0_1_IRQHandler , Default_Handler
@@ -214,9 +231,6 @@ g_pfnVectors:
214
231
.weak EXTI4_15_IRQHandler
215
232
.thumb_set EXTI4_15_IRQHandler , Default_Handler
216
233
217
- .weak TSC_IRQHandler
218
- .thumb_set TSC_IRQHandler , Default_Handler
219
-
220
234
.weak DMA1_Channel1_IRQHandler
221
235
.thumb_set DMA1_Channel1_IRQHandler , Default_Handler
222
236
@@ -241,8 +255,8 @@ g_pfnVectors:
241
255
.weak TIM3_IRQHandler
242
256
.thumb_set TIM3_IRQHandler , Default_Handler
243
257
244
- .weak TIM6_DAC_IRQHandler
245
- .thumb_set TIM6_DAC_IRQHandler , Default_Handler
258
+ .weak TIM6_IRQHandler
259
+ .thumb_set TIM6_IRQHandler , Default_Handler
246
260
247
261
.weak TIM7_IRQHandler
248
262
.thumb_set TIM7_IRQHandler , Default_Handler
@@ -274,14 +288,8 @@ g_pfnVectors:
274
288
.weak USART2_IRQHandler
275
289
.thumb_set USART2_IRQHandler , Default_Handler
276
290
277
- .weak RNG_LPUART1_IRQHandler
278
- .thumb_set RNG_LPUART1_IRQHandler , Default_Handler
279
-
280
- .weak LCD_IRQHandler
281
- .thumb_set LCD_IRQHandler , Default_Handler
282
-
283
- .weak USB_IRQHandler
284
- .thumb_set USB_IRQHandler , Default_Handler
291
+ .weak LPUART1_IRQHandler
292
+ .thumb_set LPUART1_IRQHandler , Default_Handler
285
293
286
294
287
295
0 commit comments