source: ecs_cellMon/firmware/STM32G0xx/Source/STM32G07x_Vectors.s@ 3

Last change on this file since 3 was 3, checked in by f.jahn, 3 years ago

fw hinzugfügt-->zed

File size: 7.5 KB
Line 
1/*********************************************************************
2* SEGGER Microcontroller GmbH *
3* The Embedded Experts *
4**********************************************************************
5* *
6* (c) 2014 - 2020 SEGGER Microcontroller GmbH *
7* *
8* www.segger.com Support: support@segger.com *
9* *
10**********************************************************************
11* *
12* All rights reserved. *
13* *
14* Redistribution and use in source and binary forms, with or *
15* without modification, are permitted provided that the following *
16* condition is met: *
17* *
18* - Redistributions of source code must retain the above copyright *
19* notice, this condition and the following disclaimer. *
20* *
21* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
22* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
23* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
24* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
25* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
26* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
27* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
28* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
29* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
30* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
31* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
32* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
33* DAMAGE. *
34* *
35**********************************************************************
36
37-------------------------- END-OF-HEADER -----------------------------
38
39File : STM32G07x_Vectors.s
40Purpose : Exception and interrupt vectors for STM32G07x devices.
41
42Additional information:
43 Preprocessor Definitions
44 __NO_EXTERNAL_INTERRUPTS
45 If defined,
46 the vector table will contain only the internal exceptions
47 and interrupts.
48
49 __OPTIMIZATION_SMALL
50 If defined,
51 all weak definitions of interrupt handlers will share the
52 same implementation.
53 If not defined,
54 all weak definitions of interrupt handlers will be defined
55 with their own implementation.
56*/
57 .syntax unified
58
59/*********************************************************************
60*
61* Macros
62*
63**********************************************************************
64*/
65
66//
67// Directly place a vector (word) in the vector table
68//
69.macro VECTOR Name=
70 .section .vectors, "ax"
71 .code 16
72 .word \Name
73.endm
74
75//
76// Declare an exception handler with a weak definition
77//
78.macro EXC_HANDLER Name=
79 //
80 // Insert vector in vector table
81 //
82 .section .vectors, "ax"
83 .word \Name
84 //
85 // Insert dummy handler in init section
86 //
87 .section .init.\Name, "ax"
88 .thumb_func
89 .weak \Name
90 .balign 2
91\Name:
92 1: b 1b // Endless loop
93.endm
94
95//
96// Declare an interrupt handler with a weak definition
97//
98.macro ISR_HANDLER Name=
99 //
100 // Insert vector in vector table
101 //
102 .section .vectors, "ax"
103 .word \Name
104 //
105 // Insert dummy handler in init section
106 //
107#if defined(__OPTIMIZATION_SMALL)
108 .section .init, "ax"
109 .weak \Name
110 .thumb_set \Name,Dummy_Handler
111#else
112 .section .init.\Name, "ax"
113 .thumb_func
114 .weak \Name
115 .balign 2
116\Name:
117 1: b 1b // Endless loop
118#endif
119.endm
120
121//
122// Place a reserved vector in vector table
123//
124.macro ISR_RESERVED
125 .section .vectors, "ax"
126 .word 0
127.endm
128
129//
130// Place a reserved vector in vector table
131//
132.macro ISR_RESERVED_DUMMY
133 .section .vectors, "ax"
134 .word Dummy_Handler
135.endm
136
137/*********************************************************************
138*
139* Externals
140*
141**********************************************************************
142*/
143 .extern __stack_end__
144 .extern Reset_Handler
145 .extern HardFault_Handler
146
147/*********************************************************************
148*
149* Global functions
150*
151**********************************************************************
152*/
153
154/*********************************************************************
155*
156* Setup of the vector table and weak definition of interrupt handlers
157*
158*/
159 .section .vectors, "ax"
160 .code 16
161 .balign 512
162 .global _vectors
163_vectors:
164 //
165 // Internal exceptions and interrupts
166 //
167 VECTOR __stack_end__
168 VECTOR Reset_Handler
169 EXC_HANDLER NMI_Handler
170 VECTOR HardFault_Handler
171 ISR_RESERVED
172 ISR_RESERVED
173 ISR_RESERVED
174 ISR_RESERVED
175 ISR_RESERVED
176 ISR_RESERVED
177 ISR_RESERVED
178 EXC_HANDLER SVC_Handler
179 ISR_RESERVED
180 ISR_RESERVED
181 EXC_HANDLER PendSV_Handler
182 EXC_HANDLER SysTick_Handler
183 //
184 // External interrupts
185 //
186#ifndef __NO_EXTERNAL_INTERRUPTS
187 ISR_HANDLER WWDG_IRQHandler
188 ISR_HANDLER PVD_IRQHandler
189 ISR_HANDLER RTC_STAMP_IRQHandler
190 ISR_HANDLER FLASH_IRQHandler
191 ISR_HANDLER RCC_IRQHandler
192 ISR_HANDLER EXTI0_1_IRQHandler
193 ISR_HANDLER EXTI2_3_IRQHandler
194 ISR_HANDLER EXTI4_15_IRQHandler
195 ISR_HANDLER UCPD1_UCPD2_IRQHandler
196 ISR_HANDLER DMA_Channel1_IRQHandler
197 ISR_HANDLER DMA_Channel2_3_IRQHandler
198 ISR_HANDLER DMA_Channel4_5_6_7_IRQHandler
199 ISR_HANDLER ADC_COMP_IRQHandler
200 ISR_HANDLER TIM1_BRK_UP_TRG_COMP_IRQHandler
201 ISR_HANDLER TIM1_CC_IRQHandler
202 ISR_HANDLER TIM2_IRQHandler
203 ISR_HANDLER TIM3_IRQHandler
204 ISR_HANDLER TIM6_DAC_LPTIM1_IRQHandler
205 ISR_HANDLER TIM7_LPTIM2_IRQHandler
206 ISR_HANDLER TIM14_IRQHandler
207 ISR_HANDLER TIM15_IRQHandler
208 ISR_HANDLER TIM16_IRQHandler
209 ISR_HANDLER TIM17_IRQHandler
210 ISR_HANDLER I2C1_IRQHandler
211 ISR_HANDLER I2C2_IRQHandler
212 ISR_HANDLER SPI1_IRQHandler
213 ISR_HANDLER SPI2_IRQHandler
214 ISR_HANDLER USART1_IRQHandler
215 ISR_HANDLER USART2_IRQHandler
216 ISR_HANDLER USART3_USART4_LPUART1_IRQHandler
217 ISR_HANDLER CEC_IRQHandler
218 ISR_HANDLER AES_RNG_IRQHandler
219#endif
220 //
221 .section .vectors, "ax"
222_vectors_end:
223
224
225/*********************************************************************
226*
227* Dummy handler to be used for reserved interrupt vectors
228* and weak implementation of interrupts.
229*
230*/
231 .section .init.Dummy_Handler, "ax"
232 .thumb_func
233 .weak Dummy_Handler
234 .balign 2
235Dummy_Handler:
236 1: b 1b // Endless loop
237
238
239/*************************** End of file ****************************/
Note: See TracBrowser for help on using the repository browser.