1/* ------------------------------------------------------------------------- */
2/*  @file:    startup_LPC5516.s                                              */
3/*  @purpose: CMSIS Cortex-M33 Core Device Startup File                      */
4/*            LPC5516                                                        */
5/*  @version: 1.1                                                            */
6/*  @date:    2019-12-3                                                      */
7/*  @build:   b231018                                                        */
8/* ------------------------------------------------------------------------- */
9/*                                                                           */
10/* Copyright 1997-2016 Freescale Semiconductor, Inc.                         */
11/* Copyright 2016-2023 NXP                                                   */
12/* SPDX-License-Identifier: BSD-3-Clause                                     */
13/*****************************************************************************/
14/* Version: GCC for ARM Embedded Processors                                  */
15/*****************************************************************************/
16    .syntax unified
17    .arch armv8-m.main
18
19    .section .isr_vector, "a"
20    .align 2
21    .globl __Vectors
22__Vectors:
23    .long   __StackTop                                      /* Top of Stack */
24    .long   Reset_Handler                                   /* Reset Handler */
25    .long   NMI_Handler                                     /* NMI Handler*/
26    .long   HardFault_Handler                               /* Hard Fault Handler*/
27    .long   MemManage_Handler                               /* MPU Fault Handler*/
28    .long   BusFault_Handler                                /* Bus Fault Handler*/
29    .long   UsageFault_Handler                              /* Usage Fault Handler*/
30    .long   SecureFault_Handler                             /* Secure Fault Handler*/
31    .long   0                                               /* Reserved*/
32    .long   0                                               /* Reserved*/
33    .long   0                                               /* Reserved*/
34    .long   SVC_Handler                                     /* SVCall Handler*/
35    .long   DebugMon_Handler                                /* Debug Monitor Handler*/
36    .long   0                                               /* Reserved*/
37    .long   PendSV_Handler                                  /* PendSV Handler*/
38    .long   SysTick_Handler                                 /* SysTick Handler*/
39
40                                                            /* External Interrupts*/
41    .long   WDT_BOD_IRQHandler                              /* Windowed watchdog timer, Brownout detect, Flash interrupt*/
42    .long   DMA0_IRQHandler                                 /* DMA0 controller*/
43    .long   GINT0_IRQHandler                                /* GPIO group 0*/
44    .long   GINT1_IRQHandler                                /* GPIO group 1*/
45    .long   PIN_INT0_IRQHandler                             /* Pin interrupt 0 or pattern match engine slice 0*/
46    .long   PIN_INT1_IRQHandler                             /* Pin interrupt 1or pattern match engine slice 1*/
47    .long   PIN_INT2_IRQHandler                             /* Pin interrupt 2 or pattern match engine slice 2*/
48    .long   PIN_INT3_IRQHandler                             /* Pin interrupt 3 or pattern match engine slice 3*/
49    .long   UTICK0_IRQHandler                               /* Micro-tick Timer*/
50    .long   MRT0_IRQHandler                                 /* Multi-rate timer*/
51    .long   CTIMER0_IRQHandler                              /* Standard counter/timer CTIMER0*/
52    .long   CTIMER1_IRQHandler                              /* Standard counter/timer CTIMER1*/
53    .long   SCT0_IRQHandler                                 /* SCTimer/PWM*/
54    .long   CTIMER3_IRQHandler                              /* Standard counter/timer CTIMER3*/
55    .long   FLEXCOMM0_IRQHandler                            /* Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM)*/
56    .long   FLEXCOMM1_IRQHandler                            /* Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM)*/
57    .long   FLEXCOMM2_IRQHandler                            /* Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM)*/
58    .long   FLEXCOMM3_IRQHandler                            /* Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM)*/
59    .long   FLEXCOMM4_IRQHandler                            /* Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM)*/
60    .long   FLEXCOMM5_IRQHandler                            /* Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM)*/
61    .long   FLEXCOMM6_IRQHandler                            /* Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM)*/
62    .long   FLEXCOMM7_IRQHandler                            /* Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM)*/
63    .long   ADC0_IRQHandler                                 /* ADC0 */
64    .long   Reserved39_IRQHandler                           /* Reserved interrupt*/
65    .long   ACMP_IRQHandler                                 /* ACMP interrupts*/
66    .long   Reserved41_IRQHandler                           /* Reserved interrupt*/
67    .long   Reserved42_IRQHandler                           /* Reserved interrupt*/
68    .long   USB0_NEEDCLK_IRQHandler                         /* USB Activity Wake-up Interrupt*/
69    .long   USB0_IRQHandler                                 /* USB device*/
70    .long   RTC_IRQHandler                                  /* RTC alarm and wake-up interrupts*/
71    .long   Reserved46_IRQHandler                           /* Reserved interrupt*/
72    .long   Reserved47_IRQHandler                           /* Reserved interrupt*/
73    .long   PIN_INT4_IRQHandler                             /* Pin interrupt 4 or pattern match engine slice 4 int*/
74    .long   PIN_INT5_IRQHandler                             /* Pin interrupt 5 or pattern match engine slice 5 int*/
75    .long   PIN_INT6_IRQHandler                             /* Pin interrupt 6 or pattern match engine slice 6 int*/
76    .long   PIN_INT7_IRQHandler                             /* Pin interrupt 7 or pattern match engine slice 7 int*/
77    .long   CTIMER2_IRQHandler                              /* Standard counter/timer CTIMER2*/
78    .long   CTIMER4_IRQHandler                              /* Standard counter/timer CTIMER4*/
79    .long   OS_EVENT_IRQHandler                             /* OS_EVENT_TIMER and OS_EVENT_WAKEUP interrupts*/
80    .long   Reserved55_IRQHandler                           /* Reserved interrupt*/
81    .long   Reserved56_IRQHandler                           /* Reserved interrupt*/
82    .long   Reserved57_IRQHandler                           /* Reserved interrupt*/
83    .long   Reserved58_IRQHandler                           /* Reserved interrupt*/
84    .long   CAN0_IRQ0_IRQHandler                            /* CAN0 interrupt0*/
85    .long   CAN0_IRQ1_IRQHandler                            /* CAN0 interrupt1*/
86    .long   Reserved61_IRQHandler                           /* Reserved interrupt*/
87    .long   USB1_PHY_IRQHandler                             /* USB1_PHY*/
88    .long   USB1_IRQHandler                                 /* USB1 interrupt*/
89    .long   USB1_NEEDCLK_IRQHandler                         /* USB1 activity*/
90    .long   SEC_HYPERVISOR_CALL_IRQHandler                  /* SEC_HYPERVISOR_CALL interrupt*/
91    .long   SEC_GPIO_INT0_IRQ0_IRQHandler                   /* SEC_GPIO_INT0_IRQ0 interrupt*/
92    .long   SEC_GPIO_INT0_IRQ1_IRQHandler                   /* SEC_GPIO_INT0_IRQ1 interrupt*/
93    .long   PLU_IRQHandler                                  /* PLU interrupt*/
94    .long   SEC_VIO_IRQHandler                              /* SEC_VIO interrupt*/
95    .long   Reserved70_IRQHandler                           /* Reserved interrupt*/
96    .long   CASER_IRQHandler                                /* CASPER interrupt*/
97    .long   PUF_IRQHandler                                  /* PUF interrupt*/
98    .long   Reserved73_IRQHandler                           /* Reserved interrupt*/
99    .long   DMA1_IRQHandler                                 /* DMA1 interrupt*/
100    .long   FLEXCOMM8_IRQHandler                            /* Flexcomm Interface 8 (SPI, , FLEXCOMM)*/
101    .long   CDOG_IRQHandler                                 /* CDOG interrupt*/
102
103    .size   __Vectors, . - __Vectors
104
105    .text
106    .thumb
107
108#if defined (__cplusplus)
109#ifdef __REDLIB__
110#error Redlib does not support C++
111#endif
112#endif
113/* Reset Handler */
114
115    .thumb_func
116    .align 2
117    .globl   Reset_Handler
118    .weak    Reset_Handler
119    .type    Reset_Handler, %function
120Reset_Handler:
121    cpsid   i               /* Mask interrupts */
122    .equ    VTOR, 0xE000ED08
123    ldr     r0, =VTOR
124    ldr     r1, =__Vectors
125    str     r1, [r0]
126    ldr     r2, [r1]
127    msr     msp, r2
128    ldr     r0, =__StackLimit
129    msr     msplim, r0
130#ifndef __NO_SYSTEM_INIT
131    ldr   r0,=SystemInit
132    blx   r0
133#endif
134/*     Loop to copy data from read only memory to RAM. The ranges
135 *      of copy from/to are specified by following symbols evaluated in
136 *      linker script.
137 *      __etext: End of code section, i.e., begin of data sections to copy from.
138 *      __data_start__/__data_end__: RAM address range that data should be
139 *      copied to. Both must be aligned to 4 bytes boundary.  */
140
141    ldr    r1, =__etext
142    ldr    r2, =__data_start__
143    ldr    r3, =__data_end__
144
145#if 1
146/* Here are two copies of loop implemenations. First one favors code size
147 * and the second one favors performance. Default uses the first one.
148 * Change to "#if 0" to use the second one */
149.LC0:
150    cmp     r2, r3
151    ittt    lt
152    ldrlt   r0, [r1], #4
153    strlt   r0, [r2], #4
154    blt    .LC0
155#else
156    subs    r3, r2
157    ble    .LC1
158.LC0:
159    subs    r3, #4
160    ldr    r0, [r1, r3]
161    str    r0, [r2, r3]
162    bgt    .LC0
163.LC1:
164#endif
165
166#ifdef __STARTUP_CLEAR_BSS
167/*     This part of work usually is done in C library startup code. Otherwise,
168 *     define this macro to enable it in this startup.
169 *
170 *     Loop to zero out BSS section, which uses following symbols
171 *     in linker script:
172 *      __bss_start__: start of BSS section. Must align to 4
173 *      __bss_end__: end of BSS section. Must align to 4
174 */
175    ldr r1, =__bss_start__
176    ldr r2, =__bss_end__
177
178    movs    r0, 0
179.LC2:
180    cmp     r1, r2
181    itt    lt
182    strlt   r0, [r1], #4
183    blt    .LC2
184#endif /* __STARTUP_CLEAR_BSS */
185
186/* Add stack / heap initializaiton */
187    movs    r0, 0
188    ldr     r1, =__HeapBase
189    ldr     r2, =__HeapLimit
190.LC3:
191    cmp     r1, r2
192    itt     lt
193    strlt   r0, [r1], #4
194    blt     .LC3
195
196    ldr     r1, =__StackLimit
197    ldr     r2, =__StackTop
198.LC4:
199    cmp     r1, r2
200    itt     lt
201    strlt   r0, [r1], #4
202    blt     .LC4
203
204/*End of stack / heap initializaiton */
205    cpsie   i               /* Unmask interrupts */
206#ifndef __START
207#ifdef __REDLIB__
208#define __START __main
209#else
210#define __START _start
211#endif
212#endif
213#ifndef __ATOLLIC__
214    ldr   r0,=__START
215    blx   r0
216#else
217    ldr   r0,=__libc_init_array
218    blx   r0
219    ldr   r0,=main
220    bx    r0
221#endif
222    .pool
223    .size Reset_Handler, . - Reset_Handler
224
225    .align  1
226    .thumb_func
227    .weak DefaultISR
228    .type DefaultISR, %function
229DefaultISR:
230    b DefaultISR
231    .size DefaultISR, . - DefaultISR
232
233    .align 1
234    .thumb_func
235    .weak NMI_Handler
236    .type NMI_Handler, %function
237NMI_Handler:
238    ldr   r0,=NMI_Handler
239    bx    r0
240    .size NMI_Handler, . - NMI_Handler
241
242    .align 1
243    .thumb_func
244    .weak HardFault_Handler
245    .type HardFault_Handler, %function
246HardFault_Handler:
247    ldr   r0,=HardFault_Handler
248    bx    r0
249    .size HardFault_Handler, . - HardFault_Handler
250
251    .align 1
252    .thumb_func
253    .weak SVC_Handler
254    .type SVC_Handler, %function
255SVC_Handler:
256    ldr   r0,=SVC_Handler
257    bx    r0
258    .size SVC_Handler, . - SVC_Handler
259
260    .align 1
261    .thumb_func
262    .weak PendSV_Handler
263    .type PendSV_Handler, %function
264PendSV_Handler:
265    ldr   r0,=PendSV_Handler
266    bx    r0
267    .size PendSV_Handler, . - PendSV_Handler
268
269    .align 1
270    .thumb_func
271    .weak SysTick_Handler
272    .type SysTick_Handler, %function
273SysTick_Handler:
274    ldr   r0,=SysTick_Handler
275    bx    r0
276    .size SysTick_Handler, . - SysTick_Handler
277
278    .align 1
279    .thumb_func
280    .weak WDT_BOD_IRQHandler
281    .type WDT_BOD_IRQHandler, %function
282WDT_BOD_IRQHandler:
283    ldr   r0,=WDT_BOD_DriverIRQHandler
284    bx    r0
285    .size WDT_BOD_IRQHandler, . - WDT_BOD_IRQHandler
286
287    .align 1
288    .thumb_func
289    .weak DMA0_IRQHandler
290    .type DMA0_IRQHandler, %function
291DMA0_IRQHandler:
292    ldr   r0,=DMA0_DriverIRQHandler
293    bx    r0
294    .size DMA0_IRQHandler, . - DMA0_IRQHandler
295
296    .align 1
297    .thumb_func
298    .weak GINT0_IRQHandler
299    .type GINT0_IRQHandler, %function
300GINT0_IRQHandler:
301    ldr   r0,=GINT0_DriverIRQHandler
302    bx    r0
303    .size GINT0_IRQHandler, . - GINT0_IRQHandler
304
305    .align 1
306    .thumb_func
307    .weak GINT1_IRQHandler
308    .type GINT1_IRQHandler, %function
309GINT1_IRQHandler:
310    ldr   r0,=GINT1_DriverIRQHandler
311    bx    r0
312    .size GINT1_IRQHandler, . - GINT1_IRQHandler
313
314    .align 1
315    .thumb_func
316    .weak PIN_INT0_IRQHandler
317    .type PIN_INT0_IRQHandler, %function
318PIN_INT0_IRQHandler:
319    ldr   r0,=PIN_INT0_DriverIRQHandler
320    bx    r0
321    .size PIN_INT0_IRQHandler, . - PIN_INT0_IRQHandler
322
323    .align 1
324    .thumb_func
325    .weak PIN_INT1_IRQHandler
326    .type PIN_INT1_IRQHandler, %function
327PIN_INT1_IRQHandler:
328    ldr   r0,=PIN_INT1_DriverIRQHandler
329    bx    r0
330    .size PIN_INT1_IRQHandler, . - PIN_INT1_IRQHandler
331
332    .align 1
333    .thumb_func
334    .weak PIN_INT2_IRQHandler
335    .type PIN_INT2_IRQHandler, %function
336PIN_INT2_IRQHandler:
337    ldr   r0,=PIN_INT2_DriverIRQHandler
338    bx    r0
339    .size PIN_INT2_IRQHandler, . - PIN_INT2_IRQHandler
340
341    .align 1
342    .thumb_func
343    .weak PIN_INT3_IRQHandler
344    .type PIN_INT3_IRQHandler, %function
345PIN_INT3_IRQHandler:
346    ldr   r0,=PIN_INT3_DriverIRQHandler
347    bx    r0
348    .size PIN_INT3_IRQHandler, . - PIN_INT3_IRQHandler
349
350    .align 1
351    .thumb_func
352    .weak UTICK0_IRQHandler
353    .type UTICK0_IRQHandler, %function
354UTICK0_IRQHandler:
355    ldr   r0,=UTICK0_DriverIRQHandler
356    bx    r0
357    .size UTICK0_IRQHandler, . - UTICK0_IRQHandler
358
359    .align 1
360    .thumb_func
361    .weak MRT0_IRQHandler
362    .type MRT0_IRQHandler, %function
363MRT0_IRQHandler:
364    ldr   r0,=MRT0_DriverIRQHandler
365    bx    r0
366    .size MRT0_IRQHandler, . - MRT0_IRQHandler
367
368    .align 1
369    .thumb_func
370    .weak CTIMER0_IRQHandler
371    .type CTIMER0_IRQHandler, %function
372CTIMER0_IRQHandler:
373    ldr   r0,=CTIMER0_DriverIRQHandler
374    bx    r0
375    .size CTIMER0_IRQHandler, . - CTIMER0_IRQHandler
376
377    .align 1
378    .thumb_func
379    .weak CTIMER1_IRQHandler
380    .type CTIMER1_IRQHandler, %function
381CTIMER1_IRQHandler:
382    ldr   r0,=CTIMER1_DriverIRQHandler
383    bx    r0
384    .size CTIMER1_IRQHandler, . - CTIMER1_IRQHandler
385
386    .align 1
387    .thumb_func
388    .weak SCT0_IRQHandler
389    .type SCT0_IRQHandler, %function
390SCT0_IRQHandler:
391    ldr   r0,=SCT0_DriverIRQHandler
392    bx    r0
393    .size SCT0_IRQHandler, . - SCT0_IRQHandler
394
395    .align 1
396    .thumb_func
397    .weak CTIMER3_IRQHandler
398    .type CTIMER3_IRQHandler, %function
399CTIMER3_IRQHandler:
400    ldr   r0,=CTIMER3_DriverIRQHandler
401    bx    r0
402    .size CTIMER3_IRQHandler, . - CTIMER3_IRQHandler
403
404    .align 1
405    .thumb_func
406    .weak FLEXCOMM0_IRQHandler
407    .type FLEXCOMM0_IRQHandler, %function
408FLEXCOMM0_IRQHandler:
409    ldr   r0,=FLEXCOMM0_DriverIRQHandler
410    bx    r0
411    .size FLEXCOMM0_IRQHandler, . - FLEXCOMM0_IRQHandler
412
413    .align 1
414    .thumb_func
415    .weak FLEXCOMM1_IRQHandler
416    .type FLEXCOMM1_IRQHandler, %function
417FLEXCOMM1_IRQHandler:
418    ldr   r0,=FLEXCOMM1_DriverIRQHandler
419    bx    r0
420    .size FLEXCOMM1_IRQHandler, . - FLEXCOMM1_IRQHandler
421
422    .align 1
423    .thumb_func
424    .weak FLEXCOMM2_IRQHandler
425    .type FLEXCOMM2_IRQHandler, %function
426FLEXCOMM2_IRQHandler:
427    ldr   r0,=FLEXCOMM2_DriverIRQHandler
428    bx    r0
429    .size FLEXCOMM2_IRQHandler, . - FLEXCOMM2_IRQHandler
430
431    .align 1
432    .thumb_func
433    .weak FLEXCOMM3_IRQHandler
434    .type FLEXCOMM3_IRQHandler, %function
435FLEXCOMM3_IRQHandler:
436    ldr   r0,=FLEXCOMM3_DriverIRQHandler
437    bx    r0
438    .size FLEXCOMM3_IRQHandler, . - FLEXCOMM3_IRQHandler
439
440    .align 1
441    .thumb_func
442    .weak FLEXCOMM4_IRQHandler
443    .type FLEXCOMM4_IRQHandler, %function
444FLEXCOMM4_IRQHandler:
445    ldr   r0,=FLEXCOMM4_DriverIRQHandler
446    bx    r0
447    .size FLEXCOMM4_IRQHandler, . - FLEXCOMM4_IRQHandler
448
449    .align 1
450    .thumb_func
451    .weak FLEXCOMM5_IRQHandler
452    .type FLEXCOMM5_IRQHandler, %function
453FLEXCOMM5_IRQHandler:
454    ldr   r0,=FLEXCOMM5_DriverIRQHandler
455    bx    r0
456    .size FLEXCOMM5_IRQHandler, . - FLEXCOMM5_IRQHandler
457
458    .align 1
459    .thumb_func
460    .weak FLEXCOMM6_IRQHandler
461    .type FLEXCOMM6_IRQHandler, %function
462FLEXCOMM6_IRQHandler:
463    ldr   r0,=FLEXCOMM6_DriverIRQHandler
464    bx    r0
465    .size FLEXCOMM6_IRQHandler, . - FLEXCOMM6_IRQHandler
466
467    .align 1
468    .thumb_func
469    .weak FLEXCOMM7_IRQHandler
470    .type FLEXCOMM7_IRQHandler, %function
471FLEXCOMM7_IRQHandler:
472    ldr   r0,=FLEXCOMM7_DriverIRQHandler
473    bx    r0
474    .size FLEXCOMM7_IRQHandler, . - FLEXCOMM7_IRQHandler
475
476    .align 1
477    .thumb_func
478    .weak ADC0_IRQHandler
479    .type ADC0_IRQHandler, %function
480ADC0_IRQHandler:
481    ldr   r0,=ADC0_DriverIRQHandler
482    bx    r0
483    .size ADC0_IRQHandler, . - ADC0_IRQHandler
484
485    .align 1
486    .thumb_func
487    .weak Reserved39_IRQHandler
488    .type Reserved39_IRQHandler, %function
489Reserved39_IRQHandler:
490    ldr   r0,=Reserved39_DriverIRQHandler
491    bx    r0
492    .size Reserved39_IRQHandler, . - Reserved39_IRQHandler
493
494    .align 1
495    .thumb_func
496    .weak ACMP_IRQHandler
497    .type ACMP_IRQHandler, %function
498ACMP_IRQHandler:
499    ldr   r0,=ACMP_DriverIRQHandler
500    bx    r0
501    .size ACMP_IRQHandler, . - ACMP_IRQHandler
502
503    .align 1
504    .thumb_func
505    .weak Reserved41_IRQHandler
506    .type Reserved41_IRQHandler, %function
507Reserved41_IRQHandler:
508    ldr   r0,=Reserved41_DriverIRQHandler
509    bx    r0
510    .size Reserved41_IRQHandler, . - Reserved41_IRQHandler
511
512    .align 1
513    .thumb_func
514    .weak Reserved42_IRQHandler
515    .type Reserved42_IRQHandler, %function
516Reserved42_IRQHandler:
517    ldr   r0,=Reserved42_DriverIRQHandler
518    bx    r0
519    .size Reserved42_IRQHandler, . - Reserved42_IRQHandler
520
521    .align 1
522    .thumb_func
523    .weak USB0_NEEDCLK_IRQHandler
524    .type USB0_NEEDCLK_IRQHandler, %function
525USB0_NEEDCLK_IRQHandler:
526    ldr   r0,=USB0_NEEDCLK_DriverIRQHandler
527    bx    r0
528    .size USB0_NEEDCLK_IRQHandler, . - USB0_NEEDCLK_IRQHandler
529
530    .align 1
531    .thumb_func
532    .weak USB0_IRQHandler
533    .type USB0_IRQHandler, %function
534USB0_IRQHandler:
535    ldr   r0,=USB0_DriverIRQHandler
536    bx    r0
537    .size USB0_IRQHandler, . - USB0_IRQHandler
538
539    .align 1
540    .thumb_func
541    .weak RTC_IRQHandler
542    .type RTC_IRQHandler, %function
543RTC_IRQHandler:
544    ldr   r0,=RTC_DriverIRQHandler
545    bx    r0
546    .size RTC_IRQHandler, . - RTC_IRQHandler
547
548    .align 1
549    .thumb_func
550    .weak Reserved46_IRQHandler
551    .type Reserved46_IRQHandler, %function
552Reserved46_IRQHandler:
553    ldr   r0,=Reserved46_DriverIRQHandler
554    bx    r0
555    .size Reserved46_IRQHandler, . - Reserved46_IRQHandler
556
557    .align 1
558    .thumb_func
559    .weak Reserved47_IRQHandler
560    .type Reserved47_IRQHandler, %function
561Reserved47_IRQHandler:
562    ldr   r0,=Reserved47_DriverIRQHandler
563    bx    r0
564    .size Reserved47_IRQHandler, . - Reserved47_IRQHandler
565
566    .align 1
567    .thumb_func
568    .weak PIN_INT4_IRQHandler
569    .type PIN_INT4_IRQHandler, %function
570PIN_INT4_IRQHandler:
571    ldr   r0,=PIN_INT4_DriverIRQHandler
572    bx    r0
573    .size PIN_INT4_IRQHandler, . - PIN_INT4_IRQHandler
574
575    .align 1
576    .thumb_func
577    .weak PIN_INT5_IRQHandler
578    .type PIN_INT5_IRQHandler, %function
579PIN_INT5_IRQHandler:
580    ldr   r0,=PIN_INT5_DriverIRQHandler
581    bx    r0
582    .size PIN_INT5_IRQHandler, . - PIN_INT5_IRQHandler
583
584    .align 1
585    .thumb_func
586    .weak PIN_INT6_IRQHandler
587    .type PIN_INT6_IRQHandler, %function
588PIN_INT6_IRQHandler:
589    ldr   r0,=PIN_INT6_DriverIRQHandler
590    bx    r0
591    .size PIN_INT6_IRQHandler, . - PIN_INT6_IRQHandler
592
593    .align 1
594    .thumb_func
595    .weak PIN_INT7_IRQHandler
596    .type PIN_INT7_IRQHandler, %function
597PIN_INT7_IRQHandler:
598    ldr   r0,=PIN_INT7_DriverIRQHandler
599    bx    r0
600    .size PIN_INT7_IRQHandler, . - PIN_INT7_IRQHandler
601
602    .align 1
603    .thumb_func
604    .weak CTIMER2_IRQHandler
605    .type CTIMER2_IRQHandler, %function
606CTIMER2_IRQHandler:
607    ldr   r0,=CTIMER2_DriverIRQHandler
608    bx    r0
609    .size CTIMER2_IRQHandler, . - CTIMER2_IRQHandler
610
611    .align 1
612    .thumb_func
613    .weak CTIMER4_IRQHandler
614    .type CTIMER4_IRQHandler, %function
615CTIMER4_IRQHandler:
616    ldr   r0,=CTIMER4_DriverIRQHandler
617    bx    r0
618    .size CTIMER4_IRQHandler, . - CTIMER4_IRQHandler
619
620    .align 1
621    .thumb_func
622    .weak OS_EVENT_IRQHandler
623    .type OS_EVENT_IRQHandler, %function
624OS_EVENT_IRQHandler:
625    ldr   r0,=OS_EVENT_DriverIRQHandler
626    bx    r0
627    .size OS_EVENT_IRQHandler, . - OS_EVENT_IRQHandler
628
629    .align 1
630    .thumb_func
631    .weak Reserved55_IRQHandler
632    .type Reserved55_IRQHandler, %function
633Reserved55_IRQHandler:
634    ldr   r0,=Reserved55_DriverIRQHandler
635    bx    r0
636    .size Reserved55_IRQHandler, . - Reserved55_IRQHandler
637
638    .align 1
639    .thumb_func
640    .weak Reserved56_IRQHandler
641    .type Reserved56_IRQHandler, %function
642Reserved56_IRQHandler:
643    ldr   r0,=Reserved56_DriverIRQHandler
644    bx    r0
645    .size Reserved56_IRQHandler, . - Reserved56_IRQHandler
646
647    .align 1
648    .thumb_func
649    .weak Reserved57_IRQHandler
650    .type Reserved57_IRQHandler, %function
651Reserved57_IRQHandler:
652    ldr   r0,=Reserved57_DriverIRQHandler
653    bx    r0
654    .size Reserved57_IRQHandler, . - Reserved57_IRQHandler
655
656    .align 1
657    .thumb_func
658    .weak Reserved58_IRQHandler
659    .type Reserved58_IRQHandler, %function
660Reserved58_IRQHandler:
661    ldr   r0,=Reserved58_DriverIRQHandler
662    bx    r0
663    .size Reserved58_IRQHandler, . - Reserved58_IRQHandler
664
665    .align 1
666    .thumb_func
667    .weak CAN0_IRQ0_IRQHandler
668    .type CAN0_IRQ0_IRQHandler, %function
669CAN0_IRQ0_IRQHandler:
670    ldr   r0,=CAN0_IRQ0_DriverIRQHandler
671    bx    r0
672    .size CAN0_IRQ0_IRQHandler, . - CAN0_IRQ0_IRQHandler
673
674    .align 1
675    .thumb_func
676    .weak CAN0_IRQ1_IRQHandler
677    .type CAN0_IRQ1_IRQHandler, %function
678CAN0_IRQ1_IRQHandler:
679    ldr   r0,=CAN0_IRQ1_DriverIRQHandler
680    bx    r0
681    .size CAN0_IRQ1_IRQHandler, . - CAN0_IRQ1_IRQHandler
682
683    .align 1
684    .thumb_func
685    .weak Reserved61_IRQHandler
686    .type Reserved61_IRQHandler, %function
687Reserved61_IRQHandler:
688    ldr   r0,=Reserved61_DriverIRQHandler
689    bx    r0
690    .size Reserved61_IRQHandler, . - Reserved61_IRQHandler
691
692    .align 1
693    .thumb_func
694    .weak USB1_PHY_IRQHandler
695    .type USB1_PHY_IRQHandler, %function
696USB1_PHY_IRQHandler:
697    ldr   r0,=USB1_PHY_DriverIRQHandler
698    bx    r0
699    .size USB1_PHY_IRQHandler, . - USB1_PHY_IRQHandler
700
701    .align 1
702    .thumb_func
703    .weak USB1_IRQHandler
704    .type USB1_IRQHandler, %function
705USB1_IRQHandler:
706    ldr   r0,=USB1_DriverIRQHandler
707    bx    r0
708    .size USB1_IRQHandler, . - USB1_IRQHandler
709
710    .align 1
711    .thumb_func
712    .weak USB1_NEEDCLK_IRQHandler
713    .type USB1_NEEDCLK_IRQHandler, %function
714USB1_NEEDCLK_IRQHandler:
715    ldr   r0,=USB1_NEEDCLK_DriverIRQHandler
716    bx    r0
717    .size USB1_NEEDCLK_IRQHandler, . - USB1_NEEDCLK_IRQHandler
718
719    .align 1
720    .thumb_func
721    .weak SEC_HYPERVISOR_CALL_IRQHandler
722    .type SEC_HYPERVISOR_CALL_IRQHandler, %function
723SEC_HYPERVISOR_CALL_IRQHandler:
724    ldr   r0,=SEC_HYPERVISOR_CALL_DriverIRQHandler
725    bx    r0
726    .size SEC_HYPERVISOR_CALL_IRQHandler, . - SEC_HYPERVISOR_CALL_IRQHandler
727
728    .align 1
729    .thumb_func
730    .weak SEC_GPIO_INT0_IRQ0_IRQHandler
731    .type SEC_GPIO_INT0_IRQ0_IRQHandler, %function
732SEC_GPIO_INT0_IRQ0_IRQHandler:
733    ldr   r0,=SEC_GPIO_INT0_IRQ0_DriverIRQHandler
734    bx    r0
735    .size SEC_GPIO_INT0_IRQ0_IRQHandler, . - SEC_GPIO_INT0_IRQ0_IRQHandler
736
737    .align 1
738    .thumb_func
739    .weak SEC_GPIO_INT0_IRQ1_IRQHandler
740    .type SEC_GPIO_INT0_IRQ1_IRQHandler, %function
741SEC_GPIO_INT0_IRQ1_IRQHandler:
742    ldr   r0,=SEC_GPIO_INT0_IRQ1_DriverIRQHandler
743    bx    r0
744    .size SEC_GPIO_INT0_IRQ1_IRQHandler, . - SEC_GPIO_INT0_IRQ1_IRQHandler
745
746    .align 1
747    .thumb_func
748    .weak PLU_IRQHandler
749    .type PLU_IRQHandler, %function
750PLU_IRQHandler:
751    ldr   r0,=PLU_DriverIRQHandler
752    bx    r0
753    .size PLU_IRQHandler, . - PLU_IRQHandler
754
755    .align 1
756    .thumb_func
757    .weak SEC_VIO_IRQHandler
758    .type SEC_VIO_IRQHandler, %function
759SEC_VIO_IRQHandler:
760    ldr   r0,=SEC_VIO_DriverIRQHandler
761    bx    r0
762    .size SEC_VIO_IRQHandler, . - SEC_VIO_IRQHandler
763
764    .align 1
765    .thumb_func
766    .weak Reserved70_IRQHandler
767    .type Reserved70_IRQHandler, %function
768Reserved70_IRQHandler:
769    ldr   r0,=Reserved70_DriverIRQHandler
770    bx    r0
771    .size Reserved70_IRQHandler, . - Reserved70_IRQHandler
772
773    .align 1
774    .thumb_func
775    .weak CASER_IRQHandler
776    .type CASER_IRQHandler, %function
777CASER_IRQHandler:
778    ldr   r0,=CASER_DriverIRQHandler
779    bx    r0
780    .size CASER_IRQHandler, . - CASER_IRQHandler
781
782    .align 1
783    .thumb_func
784    .weak PUF_IRQHandler
785    .type PUF_IRQHandler, %function
786PUF_IRQHandler:
787    ldr   r0,=PUF_DriverIRQHandler
788    bx    r0
789    .size PUF_IRQHandler, . - PUF_IRQHandler
790
791    .align 1
792    .thumb_func
793    .weak Reserved73_IRQHandler
794    .type Reserved73_IRQHandler, %function
795Reserved73_IRQHandler:
796    ldr   r0,=Reserved73_DriverIRQHandler
797    bx    r0
798    .size Reserved73_IRQHandler, . - Reserved73_IRQHandler
799
800    .align 1
801    .thumb_func
802    .weak DMA1_IRQHandler
803    .type DMA1_IRQHandler, %function
804DMA1_IRQHandler:
805    ldr   r0,=DMA1_DriverIRQHandler
806    bx    r0
807    .size DMA1_IRQHandler, . - DMA1_IRQHandler
808
809    .align 1
810    .thumb_func
811    .weak FLEXCOMM8_IRQHandler
812    .type FLEXCOMM8_IRQHandler, %function
813FLEXCOMM8_IRQHandler:
814    ldr   r0,=FLEXCOMM8_DriverIRQHandler
815    bx    r0
816    .size FLEXCOMM8_IRQHandler, . - FLEXCOMM8_IRQHandler
817
818    .align 1
819    .thumb_func
820    .weak CDOG_IRQHandler
821    .type CDOG_IRQHandler, %function
822CDOG_IRQHandler:
823    ldr   r0,=CDOG_DriverIRQHandler
824    bx    r0
825    .size CDOG_IRQHandler, . - CDOG_IRQHandler
826
827
828/*    Macro to define default handlers. Default handler
829 *    will be weak symbol and just dead loops. They can be
830 *    overwritten by other handlers */
831    .macro def_irq_handler  handler_name
832    .weak \handler_name
833    .set  \handler_name, DefaultISR
834    .endm
835/* Exception Handlers */
836    def_irq_handler    MemManage_Handler
837    def_irq_handler    BusFault_Handler
838    def_irq_handler    UsageFault_Handler
839    def_irq_handler    SecureFault_Handler
840    def_irq_handler    DebugMon_Handler
841    def_irq_handler    WDT_BOD_DriverIRQHandler
842    def_irq_handler    DMA0_DriverIRQHandler
843    def_irq_handler    GINT0_DriverIRQHandler
844    def_irq_handler    GINT1_DriverIRQHandler
845    def_irq_handler    PIN_INT0_DriverIRQHandler
846    def_irq_handler    PIN_INT1_DriverIRQHandler
847    def_irq_handler    PIN_INT2_DriverIRQHandler
848    def_irq_handler    PIN_INT3_DriverIRQHandler
849    def_irq_handler    UTICK0_DriverIRQHandler
850    def_irq_handler    MRT0_DriverIRQHandler
851    def_irq_handler    CTIMER0_DriverIRQHandler
852    def_irq_handler    CTIMER1_DriverIRQHandler
853    def_irq_handler    SCT0_DriverIRQHandler
854    def_irq_handler    CTIMER3_DriverIRQHandler
855    def_irq_handler    FLEXCOMM0_DriverIRQHandler
856    def_irq_handler    FLEXCOMM1_DriverIRQHandler
857    def_irq_handler    FLEXCOMM2_DriverIRQHandler
858    def_irq_handler    FLEXCOMM3_DriverIRQHandler
859    def_irq_handler    FLEXCOMM4_DriverIRQHandler
860    def_irq_handler    FLEXCOMM5_DriverIRQHandler
861    def_irq_handler    FLEXCOMM6_DriverIRQHandler
862    def_irq_handler    FLEXCOMM7_DriverIRQHandler
863    def_irq_handler    ADC0_DriverIRQHandler
864    def_irq_handler    Reserved39_DriverIRQHandler
865    def_irq_handler    ACMP_DriverIRQHandler
866    def_irq_handler    Reserved41_DriverIRQHandler
867    def_irq_handler    Reserved42_DriverIRQHandler
868    def_irq_handler    USB0_NEEDCLK_DriverIRQHandler
869    def_irq_handler    USB0_DriverIRQHandler
870    def_irq_handler    RTC_DriverIRQHandler
871    def_irq_handler    Reserved46_DriverIRQHandler
872    def_irq_handler    Reserved47_DriverIRQHandler
873    def_irq_handler    PIN_INT4_DriverIRQHandler
874    def_irq_handler    PIN_INT5_DriverIRQHandler
875    def_irq_handler    PIN_INT6_DriverIRQHandler
876    def_irq_handler    PIN_INT7_DriverIRQHandler
877    def_irq_handler    CTIMER2_DriverIRQHandler
878    def_irq_handler    CTIMER4_DriverIRQHandler
879    def_irq_handler    OS_EVENT_DriverIRQHandler
880    def_irq_handler    Reserved55_DriverIRQHandler
881    def_irq_handler    Reserved56_DriverIRQHandler
882    def_irq_handler    Reserved57_DriverIRQHandler
883    def_irq_handler    Reserved58_DriverIRQHandler
884    def_irq_handler    CAN0_IRQ0_DriverIRQHandler
885    def_irq_handler    CAN0_IRQ1_DriverIRQHandler
886    def_irq_handler    Reserved61_DriverIRQHandler
887    def_irq_handler    USB1_PHY_DriverIRQHandler
888    def_irq_handler    USB1_DriverIRQHandler
889    def_irq_handler    USB1_NEEDCLK_DriverIRQHandler
890    def_irq_handler    SEC_HYPERVISOR_CALL_DriverIRQHandler
891    def_irq_handler    SEC_GPIO_INT0_IRQ0_DriverIRQHandler
892    def_irq_handler    SEC_GPIO_INT0_IRQ1_DriverIRQHandler
893    def_irq_handler    PLU_DriverIRQHandler
894    def_irq_handler    SEC_VIO_DriverIRQHandler
895    def_irq_handler    Reserved70_DriverIRQHandler
896    def_irq_handler    CASER_DriverIRQHandler
897    def_irq_handler    PUF_DriverIRQHandler
898    def_irq_handler    Reserved73_DriverIRQHandler
899    def_irq_handler    DMA1_DriverIRQHandler
900    def_irq_handler    FLEXCOMM8_DriverIRQHandler
901    def_irq_handler    CDOG_DriverIRQHandler
902
903    .end
904