1 //*****************************************************************************
2 // MIMXRT685S_cm33 startup code for use with MCUXpresso IDE
3 //
4 // Version : 101121
5 //*****************************************************************************
6 //
7 // Copyright 2016-2021 NXP
8 // All rights reserved.
9 //
10 // SPDX-License-Identifier: BSD-3-Clause
11 //*****************************************************************************
12
13 #if defined (DEBUG)
14 #pragma GCC push_options
15 #pragma GCC optimize ("Og")
16 #endif // (DEBUG)
17
18 #if defined (__cplusplus)
19 #ifdef __REDLIB__
20 #error Redlib does not support C++
21 #else
22 //*****************************************************************************
23 //
24 // The entry point for the C++ library startup
25 //
26 //*****************************************************************************
27 extern "C" {
28 extern void __libc_init_array(void);
29 }
30 #endif
31 #endif
32
33 #define WEAK __attribute__ ((weak))
34 #define WEAK_AV __attribute__ ((weak, section(".after_vectors")))
35 #define ALIAS(f) __attribute__ ((weak, alias (#f)))
36
37 //*****************************************************************************
38 #if defined (__cplusplus)
39 extern "C" {
40 #endif
41
42 //*****************************************************************************
43 // Variable to store CRP value in. Will be placed automatically
44 // by the linker when "Enable Code Read Protect" selected.
45 // See crp.h header for more information
46 //*****************************************************************************
47 //*****************************************************************************
48 // Declaration of external SystemInit function
49 //*****************************************************************************
50 #if defined (__USE_CMSIS)
51 extern void SystemInit(void);
52 #endif // (__USE_CMSIS)
53
54 //*****************************************************************************
55 // Forward declaration of the core exception handlers.
56 // When the application defines a handler (with the same name), this will
57 // automatically take precedence over these weak definitions.
58 // If your application is a C++ one, then any interrupt handlers defined
59 // in C++ files within in your main application will need to have C linkage
60 // rather than C++ linkage. To do this, make sure that you are using extern "C"
61 // { .... } around the interrupt handler within your main application code.
62 //*****************************************************************************
63 void ResetISR(void);
64 WEAK void NMI_Handler(void);
65 WEAK void HardFault_Handler(void);
66 WEAK void MemManage_Handler(void);
67 WEAK void BusFault_Handler(void);
68 WEAK void UsageFault_Handler(void);
69 WEAK void SecureFault_Handler(void);
70 WEAK void SVC_Handler(void);
71 WEAK void DebugMon_Handler(void);
72 WEAK void PendSV_Handler(void);
73 WEAK void SysTick_Handler(void);
74 WEAK void IntDefaultHandler(void);
75
76 //*****************************************************************************
77 // Forward declaration of the application IRQ handlers. When the application
78 // defines a handler (with the same name), this will automatically take
79 // precedence over weak definitions below
80 //*****************************************************************************
81 WEAK void WDT0_IRQHandler(void);
82 WEAK void DMA0_IRQHandler(void);
83 WEAK void GPIO_INTA_IRQHandler(void);
84 WEAK void GPIO_INTB_IRQHandler(void);
85 WEAK void PIN_INT0_IRQHandler(void);
86 WEAK void PIN_INT1_IRQHandler(void);
87 WEAK void PIN_INT2_IRQHandler(void);
88 WEAK void PIN_INT3_IRQHandler(void);
89 WEAK void UTICK0_IRQHandler(void);
90 WEAK void MRT0_IRQHandler(void);
91 WEAK void CTIMER0_IRQHandler(void);
92 WEAK void CTIMER1_IRQHandler(void);
93 WEAK void SCT0_IRQHandler(void);
94 WEAK void CTIMER3_IRQHandler(void);
95 WEAK void FLEXCOMM0_IRQHandler(void);
96 WEAK void FLEXCOMM1_IRQHandler(void);
97 WEAK void FLEXCOMM2_IRQHandler(void);
98 WEAK void FLEXCOMM3_IRQHandler(void);
99 WEAK void FLEXCOMM4_IRQHandler(void);
100 WEAK void FLEXCOMM5_IRQHandler(void);
101 WEAK void FLEXCOMM14_IRQHandler(void);
102 WEAK void FLEXCOMM15_IRQHandler(void);
103 WEAK void ADC0_IRQHandler(void);
104 WEAK void Reserved39_IRQHandler(void);
105 WEAK void ACMP_IRQHandler(void);
106 WEAK void DMIC0_IRQHandler(void);
107 WEAK void Reserved42_IRQHandler(void);
108 WEAK void HYPERVISOR_IRQHandler(void);
109 WEAK void SECUREVIOLATION_IRQHandler(void);
110 WEAK void HWVAD0_IRQHandler(void);
111 WEAK void Reserved46_IRQHandler(void);
112 WEAK void RNG_IRQHandler(void);
113 WEAK void RTC_IRQHandler(void);
114 WEAK void DSPWAKE_IRQHandler(void);
115 WEAK void MU_A_IRQHandler(void);
116 WEAK void PIN_INT4_IRQHandler(void);
117 WEAK void PIN_INT5_IRQHandler(void);
118 WEAK void PIN_INT6_IRQHandler(void);
119 WEAK void PIN_INT7_IRQHandler(void);
120 WEAK void CTIMER2_IRQHandler(void);
121 WEAK void CTIMER4_IRQHandler(void);
122 WEAK void OS_EVENT_IRQHandler(void);
123 WEAK void FLEXSPI_IRQHandler(void);
124 WEAK void FLEXCOMM6_IRQHandler(void);
125 WEAK void FLEXCOMM7_IRQHandler(void);
126 WEAK void USDHC0_IRQHandler(void);
127 WEAK void USDHC1_IRQHandler(void);
128 WEAK void SGPIO_INTA_IRQHandler(void);
129 WEAK void SGPIO_INTB_IRQHandler(void);
130 WEAK void I3C0_IRQHandler(void);
131 WEAK void USB_IRQHandler(void);
132 WEAK void USB_WAKEUP_IRQHandler(void);
133 WEAK void WDT1_IRQHandler(void);
134 WEAK void USBPHY_DCD_IRQHandler(void);
135 WEAK void DMA1_IRQHandler(void);
136 WEAK void PUF_IRQHandler(void);
137 WEAK void POWERQUAD_IRQHandler(void);
138 WEAK void CASPER_IRQHandler(void);
139 WEAK void PMC_PMIC_IRQHandler(void);
140 WEAK void HASHCRYPT_IRQHandler(void);
141
142 //*****************************************************************************
143 // Forward declaration of the driver IRQ handlers. These are aliased
144 // to the IntDefaultHandler, which is a 'forever' loop. When the driver
145 // defines a handler (with the same name), this will automatically take
146 // precedence over these weak definitions
147 //*****************************************************************************
148 void WDT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
149 void DMA0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
150 void GPIO_INTA_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
151 void GPIO_INTB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
152 void PIN_INT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
153 void PIN_INT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
154 void PIN_INT2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
155 void PIN_INT3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
156 void UTICK0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
157 void MRT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
158 void CTIMER0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
159 void CTIMER1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
160 void SCT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
161 void CTIMER3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
162 void FLEXCOMM0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
163 void FLEXCOMM1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
164 void FLEXCOMM2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
165 void FLEXCOMM3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
166 void FLEXCOMM4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
167 void FLEXCOMM5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
168 void FLEXCOMM14_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
169 void FLEXCOMM15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
170 void ADC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
171 void Reserved39_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
172 void ACMP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
173 void DMIC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
174 void Reserved42_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
175 void HYPERVISOR_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
176 void SECUREVIOLATION_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
177 void HWVAD0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
178 void Reserved46_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
179 void RNG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
180 void RTC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
181 void DSPWAKE_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
182 void MU_A_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
183 void PIN_INT4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
184 void PIN_INT5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
185 void PIN_INT6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
186 void PIN_INT7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
187 void CTIMER2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
188 void CTIMER4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
189 void OS_EVENT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
190 void FLEXSPI_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
191 void FLEXCOMM6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
192 void FLEXCOMM7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
193 void USDHC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
194 void USDHC1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
195 void SGPIO_INTA_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
196 void SGPIO_INTB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
197 void I3C0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
198 void USB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
199 void USB_WAKEUP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
200 void WDT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
201 void USBPHY_DCD_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
202 void DMA1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
203 void PUF_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
204 void POWERQUAD_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
205 void CASPER_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
206 void PMC_PMIC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
207 void HASHCRYPT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
208
209 //*****************************************************************************
210 // The entry point for the application.
211 // __main() is the entry point for Redlib based applications
212 // main() is the entry point for Newlib based applications
213 //*****************************************************************************
214 #if defined (__REDLIB__)
215 extern void __main(void);
216 #endif
217 extern int main(void);
218
219 //*****************************************************************************
220 // External declaration for the pointer to the stack top from the Linker Script
221 //*****************************************************************************
222 extern void _vStackTop(void);
223 extern void _image_size(void);
224 //*****************************************************************************
225 // External declaration for the pointer to the stack base from the Linker Script
226 //*****************************************************************************
227 extern void _vStackBase(void);
228 //*****************************************************************************
229 // External declaration for image type and load address from Linker Script
230 //*****************************************************************************
231 WEAK extern void __imghdr_loadaddress();
232 WEAK extern void __imghdr_imagetype();
233
234 //*****************************************************************************
235 #if defined (__cplusplus)
236 } // extern "C"
237 #endif
238 //*****************************************************************************
239 // The vector table.
240 // This relies on the linker script to place at correct location in memory.
241 //*****************************************************************************
242
243 extern void (* const g_pfnVectors[])(void);
244 extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));
245
246 __attribute__ ((used, section(".isr_vector")))
247 void (* const g_pfnVectors[])(void) = {
248 // Core Level - CM33
249 &_vStackTop, // The initial stack pointer
250 ResetISR, // The reset handler
251 NMI_Handler, // The NMI handler
252 HardFault_Handler, // The hard fault handler
253 MemManage_Handler, // The MPU fault handler
254 BusFault_Handler, // The bus fault handler
255 UsageFault_Handler, // The usage fault handler
256 SecureFault_Handler, // The secure fault handler
257 #if (defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE & 0x2))
258 (void (*)())0x180000, // Image length
259 #else
260 (void (*)())((unsigned)_image_size), // Image length
261 #endif
262 __imghdr_imagetype, // Image type
263 0, // Reserved
264 SVC_Handler, // SVCall handler
265 DebugMon_Handler, // Debug monitor handler
266 (void (*)())g_pfnVectors, // Image load address
267 PendSV_Handler, // The PendSV handler
268 SysTick_Handler, // The SysTick handler
269
270 // Chip Level - MIMXRT685S_cm33
271 WDT0_IRQHandler, // 16: Windowed watchdog timer 0 (CM33 watchdog)
272 DMA0_IRQHandler, // 17: DMA controller 0 (secure or CM33 DMA)
273 GPIO_INTA_IRQHandler, // 18: GPIO interrupt A
274 GPIO_INTB_IRQHandler, // 19: GPIO interrupt B
275 PIN_INT0_IRQHandler, // 20: Pin interrupt 0 or pattern match engine slice 0 int
276 PIN_INT1_IRQHandler, // 21: Pin interrupt 1 or pattern match engine slice 1 int
277 PIN_INT2_IRQHandler, // 22: Pin interrupt 2 or pattern match engine slice 2 int
278 PIN_INT3_IRQHandler, // 23: Pin interrupt 3 or pattern match engine slice 3 int
279 UTICK0_IRQHandler, // 24: Micro-tick Timer
280 MRT0_IRQHandler, // 25: Multi-Rate Timer
281 CTIMER0_IRQHandler, // 26: Standard counter/timer CTIMER0
282 CTIMER1_IRQHandler, // 27: Standard counter/timer CTIMER1
283 SCT0_IRQHandler, // 28: SCTimer/PWM
284 CTIMER3_IRQHandler, // 29: Standard counter/timer CTIMER3
285 FLEXCOMM0_IRQHandler, // 30: Flexcomm Interface 0 (USART, SPI, I2C, I2S)
286 FLEXCOMM1_IRQHandler, // 31: Flexcomm Interface 1 (USART, SPI, I2C, I2S)
287 FLEXCOMM2_IRQHandler, // 32: Flexcomm Interface 2 (USART, SPI, I2C, I2S)
288 FLEXCOMM3_IRQHandler, // 33: Flexcomm Interface 3 (USART, SPI, I2C, I2S)
289 FLEXCOMM4_IRQHandler, // 34: Flexcomm Interface 4 (USART, SPI, I2C, I2S)
290 FLEXCOMM5_IRQHandler, // 35: Flexcomm Interface 5 (USART, SPI, I2C, I2S)
291 FLEXCOMM14_IRQHandler, // 36: Flexcomm Interface 14 (SPI only)
292 FLEXCOMM15_IRQHandler, // 37: Flexcomm Interface 15 (I2C only)
293 ADC0_IRQHandler, // 38: ADC0
294 Reserved39_IRQHandler, // 39: Reserved interrupt
295 ACMP_IRQHandler, // 40: Analog comparator
296 DMIC0_IRQHandler, // 41: Digital microphone and DMIC subsystem
297 Reserved42_IRQHandler, // 42: Reserved interrupt
298 HYPERVISOR_IRQHandler, // 43: Hypervisor
299 SECUREVIOLATION_IRQHandler, // 44: Secure violation
300 HWVAD0_IRQHandler, // 45: Hardware Voice Activity Detector
301 Reserved46_IRQHandler, // 46: Reserved interrupt
302 RNG_IRQHandler, // 47: Random number Generator
303 RTC_IRQHandler, // 48: RTC alarm and wake-up
304 DSPWAKE_IRQHandler, // 49: Wake-up from DSP
305 MU_A_IRQHandler, // 50: Messaging Unit port A for CM33
306 PIN_INT4_IRQHandler, // 51: Pin interrupt 4 or pattern match engine slice 4 int
307 PIN_INT5_IRQHandler, // 52: Pin interrupt 5 or pattern match engine slice 5 int
308 PIN_INT6_IRQHandler, // 53: Pin interrupt 6 or pattern match engine slice 6 int
309 PIN_INT7_IRQHandler, // 54: Pin interrupt 7 or pattern match engine slice 7 int
310 CTIMER2_IRQHandler, // 55: Standard counter/timer CTIMER2
311 CTIMER4_IRQHandler, // 56: Standard counter/timer CTIMER4
312 OS_EVENT_IRQHandler, // 57: OS event timer
313 FLEXSPI_IRQHandler, // 58: FLEXSPI interface
314 FLEXCOMM6_IRQHandler, // 59: Flexcomm Interface 6 (USART, SPI, I2C, I2S)
315 FLEXCOMM7_IRQHandler, // 60: Flexcomm Interface 7 (USART, SPI, I2C, I2S)
316 USDHC0_IRQHandler, // 61: USDHC0 (Enhanced SDHC) interrupt request
317 USDHC1_IRQHandler, // 62: USDHC1 (Enhanced SDHC) interrupt request
318 SGPIO_INTA_IRQHandler, // 63: Secure GPIO interrupt A
319 SGPIO_INTB_IRQHandler, // 64: Secure GPIO interrupt B
320 I3C0_IRQHandler, // 65: I3C interface 0
321 USB_IRQHandler, // 66: High-speed USB device/host
322 USB_WAKEUP_IRQHandler, // 67: USB Activity Wake-up Interrupt
323 WDT1_IRQHandler, // 68: Windowed watchdog timer 1 (HiFi 4 watchdog)
324 USBPHY_DCD_IRQHandler, // 69: USBPHY DCD
325 DMA1_IRQHandler, // 70: DMA controller 1 (non-secure or HiFi 4 DMA)
326 PUF_IRQHandler, // 71: Physical Unclonable Function
327 POWERQUAD_IRQHandler, // 72: PowerQuad math coprocessor
328 CASPER_IRQHandler, // 73: Casper cryptographic coprocessor
329 PMC_PMIC_IRQHandler, // 74: Power management IC
330 HASHCRYPT_IRQHandler, // 75: Hash-AES unit
331 }; /* End of g_pfnVectors */
332
333 #if defined(ENABLE_RAM_VECTOR_TABLE)
334 extern void * __VECTOR_TABLE __attribute__ ((alias ("g_pfnVectors")));
335 void (* __VECTOR_RAM[sizeof(g_pfnVectors) / 4])(void) __attribute__((aligned(128)));
336 unsigned int __RAM_VECTOR_TABLE_SIZE_BYTES = sizeof(g_pfnVectors);
337 #endif
338
339 //*****************************************************************************
340 // Functions to carry out the initialization of RW and BSS data sections. These
341 // are written as separate functions rather than being inlined within the
342 // ResetISR() function in order to cope with MCUs with multiple banks of
343 // memory.
344 //*****************************************************************************
345 __attribute__ ((section(".after_vectors.init_data")))
data_init(unsigned int romstart,unsigned int start,unsigned int len)346 void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
347 unsigned int *pulDest = (unsigned int*) start;
348 unsigned int *pulSrc = (unsigned int*) romstart;
349 unsigned int loop;
350 for (loop = 0; loop < len; loop = loop + 4)
351 *pulDest++ = *pulSrc++;
352 }
353
354 __attribute__ ((section(".after_vectors.init_bss")))
bss_init(unsigned int start,unsigned int len)355 void bss_init(unsigned int start, unsigned int len) {
356 unsigned int *pulDest = (unsigned int*) start;
357 unsigned int loop;
358 for (loop = 0; loop < len; loop = loop + 4)
359 *pulDest++ = 0;
360 }
361
362 //*****************************************************************************
363 // The following symbols are constructs generated by the linker, indicating
364 // the location of various points in the "Global Section Table". This table is
365 // created by the linker via the Code Red managed linker script mechanism. It
366 // contains the load address, execution address and length of each RW data
367 // section and the execution and length of each BSS (zero initialized) section.
368 //*****************************************************************************
369 extern unsigned int __data_section_table;
370 extern unsigned int __data_section_table_end;
371 extern unsigned int __bss_section_table;
372 extern unsigned int __bss_section_table_end;
373
374 //*****************************************************************************
375 // Reset entry point for your code.
376 // Sets up a simple runtime environment and initializes the C/C++
377 // library.
378 //*****************************************************************************
379 __attribute__ ((naked, section(".after_vectors.reset")))
ResetISR(void)380 void ResetISR(void) {
381 // Disable interrupts
382 __asm volatile ("cpsid i");
383 // Config VTOR & MSPLIM register
384 __asm volatile ("LDR R0, =0xE000ED08 \n"
385 "STR %0, [R0] \n"
386 "LDR R1, [%0] \n"
387 "MSR MSP, R1 \n"
388 "MSR MSPLIM, %1 \n"
389 :
390 : "r"(g_pfnVectors), "r"(_vStackBase)
391 : "r0", "r1");
392
393 #if defined (__USE_CMSIS)
394 // If __USE_CMSIS defined, then call CMSIS SystemInit code
395 SystemInit();
396
397 #endif // (__USE_CMSIS)
398
399 //
400 // Copy the data sections from flash to SRAM.
401 //
402 unsigned int LoadAddr, ExeAddr, SectionLen;
403 unsigned int *SectionTableAddr;
404
405 // Load base address of Global Section Table
406 SectionTableAddr = &__data_section_table;
407
408 // Copy the data sections from flash to SRAM.
409 while (SectionTableAddr < &__data_section_table_end) {
410 LoadAddr = *SectionTableAddr++;
411 ExeAddr = *SectionTableAddr++;
412 SectionLen = *SectionTableAddr++;
413 data_init(LoadAddr, ExeAddr, SectionLen);
414 }
415
416 // At this point, SectionTableAddr = &__bss_section_table;
417 // Zero fill the bss segment
418 while (SectionTableAddr < &__bss_section_table_end) {
419 ExeAddr = *SectionTableAddr++;
420 SectionLen = *SectionTableAddr++;
421 bss_init(ExeAddr, SectionLen);
422 }
423
424 #if defined (__cplusplus)
425 //
426 // Call C++ library initialisation
427 //
428 __libc_init_array();
429 #endif
430
431 // Reenable interrupts
432 __asm volatile ("cpsie i");
433
434 #if defined (__REDLIB__)
435 // Call the Redlib library, which in turn calls main()
436 __main();
437 #else
438 main();
439 #endif
440
441 //
442 // main() shouldn't return, but if it does, we'll just enter an infinite loop
443 //
444 while (1) {
445 ;
446 }
447 }
448
449 //*****************************************************************************
450 // Default core exception handlers. Override the ones here by defining your own
451 // handler routines in your application code.
452 //*****************************************************************************
NMI_Handler(void)453 WEAK_AV void NMI_Handler(void)
454 { while(1) {}
455 }
456
HardFault_Handler(void)457 WEAK_AV void HardFault_Handler(void)
458 { while(1) {}
459 }
460
MemManage_Handler(void)461 WEAK_AV void MemManage_Handler(void)
462 { while(1) {}
463 }
464
BusFault_Handler(void)465 WEAK_AV void BusFault_Handler(void)
466 { while(1) {}
467 }
468
UsageFault_Handler(void)469 WEAK_AV void UsageFault_Handler(void)
470 { while(1) {}
471 }
472
SecureFault_Handler(void)473 WEAK_AV void SecureFault_Handler(void)
474 { while(1) {}
475 }
476
SVC_Handler(void)477 WEAK_AV void SVC_Handler(void)
478 { while(1) {}
479 }
480
DebugMon_Handler(void)481 WEAK_AV void DebugMon_Handler(void)
482 { while(1) {}
483 }
484
PendSV_Handler(void)485 WEAK_AV void PendSV_Handler(void)
486 { while(1) {}
487 }
488
SysTick_Handler(void)489 WEAK_AV void SysTick_Handler(void)
490 { while(1) {}
491 }
492
493 //*****************************************************************************
494 // Processor ends up here if an unexpected interrupt occurs or a specific
495 // handler is not present in the application code.
496 //*****************************************************************************
IntDefaultHandler(void)497 WEAK_AV void IntDefaultHandler(void)
498 { while(1) {}
499 }
500
501 //*****************************************************************************
502 // Default application exception handlers. Override the ones here by defining
503 // your own handler routines in your application code. These routines call
504 // driver exception handlers or IntDefaultHandler() if no driver exception
505 // handler is included.
506 //*****************************************************************************
WDT0_IRQHandler(void)507 WEAK void WDT0_IRQHandler(void)
508 { WDT0_DriverIRQHandler();
509 }
510
DMA0_IRQHandler(void)511 WEAK void DMA0_IRQHandler(void)
512 { DMA0_DriverIRQHandler();
513 }
514
GPIO_INTA_IRQHandler(void)515 WEAK void GPIO_INTA_IRQHandler(void)
516 { GPIO_INTA_DriverIRQHandler();
517 }
518
GPIO_INTB_IRQHandler(void)519 WEAK void GPIO_INTB_IRQHandler(void)
520 { GPIO_INTB_DriverIRQHandler();
521 }
522
PIN_INT0_IRQHandler(void)523 WEAK void PIN_INT0_IRQHandler(void)
524 { PIN_INT0_DriverIRQHandler();
525 }
526
PIN_INT1_IRQHandler(void)527 WEAK void PIN_INT1_IRQHandler(void)
528 { PIN_INT1_DriverIRQHandler();
529 }
530
PIN_INT2_IRQHandler(void)531 WEAK void PIN_INT2_IRQHandler(void)
532 { PIN_INT2_DriverIRQHandler();
533 }
534
PIN_INT3_IRQHandler(void)535 WEAK void PIN_INT3_IRQHandler(void)
536 { PIN_INT3_DriverIRQHandler();
537 }
538
UTICK0_IRQHandler(void)539 WEAK void UTICK0_IRQHandler(void)
540 { UTICK0_DriverIRQHandler();
541 }
542
MRT0_IRQHandler(void)543 WEAK void MRT0_IRQHandler(void)
544 { MRT0_DriverIRQHandler();
545 }
546
CTIMER0_IRQHandler(void)547 WEAK void CTIMER0_IRQHandler(void)
548 { CTIMER0_DriverIRQHandler();
549 }
550
CTIMER1_IRQHandler(void)551 WEAK void CTIMER1_IRQHandler(void)
552 { CTIMER1_DriverIRQHandler();
553 }
554
SCT0_IRQHandler(void)555 WEAK void SCT0_IRQHandler(void)
556 { SCT0_DriverIRQHandler();
557 }
558
CTIMER3_IRQHandler(void)559 WEAK void CTIMER3_IRQHandler(void)
560 { CTIMER3_DriverIRQHandler();
561 }
562
FLEXCOMM0_IRQHandler(void)563 WEAK void FLEXCOMM0_IRQHandler(void)
564 { FLEXCOMM0_DriverIRQHandler();
565 }
566
FLEXCOMM1_IRQHandler(void)567 WEAK void FLEXCOMM1_IRQHandler(void)
568 { FLEXCOMM1_DriverIRQHandler();
569 }
570
FLEXCOMM2_IRQHandler(void)571 WEAK void FLEXCOMM2_IRQHandler(void)
572 { FLEXCOMM2_DriverIRQHandler();
573 }
574
FLEXCOMM3_IRQHandler(void)575 WEAK void FLEXCOMM3_IRQHandler(void)
576 { FLEXCOMM3_DriverIRQHandler();
577 }
578
FLEXCOMM4_IRQHandler(void)579 WEAK void FLEXCOMM4_IRQHandler(void)
580 { FLEXCOMM4_DriverIRQHandler();
581 }
582
FLEXCOMM5_IRQHandler(void)583 WEAK void FLEXCOMM5_IRQHandler(void)
584 { FLEXCOMM5_DriverIRQHandler();
585 }
586
FLEXCOMM14_IRQHandler(void)587 WEAK void FLEXCOMM14_IRQHandler(void)
588 { FLEXCOMM14_DriverIRQHandler();
589 }
590
FLEXCOMM15_IRQHandler(void)591 WEAK void FLEXCOMM15_IRQHandler(void)
592 { FLEXCOMM15_DriverIRQHandler();
593 }
594
ADC0_IRQHandler(void)595 WEAK void ADC0_IRQHandler(void)
596 { ADC0_DriverIRQHandler();
597 }
598
Reserved39_IRQHandler(void)599 WEAK void Reserved39_IRQHandler(void)
600 { Reserved39_DriverIRQHandler();
601 }
602
ACMP_IRQHandler(void)603 WEAK void ACMP_IRQHandler(void)
604 { ACMP_DriverIRQHandler();
605 }
606
DMIC0_IRQHandler(void)607 WEAK void DMIC0_IRQHandler(void)
608 { DMIC0_DriverIRQHandler();
609 }
610
Reserved42_IRQHandler(void)611 WEAK void Reserved42_IRQHandler(void)
612 { Reserved42_DriverIRQHandler();
613 }
614
HYPERVISOR_IRQHandler(void)615 WEAK void HYPERVISOR_IRQHandler(void)
616 { HYPERVISOR_DriverIRQHandler();
617 }
618
SECUREVIOLATION_IRQHandler(void)619 WEAK void SECUREVIOLATION_IRQHandler(void)
620 { SECUREVIOLATION_DriverIRQHandler();
621 }
622
HWVAD0_IRQHandler(void)623 WEAK void HWVAD0_IRQHandler(void)
624 { HWVAD0_DriverIRQHandler();
625 }
626
Reserved46_IRQHandler(void)627 WEAK void Reserved46_IRQHandler(void)
628 { Reserved46_DriverIRQHandler();
629 }
630
RNG_IRQHandler(void)631 WEAK void RNG_IRQHandler(void)
632 { RNG_DriverIRQHandler();
633 }
634
RTC_IRQHandler(void)635 WEAK void RTC_IRQHandler(void)
636 { RTC_DriverIRQHandler();
637 }
638
DSPWAKE_IRQHandler(void)639 WEAK void DSPWAKE_IRQHandler(void)
640 { DSPWAKE_DriverIRQHandler();
641 }
642
MU_A_IRQHandler(void)643 WEAK void MU_A_IRQHandler(void)
644 { MU_A_DriverIRQHandler();
645 }
646
PIN_INT4_IRQHandler(void)647 WEAK void PIN_INT4_IRQHandler(void)
648 { PIN_INT4_DriverIRQHandler();
649 }
650
PIN_INT5_IRQHandler(void)651 WEAK void PIN_INT5_IRQHandler(void)
652 { PIN_INT5_DriverIRQHandler();
653 }
654
PIN_INT6_IRQHandler(void)655 WEAK void PIN_INT6_IRQHandler(void)
656 { PIN_INT6_DriverIRQHandler();
657 }
658
PIN_INT7_IRQHandler(void)659 WEAK void PIN_INT7_IRQHandler(void)
660 { PIN_INT7_DriverIRQHandler();
661 }
662
CTIMER2_IRQHandler(void)663 WEAK void CTIMER2_IRQHandler(void)
664 { CTIMER2_DriverIRQHandler();
665 }
666
CTIMER4_IRQHandler(void)667 WEAK void CTIMER4_IRQHandler(void)
668 { CTIMER4_DriverIRQHandler();
669 }
670
OS_EVENT_IRQHandler(void)671 WEAK void OS_EVENT_IRQHandler(void)
672 { OS_EVENT_DriverIRQHandler();
673 }
674
FLEXSPI_IRQHandler(void)675 WEAK void FLEXSPI_IRQHandler(void)
676 { FLEXSPI_DriverIRQHandler();
677 }
678
FLEXCOMM6_IRQHandler(void)679 WEAK void FLEXCOMM6_IRQHandler(void)
680 { FLEXCOMM6_DriverIRQHandler();
681 }
682
FLEXCOMM7_IRQHandler(void)683 WEAK void FLEXCOMM7_IRQHandler(void)
684 { FLEXCOMM7_DriverIRQHandler();
685 }
686
USDHC0_IRQHandler(void)687 WEAK void USDHC0_IRQHandler(void)
688 { USDHC0_DriverIRQHandler();
689 }
690
USDHC1_IRQHandler(void)691 WEAK void USDHC1_IRQHandler(void)
692 { USDHC1_DriverIRQHandler();
693 }
694
SGPIO_INTA_IRQHandler(void)695 WEAK void SGPIO_INTA_IRQHandler(void)
696 { SGPIO_INTA_DriverIRQHandler();
697 }
698
SGPIO_INTB_IRQHandler(void)699 WEAK void SGPIO_INTB_IRQHandler(void)
700 { SGPIO_INTB_DriverIRQHandler();
701 }
702
I3C0_IRQHandler(void)703 WEAK void I3C0_IRQHandler(void)
704 { I3C0_DriverIRQHandler();
705 }
706
USB_IRQHandler(void)707 WEAK void USB_IRQHandler(void)
708 { USB_DriverIRQHandler();
709 }
710
USB_WAKEUP_IRQHandler(void)711 WEAK void USB_WAKEUP_IRQHandler(void)
712 { USB_WAKEUP_DriverIRQHandler();
713 }
714
WDT1_IRQHandler(void)715 WEAK void WDT1_IRQHandler(void)
716 { WDT1_DriverIRQHandler();
717 }
718
USBPHY_DCD_IRQHandler(void)719 WEAK void USBPHY_DCD_IRQHandler(void)
720 { USBPHY_DCD_DriverIRQHandler();
721 }
722
DMA1_IRQHandler(void)723 WEAK void DMA1_IRQHandler(void)
724 { DMA1_DriverIRQHandler();
725 }
726
PUF_IRQHandler(void)727 WEAK void PUF_IRQHandler(void)
728 { PUF_DriverIRQHandler();
729 }
730
POWERQUAD_IRQHandler(void)731 WEAK void POWERQUAD_IRQHandler(void)
732 { POWERQUAD_DriverIRQHandler();
733 }
734
CASPER_IRQHandler(void)735 WEAK void CASPER_IRQHandler(void)
736 { CASPER_DriverIRQHandler();
737 }
738
PMC_PMIC_IRQHandler(void)739 WEAK void PMC_PMIC_IRQHandler(void)
740 { PMC_PMIC_DriverIRQHandler();
741 }
742
HASHCRYPT_IRQHandler(void)743 WEAK void HASHCRYPT_IRQHandler(void)
744 { HASHCRYPT_DriverIRQHandler();
745 }
746
747 //*****************************************************************************
748
749 #if defined (DEBUG)
750 #pragma GCC pop_options
751 #endif // (DEBUG)
752