source: ecs_cellMon/Bootloader/SES/STM32G0xx/Source/STM32G07x_Vectors.s

Last change on this file was 3, checked in by f.jahn, 2 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\Name:
91        1: b 1b   // Endless loop
92.endm
93
94//
95// Declare an interrupt handler with a weak definition
96//
97.macro ISR_HANDLER Name=
98        //
99        // Insert vector in vector table
100        //
101        .section .vectors, "ax"
102        .word \Name
103        //
104        // Insert dummy handler in init section
105        //
106#if defined(__OPTIMIZATION_SMALL)
107        .section .init, "ax"
108        .weak \Name
109        .thumb_set \Name,Dummy_Handler
110#else
111        .section .init.\Name, "ax"
112        .thumb_func
113        .weak \Name
114\Name:
115        1: b 1b   // Endless loop
116#endif
117.endm
118
119//
120// Place a reserved vector in vector table
121//
122.macro ISR_RESERVED
123        .section .vectors, "ax"
124        .word 0
125.endm
126
127//
128// Place a reserved vector in vector table
129//
130.macro ISR_RESERVED_DUMMY
131        .section .vectors, "ax"
132        .word Dummy_Handler
133.endm
134
135/*********************************************************************
136*
137*       Externals
138*
139**********************************************************************
140*/
141        .extern __stack_end__
142        .extern Reset_Handler
143        .extern HardFault_Handler
144
145/*********************************************************************
146*
147*       Global functions
148*
149**********************************************************************
150*/
151
152/*********************************************************************
153*
154*  Setup of the vector table and weak definition of interrupt handlers
155*
156*/
157        .section .vectors, "ax"
158        .code 16
159        .balign 512
160        .global _vectors
161_vectors:
162        //
163        // Internal exceptions and interrupts
164        //
165        VECTOR __stack_end__
166        VECTOR Reset_Handler
167        EXC_HANDLER NMI_Handler
168        VECTOR HardFault_Handler
169        ISR_RESERVED
170        ISR_RESERVED
171        ISR_RESERVED
172        ISR_RESERVED
173        ISR_RESERVED
174        ISR_RESERVED
175        ISR_RESERVED
176        EXC_HANDLER SVC_Handler
177        ISR_RESERVED
178        ISR_RESERVED
179        EXC_HANDLER PendSV_Handler
180        EXC_HANDLER SysTick_Handler
181        //
182        // External interrupts
183        //
184#ifndef __NO_EXTERNAL_INTERRUPTS
185        ISR_HANDLER WWDG_IRQHandler
186        ISR_HANDLER PVD_IRQHandler
187        ISR_HANDLER RTC_STAMP_IRQHandler
188        ISR_HANDLER FLASH_IRQHandler
189        ISR_HANDLER RCC_IRQHandler
190        ISR_HANDLER EXTI0_1_IRQHandler
191        ISR_HANDLER EXTI2_3_IRQHandler
192        ISR_HANDLER EXTI4_15_IRQHandler
193        ISR_HANDLER UCPD1_UCPD2_IRQHandler
194        ISR_HANDLER DMA_Channel1_IRQHandler
195        ISR_HANDLER DMA_Channel2_3_IRQHandler
196        ISR_HANDLER DMA_Channel4_5_6_7_IRQHandler
197        ISR_HANDLER ADC_COMP_IRQHandler
198        ISR_HANDLER TIM1_BRK_UP_TRG_COMP_IRQHandler
199        ISR_HANDLER TIM1_CC_IRQHandler
200        ISR_HANDLER TIM2_IRQHandler
201        ISR_HANDLER TIM3_IRQHandler
202        ISR_HANDLER TIM6_DAC_LPTIM1_IRQHandler
203        ISR_HANDLER TIM7_LPTIM2_IRQHandler
204        ISR_HANDLER TIM14_IRQHandler
205        ISR_HANDLER TIM15_IRQHandler
206        ISR_HANDLER TIM16_IRQHandler
207        ISR_HANDLER TIM17_IRQHandler
208        ISR_HANDLER I2C1_IRQHandler
209        ISR_HANDLER I2C2_IRQHandler
210        ISR_HANDLER SPI1_IRQHandler
211        ISR_HANDLER SPI2_IRQHandler
212        ISR_HANDLER USART1_IRQHandler
213        ISR_HANDLER USART2_IRQHandler
214        ISR_HANDLER USART3_USART4_LPUART1_IRQHandler
215        ISR_HANDLER CEC_IRQHandler
216        ISR_HANDLER AES_RNG_IRQHandler
217#endif
218        //
219        .section .vectors, "ax"
220_vectors_end:
221
222
223/*********************************************************************
224*
225*  Dummy handler to be used for reserved interrupt vectors
226*  and weak implementation of interrupts.
227*
228*/
229        .section .init.Dummy_Handler, "ax"
230        .thumb_func
231        .weak Dummy_Handler
232Dummy_Handler:
233        1: b 1b   // Endless loop
234
235
236/*************************** End of file ****************************/
Note: See TracBrowser for help on using the repository browser.