1 ;******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
\r
2 ;* File Name : startup_stm32l15x_lp.s
\r
3 ;* Author : MCD Application Team
\r
4 ;* Version : V1.0.0RC1
\r
6 ;* Description : STM32L15x Low Power Devices vector table for RVMDK
\r
8 ;* This module performs:
\r
9 ;* - Set the initial SP
\r
10 ;* - Set the initial PC == Reset_Handler
\r
11 ;* - Set the vector table entries with the exceptions ISR address
\r
12 ;* - Branches to __main in the C library (which eventually
\r
14 ;* After Reset the CortexM3 processor is in Thread mode,
\r
15 ;* priority is Privileged, and the Stack is set to Main.
\r
16 ;* <<< Use Configuration Wizard in Context Menu >>>
\r
17 ;*******************************************************************************
\r
18 ; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
\r
19 ; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
\r
20 ; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
\r
21 ; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
\r
22 ; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
\r
23 ; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
\r
24 ;*******************************************************************************
\r
26 ; Amount of memory (in bytes) allocated for Stack
\r
27 ; Tailor this value to your application needs
\r
28 ; <h> Stack Configuration
\r
29 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
\r
32 Stack_Size EQU 0x00000400
\r
34 AREA STACK, NOINIT, READWRITE, ALIGN=3
\r
35 Stack_Mem SPACE Stack_Size
\r
39 ; <h> Heap Configuration
\r
40 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
\r
43 Heap_Size EQU 0x00000200
\r
45 AREA HEAP, NOINIT, READWRITE, ALIGN=3
\r
47 Heap_Mem SPACE Heap_Size
\r
54 ; Vector Table Mapped to Address 0 at Reset
\r
55 AREA RESET, DATA, READONLY
\r
57 EXPORT __Vectors_End
\r
58 EXPORT __Vectors_Size
\r
60 __Vectors DCD __initial_sp ; Top of Stack
\r
61 DCD Reset_Handler ; Reset Handler
\r
62 DCD NMI_Handler ; NMI Handler
\r
63 DCD HardFault_Handler ; Hard Fault Handler
\r
64 DCD MemManage_Handler ; MPU Fault Handler
\r
65 DCD BusFault_Handler ; Bus Fault Handler
\r
66 DCD UsageFault_Handler ; Usage Fault Handler
\r
71 DCD SVC_Handler ; SVCall Handler
\r
72 DCD DebugMon_Handler ; Debug Monitor Handler
\r
74 DCD PendSV_Handler ; PendSV Handler
\r
75 DCD SysTick_Handler ; SysTick Handler
\r
77 ; External Interrupts
\r
78 DCD WWDG_IRQHandler ; Window Watchdog
\r
79 DCD PVD_IRQHandler ; PVD through EXTI Line detect
\r
80 DCD TAMPER_STAMP_IRQHandler ; Tamper and Time Stamp
\r
81 DCD RTC_WKUP_IRQHandler ; RTC Wakeup
\r
82 DCD FLASH_IRQHandler ; FLASH
\r
83 DCD RCC_IRQHandler ; RCC
\r
84 DCD EXTI0_IRQHandler ; EXTI Line 0
\r
85 DCD EXTI1_IRQHandler ; EXTI Line 1
\r
86 DCD EXTI2_IRQHandler ; EXTI Line 2
\r
87 DCD EXTI3_IRQHandler ; EXTI Line 3
\r
88 DCD EXTI4_IRQHandler ; EXTI Line 4
\r
89 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
\r
90 DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
\r
91 DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
\r
92 DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
\r
93 DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
\r
94 DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
\r
95 DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
\r
96 DCD ADC1_IRQHandler ; ADC1
\r
97 DCD USB_HP_IRQHandler ; USB High Priority
\r
98 DCD USB_LP_IRQHandler ; USB Low Priority
\r
99 DCD DAC_IRQHandler ; DAC
\r
100 DCD COMP_IRQHandler ; COMP through EXTI Line
\r
101 DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
\r
102 DCD LCD_IRQHandler ; LCD
\r
103 DCD TIM9_IRQHandler ; TIM9
\r
104 DCD TIM10_IRQHandler ; TIM10
\r
105 DCD TIM11_IRQHandler ; TIM11
\r
106 DCD TIM2_IRQHandler ; TIM2
\r
107 DCD TIM3_IRQHandler ; TIM3
\r
108 DCD TIM4_IRQHandler ; TIM4
\r
109 DCD I2C1_EV_IRQHandler ; I2C1 Event
\r
110 DCD I2C1_ER_IRQHandler ; I2C1 Error
\r
111 DCD I2C2_EV_IRQHandler ; I2C2 Event
\r
112 DCD I2C2_ER_IRQHandler ; I2C2 Error
\r
113 DCD SPI1_IRQHandler ; SPI1
\r
114 DCD SPI2_IRQHandler ; SPI2
\r
115 DCD USART1_IRQHandler ; USART1
\r
116 DCD USART2_IRQHandler ; USART2
\r
117 DCD USART3_IRQHandler ; USART3
\r
118 DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
\r
119 DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line
\r
120 DCD USB_FS_WKUP_IRQHandler ; USB FS Wakeup from suspend
\r
121 DCD TIM6_IRQHandler ; TIM6
\r
122 DCD TIM7_IRQHandler ; TIM7
\r
125 __Vectors_Size EQU __Vectors_End - __Vectors
\r
127 AREA |.text|, CODE, READONLY
\r
129 ; Reset handler routine
\r
131 EXPORT Reset_Handler [WEAK]
\r
134 LDR R0, =SystemInit
\r
140 ; Dummy Exception Handlers (infinite loops which can be modified)
\r
143 EXPORT NMI_Handler [WEAK]
\r
148 EXPORT HardFault_Handler [WEAK]
\r
153 EXPORT MemManage_Handler [WEAK]
\r
158 EXPORT BusFault_Handler [WEAK]
\r
161 UsageFault_Handler\
\r
163 EXPORT UsageFault_Handler [WEAK]
\r
167 EXPORT SVC_Handler [WEAK]
\r
172 EXPORT DebugMon_Handler [WEAK]
\r
175 PendSV_Handler PROC
\r
176 EXPORT PendSV_Handler [WEAK]
\r
179 SysTick_Handler PROC
\r
180 EXPORT SysTick_Handler [WEAK]
\r
184 Default_Handler PROC
\r
186 EXPORT WWDG_IRQHandler [WEAK]
\r
187 EXPORT PVD_IRQHandler [WEAK]
\r
188 EXPORT TAMPER_STAMP_IRQHandler [WEAK]
\r
189 EXPORT RTC_WKUP_IRQHandler [WEAK]
\r
190 EXPORT FLASH_IRQHandler [WEAK]
\r
191 EXPORT RCC_IRQHandler [WEAK]
\r
192 EXPORT EXTI0_IRQHandler [WEAK]
\r
193 EXPORT EXTI1_IRQHandler [WEAK]
\r
194 EXPORT EXTI2_IRQHandler [WEAK]
\r
195 EXPORT EXTI3_IRQHandler [WEAK]
\r
196 EXPORT EXTI4_IRQHandler [WEAK]
\r
197 EXPORT DMA1_Channel1_IRQHandler [WEAK]
\r
198 EXPORT DMA1_Channel2_IRQHandler [WEAK]
\r
199 EXPORT DMA1_Channel3_IRQHandler [WEAK]
\r
200 EXPORT DMA1_Channel4_IRQHandler [WEAK]
\r
201 EXPORT DMA1_Channel5_IRQHandler [WEAK]
\r
202 EXPORT DMA1_Channel6_IRQHandler [WEAK]
\r
203 EXPORT DMA1_Channel7_IRQHandler [WEAK]
\r
204 EXPORT ADC1_IRQHandler [WEAK]
\r
205 EXPORT USB_HP_IRQHandler [WEAK]
\r
206 EXPORT USB_LP_IRQHandler [WEAK]
\r
207 EXPORT DAC_IRQHandler [WEAK]
\r
208 EXPORT COMP_IRQHandler [WEAK]
\r
209 EXPORT EXTI9_5_IRQHandler [WEAK]
\r
210 EXPORT LCD_IRQHandler [WEAK]
\r
211 EXPORT TIM9_IRQHandler [WEAK]
\r
212 EXPORT TIM10_IRQHandler [WEAK]
\r
213 EXPORT TIM11_IRQHandler [WEAK]
\r
214 EXPORT TIM2_IRQHandler [WEAK]
\r
215 EXPORT TIM3_IRQHandler [WEAK]
\r
216 EXPORT TIM4_IRQHandler [WEAK]
\r
217 EXPORT I2C1_EV_IRQHandler [WEAK]
\r
218 EXPORT I2C1_ER_IRQHandler [WEAK]
\r
219 EXPORT I2C2_EV_IRQHandler [WEAK]
\r
220 EXPORT I2C2_ER_IRQHandler [WEAK]
\r
221 EXPORT SPI1_IRQHandler [WEAK]
\r
222 EXPORT SPI2_IRQHandler [WEAK]
\r
223 EXPORT USART1_IRQHandler [WEAK]
\r
224 EXPORT USART2_IRQHandler [WEAK]
\r
225 EXPORT USART3_IRQHandler [WEAK]
\r
226 EXPORT EXTI15_10_IRQHandler [WEAK]
\r
227 EXPORT RTC_Alarm_IRQHandler [WEAK]
\r
228 EXPORT USB_FS_WKUP_IRQHandler [WEAK]
\r
229 EXPORT TIM6_IRQHandler [WEAK]
\r
230 EXPORT TIM7_IRQHandler [WEAK]
\r
234 TAMPER_STAMP_IRQHandler
\r
235 RTC_WKUP_IRQHandler
\r
243 DMA1_Channel1_IRQHandler
\r
244 DMA1_Channel2_IRQHandler
\r
245 DMA1_Channel3_IRQHandler
\r
246 DMA1_Channel4_IRQHandler
\r
247 DMA1_Channel5_IRQHandler
\r
248 DMA1_Channel6_IRQHandler
\r
249 DMA1_Channel7_IRQHandler
\r
272 EXTI15_10_IRQHandler
\r
273 RTC_Alarm_IRQHandler
\r
274 USB_FS_WKUP_IRQHandler
\r
284 ;*******************************************************************************
\r
285 ; User Stack and Heap initialization
\r
286 ;*******************************************************************************
\r
287 IF :DEF:__MICROLIB
\r
289 EXPORT __initial_sp
\r
291 EXPORT __heap_limit
\r
295 IMPORT __use_two_region_memory
\r
296 EXPORT __user_initial_stackheap
\r
298 __user_initial_stackheap
\r
301 LDR R1, =(Stack_Mem + Stack_Size)
\r
302 LDR R2, = (Heap_Mem + Heap_Size)
\r
303 LDR R3, = Stack_Mem
\r
312 ;******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE*****
\r