Callisto4Bootloader: startup/startup_mimxrt1062.c Source File

Callisto4Bootloader

startup_mimxrt1062.c
Go to the documentation of this file.
1 //*****************************************************************************
2 // MIMXRT1062 startup code for use with MCUXpresso IDE
3 //
4 // Version : 190919
5 //*****************************************************************************
6 //
7 // Copyright 2016-2019 NXP
8 // All rights reserved.
9 //
10 // SPDX-License-Identifier: BSD-3-Clause
11 //*****************************************************************************
12 #define ALLOCATE_FLEXRAM
13 #ifdef ALLOCATE_FLEXRAM
14 #include "fsl_flexram.h"
15 #include "fsl_flexram_allocate.h"
16 //
17 // #defines for FlexRAM OC SDRAM
18 //
19 #define __FLEXRAM_BANK_SIZE_KB (32U)
20
21 // Use these to divide the FlexRAM OCRAM up. They must be in powers of two.
22 // Make them multiples of the bank sizes else we are wasting RAM.
23 #define __FLEXRAM_ALLOC_OCRAM_SIZE_KB 0U // Use all of the FlexRAM controlled OCRAM as ITCM and DTCM.
24 #define __FLEXRAM_ALLOC_ITCM_SIZE_KB 256U
25 #define __FLEXRAM_ALLOC_DTCM_SIZE_KB 256U
26
27 // Using the sizes specified above define the number of banks allocated to each region.
28 #define __OCRAM_ALLOCATE_BANK_NUM (__FLEXRAM_ALLOC_OCRAM_SIZE_KB / __FLEXRAM_BANK_SIZE_KB)
29 #define __ITCM_ALLOCATE_BANK_NUM (__FLEXRAM_ALLOC_ITCM_SIZE_KB / __FLEXRAM_BANK_SIZE_KB)
30 #define __DTCM_ALLOCATE_BANK_NUM (__FLEXRAM_ALLOC_DTCM_SIZE_KB / __FLEXRAM_BANK_SIZE_KB)
31 #endif // ALLOCATE_FLEXRAM
32
33 #if defined (DEBUG)
34 #pragma GCC push_options
35 #pragma GCC optimize ("Og")
36 #endif // (DEBUG)
37
38 #if defined (__cplusplus)
39 #ifdef __REDLIB__
40 #error Redlib does not support C++
41 #else
42 //*****************************************************************************
43 //
44 // The entry point for the C++ library startup
45 //
46 //*****************************************************************************
47 extern "C" {
48 extern void __libc_init_array(void);
49 }
50 #endif
51 #endif
52
53 #define WEAK __attribute__ ((weak))
54 #define WEAK_AV __attribute__ ((weak, section(".after_vectors")))
55 #define ALIAS(f) __attribute__ ((weak, alias (#f)))
56
57 //*****************************************************************************
58 #if defined (__cplusplus)
59 extern "C" {
60 #endif
61
62 //*****************************************************************************
63 // Variable to store CRP value in. Will be placed automatically
64 // by the linker when "Enable Code Read Protect" selected.
65 // See crp.h header for more information
66 //*****************************************************************************
67 //*****************************************************************************
68 // Declaration of external SystemInit function
69 //*****************************************************************************
70 #if defined (__USE_CMSIS)
71 extern void SystemInit(void);
72 #endif // (__USE_CMSIS)
73
74 //*****************************************************************************
75 // Forward declaration of the core exception handlers.
76 // When the application defines a handler (with the same name), this will
77 // automatically take precedence over these weak definitions.
78 // If your application is a C++ one, then any interrupt handlers defined
79 // in C++ files within in your main application will need to have C linkage
80 // rather than C++ linkage. To do this, make sure that you are using extern "C"
81 // { .... } around the interrupt handler within your main application code.
82 //*****************************************************************************
83 void ResetISR(void);
84 WEAK void NMI_Handler(void);
85 WEAK void HardFault_Handler(void);
86 WEAK void SVC_Handler(void);
87 WEAK void PendSV_Handler(void);
88 WEAK void SysTick_Handler(void);
89 WEAK void IntDefaultHandler(void);
90
91 //*****************************************************************************
92 // Forward declaration of the application IRQ handlers. When the application
93 // defines a handler (with the same name), this will automatically take
94 // precedence over weak definitions below
95 //*****************************************************************************
96 WEAK void DMA0_DMA16_IRQHandler(void);
97 WEAK void DMA1_DMA17_IRQHandler(void);
98 WEAK void DMA2_DMA18_IRQHandler(void);
99 WEAK void DMA3_DMA19_IRQHandler(void);
100 WEAK void DMA4_DMA20_IRQHandler(void);
101 WEAK void DMA5_DMA21_IRQHandler(void);
102 WEAK void DMA6_DMA22_IRQHandler(void);
103 WEAK void DMA7_DMA23_IRQHandler(void);
104 WEAK void DMA8_DMA24_IRQHandler(void);
105 WEAK void DMA9_DMA25_IRQHandler(void);
106 WEAK void DMA10_DMA26_IRQHandler(void);
107 WEAK void DMA11_DMA27_IRQHandler(void);
108 WEAK void DMA12_DMA28_IRQHandler(void);
109 WEAK void DMA13_DMA29_IRQHandler(void);
110 WEAK void DMA14_DMA30_IRQHandler(void);
111 WEAK void DMA15_DMA31_IRQHandler(void);
112 WEAK void DMA_ERROR_IRQHandler(void);
113 WEAK void CTI0_ERROR_IRQHandler(void);
114 WEAK void CTI1_ERROR_IRQHandler(void);
115 WEAK void CORE_IRQHandler(void);
116 WEAK void LPUART1_IRQHandler(void);
117 WEAK void LPUART2_IRQHandler(void);
118 WEAK void LPUART3_IRQHandler(void);
119 WEAK void LPUART4_IRQHandler(void);
120 WEAK void LPUART5_IRQHandler(void);
121 WEAK void LPUART6_IRQHandler(void);
122 WEAK void LPUART7_IRQHandler(void);
123 WEAK void LPUART8_IRQHandler(void);
124 WEAK void LPI2C1_IRQHandler(void);
125 WEAK void LPI2C2_IRQHandler(void);
126 WEAK void LPI2C3_IRQHandler(void);
127 WEAK void LPI2C4_IRQHandler(void);
128 WEAK void LPSPI1_IRQHandler(void);
129 WEAK void LPSPI2_IRQHandler(void);
130 WEAK void LPSPI3_IRQHandler(void);
131 WEAK void LPSPI4_IRQHandler(void);
132 WEAK void CAN1_IRQHandler(void);
133 WEAK void CAN2_IRQHandler(void);
134 WEAK void FLEXRAM_IRQHandler(void);
135 WEAK void KPP_IRQHandler(void);
136 WEAK void TSC_DIG_IRQHandler(void);
137 WEAK void GPR_IRQ_IRQHandler(void);
138 WEAK void LCDIF_IRQHandler(void);
139 WEAK void CSI_IRQHandler(void);
140 WEAK void PXP_IRQHandler(void);
141 WEAK void WDOG2_IRQHandler(void);
142 WEAK void SNVS_HP_WRAPPER_IRQHandler(void);
143 WEAK void SNVS_HP_WRAPPER_TZ_IRQHandler(void);
144 WEAK void SNVS_LP_WRAPPER_IRQHandler(void);
145 WEAK void CSU_IRQHandler(void);
146 WEAK void DCP_IRQHandler(void);
147 WEAK void DCP_VMI_IRQHandler(void);
148 WEAK void Reserved68_IRQHandler(void);
149 WEAK void TRNG_IRQHandler(void);
150 WEAK void SJC_IRQHandler(void);
151 WEAK void BEE_IRQHandler(void);
152 WEAK void SAI1_IRQHandler(void);
153 WEAK void SAI2_IRQHandler(void);
154 WEAK void SAI3_RX_IRQHandler(void);
155 WEAK void SAI3_TX_IRQHandler(void);
156 WEAK void SPDIF_IRQHandler(void);
157 WEAK void PMU_EVENT_IRQHandler(void);
158 WEAK void Reserved78_IRQHandler(void);
159 WEAK void TEMP_LOW_HIGH_IRQHandler(void);
160 WEAK void TEMP_PANIC_IRQHandler(void);
161 WEAK void USB_PHY1_IRQHandler(void);
162 WEAK void USB_PHY2_IRQHandler(void);
163 WEAK void ADC1_IRQHandler(void);
164 WEAK void ADC2_IRQHandler(void);
165 WEAK void DCDC_IRQHandler(void);
166 WEAK void Reserved86_IRQHandler(void);
167 WEAK void Reserved87_IRQHandler(void);
168 WEAK void GPIO1_INT0_IRQHandler(void);
169 WEAK void GPIO1_INT1_IRQHandler(void);
170 WEAK void GPIO1_INT2_IRQHandler(void);
171 WEAK void GPIO1_INT3_IRQHandler(void);
172 WEAK void GPIO1_INT4_IRQHandler(void);
173 WEAK void GPIO1_INT5_IRQHandler(void);
174 WEAK void GPIO1_INT6_IRQHandler(void);
175 WEAK void GPIO1_INT7_IRQHandler(void);
176 WEAK void GPIO1_Combined_0_15_IRQHandler(void);
177 WEAK void GPIO1_Combined_16_31_IRQHandler(void);
178 WEAK void GPIO2_Combined_0_15_IRQHandler(void);
179 WEAK void GPIO2_Combined_16_31_IRQHandler(void);
180 WEAK void GPIO3_Combined_0_15_IRQHandler(void);
181 WEAK void GPIO3_Combined_16_31_IRQHandler(void);
182 WEAK void GPIO4_Combined_0_15_IRQHandler(void);
183 WEAK void GPIO4_Combined_16_31_IRQHandler(void);
184 WEAK void GPIO5_Combined_0_15_IRQHandler(void);
185 WEAK void GPIO5_Combined_16_31_IRQHandler(void);
186 WEAK void FLEXIO1_IRQHandler(void);
187 WEAK void FLEXIO2_IRQHandler(void);
188 WEAK void WDOG1_IRQHandler(void);
189 WEAK void RTWDOG_IRQHandler(void);
190 WEAK void EWM_IRQHandler(void);
191 WEAK void CCM_1_IRQHandler(void);
192 WEAK void CCM_2_IRQHandler(void);
193 WEAK void GPC_IRQHandler(void);
194 WEAK void SRC_IRQHandler(void);
195 WEAK void Reserved115_IRQHandler(void);
196 WEAK void GPT1_IRQHandler(void);
197 WEAK void GPT2_IRQHandler(void);
198 WEAK void PWM1_0_IRQHandler(void);
199 WEAK void PWM1_1_IRQHandler(void);
200 WEAK void PWM1_2_IRQHandler(void);
201 WEAK void PWM1_3_IRQHandler(void);
202 WEAK void PWM1_FAULT_IRQHandler(void);
203 WEAK void FLEXSPI2_IRQHandler(void);
204 WEAK void FLEXSPI_IRQHandler(void);
205 WEAK void SEMC_IRQHandler(void);
206 WEAK void USDHC1_IRQHandler(void);
207 WEAK void USDHC2_IRQHandler(void);
208 WEAK void USB_OTG2_IRQHandler(void);
209 WEAK void USB_OTG1_IRQHandler(void);
210 WEAK void ENET_IRQHandler(void);
211 WEAK void ENET_1588_Timer_IRQHandler(void);
212 WEAK void XBAR1_IRQ_0_1_IRQHandler(void);
213 WEAK void XBAR1_IRQ_2_3_IRQHandler(void);
214 WEAK void ADC_ETC_IRQ0_IRQHandler(void);
215 WEAK void ADC_ETC_IRQ1_IRQHandler(void);
216 WEAK void ADC_ETC_IRQ2_IRQHandler(void);
217 WEAK void ADC_ETC_ERROR_IRQ_IRQHandler(void);
218 WEAK void PIT_IRQHandler(void);
219 WEAK void ACMP1_IRQHandler(void);
220 WEAK void ACMP2_IRQHandler(void);
221 WEAK void ACMP3_IRQHandler(void);
222 WEAK void ACMP4_IRQHandler(void);
223 WEAK void Reserved143_IRQHandler(void);
224 WEAK void Reserved144_IRQHandler(void);
225 WEAK void ENC1_IRQHandler(void);
226 WEAK void ENC2_IRQHandler(void);
227 WEAK void ENC3_IRQHandler(void);
228 WEAK void ENC4_IRQHandler(void);
229 WEAK void TMR1_IRQHandler(void);
230 WEAK void TMR2_IRQHandler(void);
231 WEAK void TMR3_IRQHandler(void);
232 WEAK void TMR4_IRQHandler(void);
233 WEAK void PWM2_0_IRQHandler(void);
234 WEAK void PWM2_1_IRQHandler(void);
235 WEAK void PWM2_2_IRQHandler(void);
236 WEAK void PWM2_3_IRQHandler(void);
237 WEAK void PWM2_FAULT_IRQHandler(void);
238 WEAK void PWM3_0_IRQHandler(void);
239 WEAK void PWM3_1_IRQHandler(void);
240 WEAK void PWM3_2_IRQHandler(void);
241 WEAK void PWM3_3_IRQHandler(void);
242 WEAK void PWM3_FAULT_IRQHandler(void);
243 WEAK void PWM4_0_IRQHandler(void);
244 WEAK void PWM4_1_IRQHandler(void);
245 WEAK void PWM4_2_IRQHandler(void);
246 WEAK void PWM4_3_IRQHandler(void);
247 WEAK void PWM4_FAULT_IRQHandler(void);
248 WEAK void ENET2_IRQHandler(void);
249 WEAK void ENET2_1588_Timer_IRQHandler(void);
250 WEAK void CAN3_IRQHandler(void);
251 WEAK void Reserved171_IRQHandler(void);
252 WEAK void FLEXIO3_IRQHandler(void);
253 WEAK void GPIO6_7_8_9_IRQHandler(void);
254
255 //*****************************************************************************
256 // Forward declaration of the driver IRQ handlers. These are aliased
257 // to the IntDefaultHandler, which is a 'forever' loop. When the driver
258 // defines a handler (with the same name), this will automatically take
259 // precedence over these weak definitions
260 //*****************************************************************************
261 void DMA0_DMA16_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
262 void DMA1_DMA17_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
263 void DMA2_DMA18_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
264 void DMA3_DMA19_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
265 void DMA4_DMA20_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
266 void DMA5_DMA21_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
267 void DMA6_DMA22_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
268 void DMA7_DMA23_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
269 void DMA8_DMA24_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
270 void DMA9_DMA25_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
271 void DMA10_DMA26_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
272 void DMA11_DMA27_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
273 void DMA12_DMA28_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
274 void DMA13_DMA29_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
275 void DMA14_DMA30_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
276 void DMA15_DMA31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
277 void DMA_ERROR_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
278 void CTI0_ERROR_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
279 void CTI1_ERROR_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
280 void CORE_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
281 void LPUART1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
282 void LPUART2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
283 void LPUART3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
284 void LPUART4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
285 void LPUART5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
286 void LPUART6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
287 void LPUART7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
288 void LPUART8_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
289 void LPI2C1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
290 void LPI2C2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
291 void LPI2C3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
292 void LPI2C4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
293 void LPSPI1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
294 void LPSPI2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
295 void LPSPI3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
296 void LPSPI4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
297 void CAN1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
298 void CAN2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
299 void FLEXRAM_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
300 void KPP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
301 void TSC_DIG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
302 void GPR_IRQ_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
303 void LCDIF_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
304 void CSI_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
305 void PXP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
306 void WDOG2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
307 void SNVS_HP_WRAPPER_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
308 void SNVS_HP_WRAPPER_TZ_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
309 void SNVS_LP_WRAPPER_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
310 void CSU_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
311 void DCP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
312 void DCP_VMI_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
313 void Reserved68_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
314 void TRNG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
315 void SJC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
316 void BEE_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
317 void SAI1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
318 void SAI2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
319 void SAI3_RX_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
320 void SAI3_TX_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
321 void SPDIF_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
322 void PMU_EVENT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
323 void Reserved78_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
324 void TEMP_LOW_HIGH_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
325 void TEMP_PANIC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
326 void USB_PHY1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
327 void USB_PHY2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
328 void ADC1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
329 void ADC2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
330 void DCDC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
331 void Reserved86_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
332 void Reserved87_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
333 void GPIO1_INT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
334 void GPIO1_INT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
335 void GPIO1_INT2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
336 void GPIO1_INT3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
337 void GPIO1_INT4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
338 void GPIO1_INT5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
339 void GPIO1_INT6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
340 void GPIO1_INT7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
341 void GPIO1_Combined_0_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
342 void GPIO1_Combined_16_31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
343 void GPIO2_Combined_0_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
344 void GPIO2_Combined_16_31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
345 void GPIO3_Combined_0_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
346 void GPIO3_Combined_16_31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
347 void GPIO4_Combined_0_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
348 void GPIO4_Combined_16_31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
349 void GPIO5_Combined_0_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
350 void GPIO5_Combined_16_31_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
351 void FLEXIO1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
352 void FLEXIO2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
353 void WDOG1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
354 void RTWDOG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
355 void EWM_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
356 void CCM_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
357 void CCM_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
358 void GPC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
359 void SRC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
360 void Reserved115_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
361 void GPT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
362 void GPT2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
363 void PWM1_0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
364 void PWM1_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
365 void PWM1_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
366 void PWM1_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
367 void PWM1_FAULT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
368 void FLEXSPI2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
369 void FLEXSPI_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
370 void SEMC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
371 void USDHC1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
372 void USDHC2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
373 void USB_OTG2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
374 void USB_OTG1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
375 void ENET_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
376 void ENET_1588_Timer_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
377 void XBAR1_IRQ_0_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
378 void XBAR1_IRQ_2_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
379 void ADC_ETC_IRQ0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
380 void ADC_ETC_IRQ1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
381 void ADC_ETC_IRQ2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
382 void ADC_ETC_ERROR_IRQ_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
383 void PIT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
384 void ACMP1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
385 void ACMP2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
386 void ACMP3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
387 void ACMP4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
388 void Reserved143_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
389 void Reserved144_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
390 void ENC1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
391 void ENC2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
392 void ENC3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
393 void ENC4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
394 void TMR1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
395 void TMR2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
396 void TMR3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
397 void TMR4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
398 void PWM2_0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
399 void PWM2_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
400 void PWM2_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
401 void PWM2_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
402 void PWM2_FAULT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
403 void PWM3_0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
404 void PWM3_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
405 void PWM3_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
406 void PWM3_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
407 void PWM3_FAULT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
408 void PWM4_0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
409 void PWM4_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
410 void PWM4_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
411 void PWM4_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
412 void PWM4_FAULT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
413 void ENET2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
414 void ENET2_1588_Timer_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
415 void CAN3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
416 void Reserved171_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
417 void FLEXIO3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
418 void GPIO6_7_8_9_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
419
420 //*****************************************************************************
421 // The entry point for the application.
422 // __main() is the entry point for Redlib based applications
423 // main() is the entry point for Newlib based applications
424 //*****************************************************************************
425 #if defined (__REDLIB__)
426 extern void __main(void);
427 #endif
428 extern int main(void);
429
430 //*****************************************************************************
431 // External declaration for the pointer to the stack top from the Linker Script
432 //*****************************************************************************
433 extern void _vStackTop(void);
434 //*****************************************************************************
435 #if defined (__cplusplus)
436 } // extern "C"
437 #endif
438 //*****************************************************************************
439 // The vector table.
440 // This relies on the linker script to place at correct location in memory.
441 //*****************************************************************************
442 extern void (* const g_pfnVectors[])(void);
443 extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));
444
445 __attribute__ ((used, section(".isr_vector")))
446 void (* const g_pfnVectors[])(void) = {
447 // Core Level - CM7
448 &_vStackTop, // The initial stack pointer
449 ResetISR, // The reset handler
450 NMI_Handler, // The NMI handler
451 HardFault_Handler, // The hard fault handler
452 0, // Reserved
453 0, // Reserved
454 0, // Reserved
455 0, // Reserved
456 0, // Reserved
457 0, // Reserved
458 0, // Reserved
459 SVC_Handler, // SVCall handler
460 0, // Reserved
461 0, // Reserved
462 PendSV_Handler, // The PendSV handler
463 SysTick_Handler, // The SysTick handler
464
465 // Chip Level - MIMXRT1062
466 DMA0_DMA16_IRQHandler, // 16 : DMA channel 0/16 transfer complete
467 DMA1_DMA17_IRQHandler, // 17 : DMA channel 1/17 transfer complete
468 DMA2_DMA18_IRQHandler, // 18 : DMA channel 2/18 transfer complete
469 DMA3_DMA19_IRQHandler, // 19 : DMA channel 3/19 transfer complete
470 DMA4_DMA20_IRQHandler, // 20 : DMA channel 4/20 transfer complete
471 DMA5_DMA21_IRQHandler, // 21 : DMA channel 5/21 transfer complete
472 DMA6_DMA22_IRQHandler, // 22 : DMA channel 6/22 transfer complete
473 DMA7_DMA23_IRQHandler, // 23 : DMA channel 7/23 transfer complete
474 DMA8_DMA24_IRQHandler, // 24 : DMA channel 8/24 transfer complete
475 DMA9_DMA25_IRQHandler, // 25 : DMA channel 9/25 transfer complete
476 DMA10_DMA26_IRQHandler, // 26 : DMA channel 10/26 transfer complete
477 DMA11_DMA27_IRQHandler, // 27 : DMA channel 11/27 transfer complete
478 DMA12_DMA28_IRQHandler, // 28 : DMA channel 12/28 transfer complete
479 DMA13_DMA29_IRQHandler, // 29 : DMA channel 13/29 transfer complete
480 DMA14_DMA30_IRQHandler, // 30 : DMA channel 14/30 transfer complete
481 DMA15_DMA31_IRQHandler, // 31 : DMA channel 15/31 transfer complete
482 DMA_ERROR_IRQHandler, // 32 : DMA error interrupt channels 0-15 / 16-31
483 CTI0_ERROR_IRQHandler, // 33 : CTI0_Error
484 CTI1_ERROR_IRQHandler, // 34 : CTI1_Error
485 CORE_IRQHandler, // 35 : CorePlatform exception IRQ
486 LPUART1_IRQHandler, // 36 : LPUART1 TX interrupt and RX interrupt
487 LPUART2_IRQHandler, // 37 : LPUART2 TX interrupt and RX interrupt
488 LPUART3_IRQHandler, // 38 : LPUART3 TX interrupt and RX interrupt
489 LPUART4_IRQHandler, // 39 : LPUART4 TX interrupt and RX interrupt
490 LPUART5_IRQHandler, // 40 : LPUART5 TX interrupt and RX interrupt
491 LPUART6_IRQHandler, // 41 : LPUART6 TX interrupt and RX interrupt
492 LPUART7_IRQHandler, // 42 : LPUART7 TX interrupt and RX interrupt
493 LPUART8_IRQHandler, // 43 : LPUART8 TX interrupt and RX interrupt
494 LPI2C1_IRQHandler, // 44 : LPI2C1 interrupt
495 LPI2C2_IRQHandler, // 45 : LPI2C2 interrupt
496 LPI2C3_IRQHandler, // 46 : LPI2C3 interrupt
497 LPI2C4_IRQHandler, // 47 : LPI2C4 interrupt
498 LPSPI1_IRQHandler, // 48 : LPSPI1 single interrupt vector for all sources
499 LPSPI2_IRQHandler, // 49 : LPSPI2 single interrupt vector for all sources
500 LPSPI3_IRQHandler, // 50 : LPSPI3 single interrupt vector for all sources
501 LPSPI4_IRQHandler, // 51 : LPSPI4 single interrupt vector for all sources
502 CAN1_IRQHandler, // 52 : CAN1 interrupt
503 CAN2_IRQHandler, // 53 : CAN2 interrupt
504 FLEXRAM_IRQHandler, // 54 : FlexRAM address out of range Or access hit IRQ
505 KPP_IRQHandler, // 55 : Keypad nterrupt
506 TSC_DIG_IRQHandler, // 56 : TSC interrupt
507 GPR_IRQ_IRQHandler, // 57 : GPR interrupt
508 LCDIF_IRQHandler, // 58 : LCDIF interrupt
509 CSI_IRQHandler, // 59 : CSI interrupt
510 PXP_IRQHandler, // 60 : PXP interrupt
511 WDOG2_IRQHandler, // 61 : WDOG2 interrupt
512 SNVS_HP_WRAPPER_IRQHandler, // 62 : SRTC Consolidated Interrupt. Non TZ
513 SNVS_HP_WRAPPER_TZ_IRQHandler, // 63 : SRTC Security Interrupt. TZ
514 SNVS_LP_WRAPPER_IRQHandler, // 64 : ON-OFF button press shorter than 5 secs (pulse event)
515 CSU_IRQHandler, // 65 : CSU interrupt
516 DCP_IRQHandler, // 66 : DCP_IRQ interrupt
517 DCP_VMI_IRQHandler, // 67 : DCP_VMI_IRQ interrupt
518 Reserved68_IRQHandler, // 68 : Reserved interrupt
519 TRNG_IRQHandler, // 69 : TRNG interrupt
520 SJC_IRQHandler, // 70 : SJC interrupt
521 BEE_IRQHandler, // 71 : BEE interrupt
522 SAI1_IRQHandler, // 72 : SAI1 interrupt
523 SAI2_IRQHandler, // 73 : SAI1 interrupt
524 SAI3_RX_IRQHandler, // 74 : SAI3 interrupt
525 SAI3_TX_IRQHandler, // 75 : SAI3 interrupt
526 SPDIF_IRQHandler, // 76 : SPDIF interrupt
527 PMU_EVENT_IRQHandler, // 77 : Brown-out event interrupt
528 Reserved78_IRQHandler, // 78 : Reserved interrupt
529 TEMP_LOW_HIGH_IRQHandler, // 79 : TempSensor low/high interrupt
530 TEMP_PANIC_IRQHandler, // 80 : TempSensor panic interrupt
531 USB_PHY1_IRQHandler, // 81 : USBPHY (UTMI0), Interrupt
532 USB_PHY2_IRQHandler, // 82 : USBPHY (UTMI1), Interrupt
533 ADC1_IRQHandler, // 83 : ADC1 interrupt
534 ADC2_IRQHandler, // 84 : ADC2 interrupt
535 DCDC_IRQHandler, // 85 : DCDC interrupt
536 Reserved86_IRQHandler, // 86 : Reserved interrupt
537 Reserved87_IRQHandler, // 87 : Reserved interrupt
538 GPIO1_INT0_IRQHandler, // 88 : Active HIGH Interrupt from INT0 from GPIO
539 GPIO1_INT1_IRQHandler, // 89 : Active HIGH Interrupt from INT1 from GPIO
540 GPIO1_INT2_IRQHandler, // 90 : Active HIGH Interrupt from INT2 from GPIO
541 GPIO1_INT3_IRQHandler, // 91 : Active HIGH Interrupt from INT3 from GPIO
542 GPIO1_INT4_IRQHandler, // 92 : Active HIGH Interrupt from INT4 from GPIO
543 GPIO1_INT5_IRQHandler, // 93 : Active HIGH Interrupt from INT5 from GPIO
544 GPIO1_INT6_IRQHandler, // 94 : Active HIGH Interrupt from INT6 from GPIO
545 GPIO1_INT7_IRQHandler, // 95 : Active HIGH Interrupt from INT7 from GPIO
546 GPIO1_Combined_0_15_IRQHandler, // 96 : Combined interrupt indication for GPIO1 signal 0 throughout 15
547 GPIO1_Combined_16_31_IRQHandler, // 97 : Combined interrupt indication for GPIO1 signal 16 throughout 31
548 GPIO2_Combined_0_15_IRQHandler, // 98 : Combined interrupt indication for GPIO2 signal 0 throughout 15
549 GPIO2_Combined_16_31_IRQHandler, // 99 : Combined interrupt indication for GPIO2 signal 16 throughout 31
550 GPIO3_Combined_0_15_IRQHandler, // 100: Combined interrupt indication for GPIO3 signal 0 throughout 15
551 GPIO3_Combined_16_31_IRQHandler, // 101: Combined interrupt indication for GPIO3 signal 16 throughout 31
552 GPIO4_Combined_0_15_IRQHandler, // 102: Combined interrupt indication for GPIO4 signal 0 throughout 15
553 GPIO4_Combined_16_31_IRQHandler, // 103: Combined interrupt indication for GPIO4 signal 16 throughout 31
554 GPIO5_Combined_0_15_IRQHandler, // 104: Combined interrupt indication for GPIO5 signal 0 throughout 15
555 GPIO5_Combined_16_31_IRQHandler, // 105: Combined interrupt indication for GPIO5 signal 16 throughout 31
556 FLEXIO1_IRQHandler, // 106: FLEXIO1 interrupt
557 FLEXIO2_IRQHandler, // 107: FLEXIO2 interrupt
558 WDOG1_IRQHandler, // 108: WDOG1 interrupt
559 RTWDOG_IRQHandler, // 109: RTWDOG interrupt
560 EWM_IRQHandler, // 110: EWM interrupt
561 CCM_1_IRQHandler, // 111: CCM IRQ1 interrupt
562 CCM_2_IRQHandler, // 112: CCM IRQ2 interrupt
563 GPC_IRQHandler, // 113: GPC interrupt
564 SRC_IRQHandler, // 114: SRC interrupt
565 Reserved115_IRQHandler, // 115: Reserved interrupt
566 GPT1_IRQHandler, // 116: GPT1 interrupt
567 GPT2_IRQHandler, // 117: GPT2 interrupt
568 PWM1_0_IRQHandler, // 118: PWM1 capture 0, compare 0, or reload 0 interrupt
569 PWM1_1_IRQHandler, // 119: PWM1 capture 1, compare 1, or reload 0 interrupt
570 PWM1_2_IRQHandler, // 120: PWM1 capture 2, compare 2, or reload 0 interrupt
571 PWM1_3_IRQHandler, // 121: PWM1 capture 3, compare 3, or reload 0 interrupt
572 PWM1_FAULT_IRQHandler, // 122: PWM1 fault or reload error interrupt
573 FLEXSPI2_IRQHandler, // 123: FlexSPI2 interrupt
574 FLEXSPI_IRQHandler, // 124: FlexSPI0 interrupt
575 SEMC_IRQHandler, // 125: Reserved interrupt
576 USDHC1_IRQHandler, // 126: USDHC1 interrupt
577 USDHC2_IRQHandler, // 127: USDHC2 interrupt
578 USB_OTG2_IRQHandler, // 128: USBO2 USB OTG2
579 USB_OTG1_IRQHandler, // 129: USBO2 USB OTG1
580 ENET_IRQHandler, // 130: ENET interrupt
581 ENET_1588_Timer_IRQHandler, // 131: ENET_1588_Timer interrupt
582 XBAR1_IRQ_0_1_IRQHandler, // 132: XBAR1 interrupt
583 XBAR1_IRQ_2_3_IRQHandler, // 133: XBAR1 interrupt
584 ADC_ETC_IRQ0_IRQHandler, // 134: ADCETC IRQ0 interrupt
585 ADC_ETC_IRQ1_IRQHandler, // 135: ADCETC IRQ1 interrupt
586 ADC_ETC_IRQ2_IRQHandler, // 136: ADCETC IRQ2 interrupt
587 ADC_ETC_ERROR_IRQ_IRQHandler, // 137: ADCETC Error IRQ interrupt
588 PIT_IRQHandler, // 138: PIT interrupt
589 ACMP1_IRQHandler, // 139: ACMP interrupt
590 ACMP2_IRQHandler, // 140: ACMP interrupt
591 ACMP3_IRQHandler, // 141: ACMP interrupt
592 ACMP4_IRQHandler, // 142: ACMP interrupt
593 Reserved143_IRQHandler, // 143: Reserved interrupt
594 Reserved144_IRQHandler, // 144: Reserved interrupt
595 ENC1_IRQHandler, // 145: ENC1 interrupt
596 ENC2_IRQHandler, // 146: ENC2 interrupt
597 ENC3_IRQHandler, // 147: ENC3 interrupt
598 ENC4_IRQHandler, // 148: ENC4 interrupt
599 TMR1_IRQHandler, // 149: TMR1 interrupt
600 TMR2_IRQHandler, // 150: TMR2 interrupt
601 TMR3_IRQHandler, // 151: TMR3 interrupt
602 TMR4_IRQHandler, // 152: TMR4 interrupt
603 PWM2_0_IRQHandler, // 153: PWM2 capture 0, compare 0, or reload 0 interrupt
604 PWM2_1_IRQHandler, // 154: PWM2 capture 1, compare 1, or reload 0 interrupt
605 PWM2_2_IRQHandler, // 155: PWM2 capture 2, compare 2, or reload 0 interrupt
606 PWM2_3_IRQHandler, // 156: PWM2 capture 3, compare 3, or reload 0 interrupt
607 PWM2_FAULT_IRQHandler, // 157: PWM2 fault or reload error interrupt
608 PWM3_0_IRQHandler, // 158: PWM3 capture 0, compare 0, or reload 0 interrupt
609 PWM3_1_IRQHandler, // 159: PWM3 capture 1, compare 1, or reload 0 interrupt
610 PWM3_2_IRQHandler, // 160: PWM3 capture 2, compare 2, or reload 0 interrupt
611 PWM3_3_IRQHandler, // 161: PWM3 capture 3, compare 3, or reload 0 interrupt
612 PWM3_FAULT_IRQHandler, // 162: PWM3 fault or reload error interrupt
613 PWM4_0_IRQHandler, // 163: PWM4 capture 0, compare 0, or reload 0 interrupt
614 PWM4_1_IRQHandler, // 164: PWM4 capture 1, compare 1, or reload 0 interrupt
615 PWM4_2_IRQHandler, // 165: PWM4 capture 2, compare 2, or reload 0 interrupt
616 PWM4_3_IRQHandler, // 166: PWM4 capture 3, compare 3, or reload 0 interrupt
617 PWM4_FAULT_IRQHandler, // 167: PWM4 fault or reload error interrupt
618 ENET2_IRQHandler, // 168: ENET2 interrupt
619 ENET2_1588_Timer_IRQHandler, // 169: ENET2_1588_Timer interrupt
620 CAN3_IRQHandler, // 170: CAN3 interrupt
621 Reserved171_IRQHandler, // 171: Reserved interrupt
622 FLEXIO3_IRQHandler, // 172: FLEXIO3 interrupt
623 GPIO6_7_8_9_IRQHandler, // 173: GPIO6, GPIO7, GPIO8, GPIO9 interrupt
624
625 }; /* End of g_pfnVectors */
626
627 //*****************************************************************************
628 // Functions to carry out the initialization of RW and BSS data sections. These
629 // are written as separate functions rather than being inlined within the
630 // ResetISR() function in order to cope with MCUs with multiple banks of
631 // memory.
632 //*****************************************************************************
633 __attribute__ ((section(".after_vectors.init_data")))
634 void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
635 unsigned int *pulDest = (unsigned int*) start;
636 unsigned int *pulSrc = (unsigned int*) romstart;
637 unsigned int loop;
638 for (loop = 0; loop < len; loop = loop + 4)
639 *pulDest++ = *pulSrc++;
640 }
641
642 __attribute__ ((section(".after_vectors.init_bss")))
643 void bss_init(unsigned int start, unsigned int len) {
644 unsigned int *pulDest = (unsigned int*) start;
645 unsigned int loop;
646 for (loop = 0; loop < len; loop = loop + 4)
647 *pulDest++ = 0;
648 }
649
650 //*****************************************************************************
651 // The following symbols are constructs generated by the linker, indicating
652 // the location of various points in the "Global Section Table". This table is
653 // created by the linker via the Code Red managed linker script mechanism. It
654 // contains the load address, execution address and length of each RW data
655 // section and the execution and length of each BSS (zero initialized) section.
656 //*****************************************************************************
657 extern unsigned int __data_section_table;
658 extern unsigned int __data_section_table_end;
659 #if 0
660 extern unsigned int __bss_section_table;
661 #endif
662 extern unsigned int __bss_section_table_end;
663
664 //*****************************************************************************
665 // Reset entry point for your code.
666 // Sets up a simple runtime environment and initializes the C/C++
667 // library.
668 //*****************************************************************************
669 __attribute__ ((section(".after_vectors.reset")))
670 void ResetISR(void) {
671
672 // Disable interrupts
673 __asm volatile ("cpsid i");
674
675
676 #if defined (__USE_CMSIS)
677 // If __USE_CMSIS defined, then call CMSIS SystemInit code
678 SystemInit();
679 #else
680 // Disable Watchdog
681 volatile unsigned int *WDOG1_WCR = (unsigned int *) 0x400B8000;
682 *WDOG1_WCR = *WDOG1_WCR & ~(1 << 2);
683 volatile unsigned int *WDOG2_WCR = (unsigned int *) 0x400D0000;
684 *WDOG2_WCR = *WDOG2_WCR & ~(1 << 2);
685 // Write watchdog update key to unlock
686 *((volatile unsigned int *)0x400BC004) = 0xD928C520;
687 // Set timeout value
688 *((volatile unsigned int *)0x400BC008) = 0xFFFF;
689 // Now disable watchdog via control register
690 volatile unsigned int *RTWDOG_CS = (unsigned int *) 0x400BC000;
691 *RTWDOG_CS = (*RTWDOG_CS & ~(1 << 7)) | (1 << 5);
692
693 #endif // (__USE_CMSIS)
694
695 #ifdef ALLOCATE_FLEXRAM
696 //
697 // Re-allocate ITCM and DTCM memory size
698 // This must be done before data and bss segments are initialised.
699 //
700
701 flexram_allocate_ram_t ramAllocate = {
702 .ocramBankNum = __OCRAM_ALLOCATE_BANK_NUM,
703 .dtcmBankNum = __DTCM_ALLOCATE_BANK_NUM,
704 .itcmBankNum = __ITCM_ALLOCATE_BANK_NUM,
705 };
706
707 (void) FLEXRAM_AllocateRam(&ramAllocate);
708 // Initialise the FlexRAM peripheral that controls access to OCRAM.
709 FLEXRAM_Init(FLEXRAM);
710 #endif
711
712 //
713 // Copy the data sections from flash to SRAM.
714 //
715 unsigned int LoadAddr, ExeAddr, SectionLen;
716 unsigned int *SectionTableAddr;
717
718 // Load base address of Global Section Table
719 SectionTableAddr = &__data_section_table;
720
721 // Copy the data sections from flash to SRAM.
722 while (SectionTableAddr < &__data_section_table_end) {
723 LoadAddr = *SectionTableAddr++;
724 ExeAddr = *SectionTableAddr++;
725 SectionLen = *SectionTableAddr++;
726 data_init(LoadAddr, ExeAddr, SectionLen);
727 }
728
729 // At this point, SectionTableAddr = &__bss_section_table;
730 // Zero fill the bss segment
731 while (SectionTableAddr < &__bss_section_table_end) {
732 ExeAddr = *SectionTableAddr++;
733 SectionLen = *SectionTableAddr++;
734 bss_init(ExeAddr, SectionLen);
735 }
736
737
738 #if !defined (__USE_CMSIS)
739 // Assume that if __USE_CMSIS defined, then CMSIS SystemInit code
740 // will setup the VTOR register
741
742 // Check to see if we are running the code from a non-zero
743 // address (eg RAM, external flash), in which case we need
744 // to modify the VTOR register to tell the CPU that the
745 // vector table is located at a non-0x0 address.
746 unsigned int * pSCB_VTOR = (unsigned int *) 0xE000ED08;
747 if ((unsigned int *)g_pfnVectors!=(unsigned int *) 0x00000000) {
748 *pSCB_VTOR = (unsigned int)g_pfnVectors;
749 }
750 #endif // (__USE_CMSIS)
751 #if defined (__cplusplus)
752 //
753 // Call C++ library initialisation
754 //
755 __libc_init_array();
756 #endif
757
758 // Reenable interrupts
759 __asm volatile ("cpsie i");
760
761 #if defined (__REDLIB__)
762 // Call the Redlib library, which in turn calls main()
763 __main();
764 #else
765 main();
766 #endif
767
768 //
769 // main() shouldn't return, but if it does, we'll just enter an infinite loop
770 //
771 while (1) {
772 ;
773 }
774 }
775
776 //*****************************************************************************
777 // Default core exception handlers. Override the ones here by defining your own
778 // handler routines in your application code.
779 //*****************************************************************************
780 WEAK_AV void NMI_Handler(void)
781 { while(1) {}
782 }
783
784 WEAK_AV void HardFault_Handler(void)
785 { while(1) {}
786 }
787
788 WEAK_AV void SVC_Handler(void)
789 { while(1) {}
790 }
791
792 WEAK_AV void PendSV_Handler(void)
793 { while(1) {}
794 }
795
796 WEAK_AV void SysTick_Handler(void)
797 { while(1) {}
798 }
799
800 //*****************************************************************************
801 // Processor ends up here if an unexpected interrupt occurs or a specific
802 // handler is not present in the application code.
803 //*****************************************************************************
804 WEAK_AV void IntDefaultHandler(void)
805 { while(1) {}
806 }
807
808 //*****************************************************************************
809 // Default application exception handlers. Override the ones here by defining
810 // your own handler routines in your application code. These routines call
811 // driver exception handlers or IntDefaultHandler() if no driver exception
812 // handler is included.
813 //*****************************************************************************
814 WEAK void DMA0_DMA16_IRQHandler(void)
815 { DMA0_DMA16_DriverIRQHandler();
816 }
817
818 WEAK void DMA1_DMA17_IRQHandler(void)
819 { DMA1_DMA17_DriverIRQHandler();
820 }
821
822 WEAK void DMA2_DMA18_IRQHandler(void)
823 { DMA2_DMA18_DriverIRQHandler();
824 }
825
826 WEAK void DMA3_DMA19_IRQHandler(void)
827 { DMA3_DMA19_DriverIRQHandler();
828 }
829
830 WEAK void DMA4_DMA20_IRQHandler(void)
831 { DMA4_DMA20_DriverIRQHandler();
832 }
833
834 WEAK void DMA5_DMA21_IRQHandler(void)
835 { DMA5_DMA21_DriverIRQHandler();
836 }
837
838 WEAK void DMA6_DMA22_IRQHandler(void)
839 { DMA6_DMA22_DriverIRQHandler();
840 }
841
842 WEAK void DMA7_DMA23_IRQHandler(void)
843 { DMA7_DMA23_DriverIRQHandler();
844 }
845
846 WEAK void DMA8_DMA24_IRQHandler(void)
847 { DMA8_DMA24_DriverIRQHandler();
848 }
849
850 WEAK void DMA9_DMA25_IRQHandler(void)
851 { DMA9_DMA25_DriverIRQHandler();
852 }
853
854 WEAK void DMA10_DMA26_IRQHandler(void)
855 { DMA10_DMA26_DriverIRQHandler();
856 }
857
858 WEAK void DMA11_DMA27_IRQHandler(void)
859 { DMA11_DMA27_DriverIRQHandler();
860 }
861
862 WEAK void DMA12_DMA28_IRQHandler(void)
863 { DMA12_DMA28_DriverIRQHandler();
864 }
865
866 WEAK void DMA13_DMA29_IRQHandler(void)
867 { DMA13_DMA29_DriverIRQHandler();
868 }
869
870 WEAK void DMA14_DMA30_IRQHandler(void)
871 { DMA14_DMA30_DriverIRQHandler();
872 }
873
874 WEAK void DMA15_DMA31_IRQHandler(void)
875 { DMA15_DMA31_DriverIRQHandler();
876 }
877
878 WEAK void DMA_ERROR_IRQHandler(void)
879 { DMA_ERROR_DriverIRQHandler();
880 }
881
882 WEAK void CTI0_ERROR_IRQHandler(void)
883 { CTI0_ERROR_DriverIRQHandler();
884 }
885
886 WEAK void CTI1_ERROR_IRQHandler(void)
887 { CTI1_ERROR_DriverIRQHandler();
888 }
889
890 WEAK void CORE_IRQHandler(void)
891 { CORE_DriverIRQHandler();
892 }
893
894 WEAK void LPUART1_IRQHandler(void)
895 { LPUART1_DriverIRQHandler();
896 }
897
898 WEAK void LPUART2_IRQHandler(void)
899 { LPUART2_DriverIRQHandler();
900 }
901
902 WEAK void LPUART3_IRQHandler(void)
903 { LPUART3_DriverIRQHandler();
904 }
905
906 WEAK void LPUART4_IRQHandler(void)
907 { LPUART4_DriverIRQHandler();
908 }
909
910 WEAK void LPUART5_IRQHandler(void)
911 { LPUART5_DriverIRQHandler();
912 }
913
914 WEAK void LPUART6_IRQHandler(void)
915 { LPUART6_DriverIRQHandler();
916 }
917
918 WEAK void LPUART7_IRQHandler(void)
919 { LPUART7_DriverIRQHandler();
920 }
921
922 WEAK void LPUART8_IRQHandler(void)
923 { LPUART8_DriverIRQHandler();
924 }
925
926 WEAK void LPI2C1_IRQHandler(void)
927 { LPI2C1_DriverIRQHandler();
928 }
929
930 WEAK void LPI2C2_IRQHandler(void)
931 { LPI2C2_DriverIRQHandler();
932 }
933
934 WEAK void LPI2C3_IRQHandler(void)
935 { LPI2C3_DriverIRQHandler();
936 }
937
938 WEAK void LPI2C4_IRQHandler(void)
939 { LPI2C4_DriverIRQHandler();
940 }
941
942 WEAK void LPSPI1_IRQHandler(void)
943 { LPSPI1_DriverIRQHandler();
944 }
945
946 WEAK void LPSPI2_IRQHandler(void)
947 { LPSPI2_DriverIRQHandler();
948 }
949
950 WEAK void LPSPI3_IRQHandler(void)
951 { LPSPI3_DriverIRQHandler();
952 }
953
954 WEAK void LPSPI4_IRQHandler(void)
955 { LPSPI4_DriverIRQHandler();
956 }
957
958 WEAK void CAN1_IRQHandler(void)
959 { CAN1_DriverIRQHandler();
960 }
961
962 WEAK void CAN2_IRQHandler(void)
963 { CAN2_DriverIRQHandler();
964 }
965
966 WEAK void FLEXRAM_IRQHandler(void)
967 { FLEXRAM_DriverIRQHandler();
968 }
969
970 WEAK void KPP_IRQHandler(void)
971 { KPP_DriverIRQHandler();
972 }
973
974 WEAK void TSC_DIG_IRQHandler(void)
975 { TSC_DIG_DriverIRQHandler();
976 }
977
978 WEAK void GPR_IRQ_IRQHandler(void)
979 { GPR_IRQ_DriverIRQHandler();
980 }
981
982 WEAK void LCDIF_IRQHandler(void)
983 { LCDIF_DriverIRQHandler();
984 }
985
986 WEAK void CSI_IRQHandler(void)
987 { CSI_DriverIRQHandler();
988 }
989
990 WEAK void PXP_IRQHandler(void)
991 { PXP_DriverIRQHandler();
992 }
993
994 WEAK void WDOG2_IRQHandler(void)
995 { WDOG2_DriverIRQHandler();
996 }
997
998 WEAK void SNVS_HP_WRAPPER_IRQHandler(void)
999 { SNVS_HP_WRAPPER_DriverIRQHandler();
1000 }
1001
1002 WEAK void SNVS_HP_WRAPPER_TZ_IRQHandler(void)
1003 { SNVS_HP_WRAPPER_TZ_DriverIRQHandler();
1004 }
1005
1006 WEAK void SNVS_LP_WRAPPER_IRQHandler(void)
1007 { SNVS_LP_WRAPPER_DriverIRQHandler();
1008 }
1009
1010 WEAK void CSU_IRQHandler(void)
1011 { CSU_DriverIRQHandler();
1012 }
1013
1014 WEAK void DCP_IRQHandler(void)
1015 { DCP_DriverIRQHandler();
1016 }
1017
1018 WEAK void DCP_VMI_IRQHandler(void)
1019 { DCP_VMI_DriverIRQHandler();
1020 }
1021
1022 WEAK void Reserved68_IRQHandler(void)
1023 { Reserved68_DriverIRQHandler();
1024 }
1025
1026 WEAK void TRNG_IRQHandler(void)
1027 { TRNG_DriverIRQHandler();
1028 }
1029
1030 WEAK void SJC_IRQHandler(void)
1031 { SJC_DriverIRQHandler();
1032 }
1033
1034 WEAK void BEE_IRQHandler(void)
1035 { BEE_DriverIRQHandler();
1036 }
1037
1038 WEAK void SAI1_IRQHandler(void)
1039 { SAI1_DriverIRQHandler();
1040 }
1041
1042 WEAK void SAI2_IRQHandler(void)
1043 { SAI2_DriverIRQHandler();
1044 }
1045
1046 WEAK void SAI3_RX_IRQHandler(void)
1047 { SAI3_RX_DriverIRQHandler();
1048 }
1049
1050 WEAK void SAI3_TX_IRQHandler(void)
1051 { SAI3_TX_DriverIRQHandler();
1052 }
1053
1054 WEAK void SPDIF_IRQHandler(void)
1055 { SPDIF_DriverIRQHandler();
1056 }
1057
1058 WEAK void PMU_EVENT_IRQHandler(void)
1059 { PMU_EVENT_DriverIRQHandler();
1060 }
1061
1062 WEAK void Reserved78_IRQHandler(void)
1063 { Reserved78_DriverIRQHandler();
1064 }
1065
1066 WEAK void TEMP_LOW_HIGH_IRQHandler(void)
1067 { TEMP_LOW_HIGH_DriverIRQHandler();
1068 }
1069
1070 WEAK void TEMP_PANIC_IRQHandler(void)
1071 { TEMP_PANIC_DriverIRQHandler();
1072 }
1073
1074 WEAK void USB_PHY1_IRQHandler(void)
1075 { USB_PHY1_DriverIRQHandler();
1076 }
1077
1078 WEAK void USB_PHY2_IRQHandler(void)
1079 { USB_PHY2_DriverIRQHandler();
1080 }
1081
1082 WEAK void ADC1_IRQHandler(void)
1083 { ADC1_DriverIRQHandler();
1084 }
1085
1086 WEAK void ADC2_IRQHandler(void)
1087 { ADC2_DriverIRQHandler();
1088 }
1089
1090 WEAK void DCDC_IRQHandler(void)
1091 { DCDC_DriverIRQHandler();
1092 }
1093
1094 WEAK void Reserved86_IRQHandler(void)
1095 { Reserved86_DriverIRQHandler();
1096 }
1097
1098 WEAK void Reserved87_IRQHandler(void)
1099 { Reserved87_DriverIRQHandler();
1100 }
1101
1102 WEAK void GPIO1_INT0_IRQHandler(void)
1103 { GPIO1_INT0_DriverIRQHandler();
1104 }
1105
1106 WEAK void GPIO1_INT1_IRQHandler(void)
1107 { GPIO1_INT1_DriverIRQHandler();
1108 }
1109
1110 WEAK void GPIO1_INT2_IRQHandler(void)
1111 { GPIO1_INT2_DriverIRQHandler();
1112 }
1113
1114 WEAK void GPIO1_INT3_IRQHandler(void)
1115 { GPIO1_INT3_DriverIRQHandler();
1116 }
1117
1118 WEAK void GPIO1_INT4_IRQHandler(void)
1119 { GPIO1_INT4_DriverIRQHandler();
1120 }
1121
1122 WEAK void GPIO1_INT5_IRQHandler(void)
1123 { GPIO1_INT5_DriverIRQHandler();
1124 }
1125
1126 WEAK void GPIO1_INT6_IRQHandler(void)
1127 { GPIO1_INT6_DriverIRQHandler();
1128 }
1129
1130 WEAK void GPIO1_INT7_IRQHandler(void)
1131 { GPIO1_INT7_DriverIRQHandler();
1132 }
1133
1134 WEAK void GPIO1_Combined_0_15_IRQHandler(void)
1135 { GPIO1_Combined_0_15_DriverIRQHandler();
1136 }
1137
1138 WEAK void GPIO1_Combined_16_31_IRQHandler(void)
1139 { GPIO1_Combined_16_31_DriverIRQHandler();
1140 }
1141
1142 WEAK void GPIO2_Combined_0_15_IRQHandler(void)
1143 { GPIO2_Combined_0_15_DriverIRQHandler();
1144 }
1145
1146 WEAK void GPIO2_Combined_16_31_IRQHandler(void)
1147 { GPIO2_Combined_16_31_DriverIRQHandler();
1148 }
1149
1150 WEAK void GPIO3_Combined_0_15_IRQHandler(void)
1151 { GPIO3_Combined_0_15_DriverIRQHandler();
1152 }
1153
1154 WEAK void GPIO3_Combined_16_31_IRQHandler(void)
1155 { GPIO3_Combined_16_31_DriverIRQHandler();
1156 }
1157
1158 WEAK void GPIO4_Combined_0_15_IRQHandler(void)
1159 { GPIO4_Combined_0_15_DriverIRQHandler();
1160 }
1161
1162 WEAK void GPIO4_Combined_16_31_IRQHandler(void)
1163 { GPIO4_Combined_16_31_DriverIRQHandler();
1164 }
1165
1166 WEAK void GPIO5_Combined_0_15_IRQHandler(void)
1167 { GPIO5_Combined_0_15_DriverIRQHandler();
1168 }
1169
1170 WEAK void GPIO5_Combined_16_31_IRQHandler(void)
1171 { GPIO5_Combined_16_31_DriverIRQHandler();
1172 }
1173
1174 WEAK void FLEXIO1_IRQHandler(void)
1175 { FLEXIO1_DriverIRQHandler();
1176 }
1177
1178 WEAK void FLEXIO2_IRQHandler(void)
1179 { FLEXIO2_DriverIRQHandler();
1180 }
1181
1182 WEAK void WDOG1_IRQHandler(void)
1183 { WDOG1_DriverIRQHandler();
1184 }
1185
1186 WEAK void RTWDOG_IRQHandler(void)
1187 { RTWDOG_DriverIRQHandler();
1188 }
1189
1190 WEAK void EWM_IRQHandler(void)
1191 { EWM_DriverIRQHandler();
1192 }
1193
1194 WEAK void CCM_1_IRQHandler(void)
1195 { CCM_1_DriverIRQHandler();
1196 }
1197
1198 WEAK void CCM_2_IRQHandler(void)
1199 { CCM_2_DriverIRQHandler();
1200 }
1201
1202 WEAK void GPC_IRQHandler(void)
1203 { GPC_DriverIRQHandler();
1204 }
1205
1206 WEAK void SRC_IRQHandler(void)
1207 { SRC_DriverIRQHandler();
1208 }
1209
1210 WEAK void Reserved115_IRQHandler(void)
1211 { Reserved115_DriverIRQHandler();
1212 }
1213
1214 WEAK void GPT1_IRQHandler(void)
1215 { GPT1_DriverIRQHandler();
1216 }
1217
1218 WEAK void GPT2_IRQHandler(void)
1219 { GPT2_DriverIRQHandler();
1220 }
1221
1222 WEAK void PWM1_0_IRQHandler(void)
1223 { PWM1_0_DriverIRQHandler();
1224 }
1225
1226 WEAK void PWM1_1_IRQHandler(void)
1227 { PWM1_1_DriverIRQHandler();
1228 }
1229
1230 WEAK void PWM1_2_IRQHandler(void)
1231 { PWM1_2_DriverIRQHandler();
1232 }
1233
1234 WEAK void PWM1_3_IRQHandler(void)
1235 { PWM1_3_DriverIRQHandler();
1236 }
1237
1238 WEAK void PWM1_FAULT_IRQHandler(void)
1239 { PWM1_FAULT_DriverIRQHandler();
1240 }
1241
1242 WEAK void FLEXSPI2_IRQHandler(void)
1243 { FLEXSPI2_DriverIRQHandler();
1244 }
1245
1246 WEAK void FLEXSPI_IRQHandler(void)
1247 { FLEXSPI_DriverIRQHandler();
1248 }
1249
1250 WEAK void SEMC_IRQHandler(void)
1251 { SEMC_DriverIRQHandler();
1252 }
1253
1254 WEAK void USDHC1_IRQHandler(void)
1255 { USDHC1_DriverIRQHandler();
1256 }
1257
1258 WEAK void USDHC2_IRQHandler(void)
1259 { USDHC2_DriverIRQHandler();
1260 }
1261
1262 WEAK void USB_OTG2_IRQHandler(void)
1263 { USB_OTG2_DriverIRQHandler();
1264 }
1265
1266 WEAK void USB_OTG1_IRQHandler(void)
1267 { USB_OTG1_DriverIRQHandler();
1268 }
1269
1270 WEAK void ENET_IRQHandler(void)
1271 { ENET_DriverIRQHandler();
1272 }
1273
1274 WEAK void ENET_1588_Timer_IRQHandler(void)
1275 { ENET_1588_Timer_DriverIRQHandler();
1276 }
1277
1278 WEAK void XBAR1_IRQ_0_1_IRQHandler(void)
1279 { XBAR1_IRQ_0_1_DriverIRQHandler();
1280 }
1281
1282 WEAK void XBAR1_IRQ_2_3_IRQHandler(void)
1283 { XBAR1_IRQ_2_3_DriverIRQHandler();
1284 }
1285
1286 WEAK void ADC_ETC_IRQ0_IRQHandler(void)
1287 { ADC_ETC_IRQ0_DriverIRQHandler();
1288 }
1289
1290 WEAK void ADC_ETC_IRQ1_IRQHandler(void)
1291 { ADC_ETC_IRQ1_DriverIRQHandler();
1292 }
1293
1294 WEAK void ADC_ETC_IRQ2_IRQHandler(void)
1295 { ADC_ETC_IRQ2_DriverIRQHandler();
1296 }
1297
1298 WEAK void ADC_ETC_ERROR_IRQ_IRQHandler(void)
1299 { ADC_ETC_ERROR_IRQ_DriverIRQHandler();
1300 }
1301
1302 WEAK void PIT_IRQHandler(void)
1303 { PIT_DriverIRQHandler();
1304 }
1305
1306 WEAK void ACMP1_IRQHandler(void)
1307 { ACMP1_DriverIRQHandler();
1308 }
1309
1310 WEAK void ACMP2_IRQHandler(void)
1311 { ACMP2_DriverIRQHandler();
1312 }
1313
1314 WEAK void ACMP3_IRQHandler(void)
1315 { ACMP3_DriverIRQHandler();
1316 }
1317
1318 WEAK void ACMP4_IRQHandler(void)
1319 { ACMP4_DriverIRQHandler();
1320 }
1321
1322 WEAK void Reserved143_IRQHandler(void)
1323 { Reserved143_DriverIRQHandler();
1324 }
1325
1326 WEAK void Reserved144_IRQHandler(void)
1327 { Reserved144_DriverIRQHandler();
1328 }
1329
1330 WEAK void ENC1_IRQHandler(void)
1331 { ENC1_DriverIRQHandler();
1332 }
1333
1334 WEAK void ENC2_IRQHandler(void)
1335 { ENC2_DriverIRQHandler();
1336 }
1337
1338 WEAK void ENC3_IRQHandler(void)
1339 { ENC3_DriverIRQHandler();
1340 }
1341
1342 WEAK void ENC4_IRQHandler(void)
1343 { ENC4_DriverIRQHandler();
1344 }
1345
1346 WEAK void TMR1_IRQHandler(void)
1347 { TMR1_DriverIRQHandler();
1348 }
1349
1350 WEAK void TMR2_IRQHandler(void)
1351 { TMR2_DriverIRQHandler();
1352 }
1353
1354 WEAK void TMR3_IRQHandler(void)
1355 { TMR3_DriverIRQHandler();
1356 }
1357
1358 WEAK void TMR4_IRQHandler(void)
1359 { TMR4_DriverIRQHandler();
1360 }
1361
1362 WEAK void PWM2_0_IRQHandler(void)
1363 { PWM2_0_DriverIRQHandler();
1364 }
1365
1366 WEAK void PWM2_1_IRQHandler(void)
1367 { PWM2_1_DriverIRQHandler();
1368 }
1369
1370 WEAK void PWM2_2_IRQHandler(void)
1371 { PWM2_2_DriverIRQHandler();
1372 }
1373
1374 WEAK void PWM2_3_IRQHandler(void)
1375 { PWM2_3_DriverIRQHandler();
1376 }
1377
1378 WEAK void PWM2_FAULT_IRQHandler(void)
1379 { PWM2_FAULT_DriverIRQHandler();
1380 }
1381
1382 WEAK void PWM3_0_IRQHandler(void)
1383 { PWM3_0_DriverIRQHandler();
1384 }
1385
1386 WEAK void PWM3_1_IRQHandler(void)
1387 { PWM3_1_DriverIRQHandler();
1388 }
1389
1390 WEAK void PWM3_2_IRQHandler(void)
1391 { PWM3_2_DriverIRQHandler();
1392 }
1393
1394 WEAK void PWM3_3_IRQHandler(void)
1395 { PWM3_3_DriverIRQHandler();
1396 }
1397
1398 WEAK void PWM3_FAULT_IRQHandler(void)
1399 { PWM3_FAULT_DriverIRQHandler();
1400 }
1401
1402 WEAK void PWM4_0_IRQHandler(void)
1403 { PWM4_0_DriverIRQHandler();
1404 }
1405
1406 WEAK void PWM4_1_IRQHandler(void)
1407 { PWM4_1_DriverIRQHandler();
1408 }
1409
1410 WEAK void PWM4_2_IRQHandler(void)
1411 { PWM4_2_DriverIRQHandler();
1412 }
1413
1414 WEAK void PWM4_3_IRQHandler(void)
1415 { PWM4_3_DriverIRQHandler();
1416 }
1417
1418 WEAK void PWM4_FAULT_IRQHandler(void)
1419 { PWM4_FAULT_DriverIRQHandler();
1420 }
1421
1422 WEAK void ENET2_IRQHandler(void)
1423 { ENET2_DriverIRQHandler();
1424 }
1425
1426 WEAK void ENET2_1588_Timer_IRQHandler(void)
1427 { ENET2_1588_Timer_DriverIRQHandler();
1428 }
1429
1430 WEAK void CAN3_IRQHandler(void)
1431 { CAN3_DriverIRQHandler();
1432 }
1433
1434 WEAK void Reserved171_IRQHandler(void)
1435 { Reserved171_DriverIRQHandler();
1436 }
1437
1438 WEAK void FLEXIO3_IRQHandler(void)
1439 { FLEXIO3_DriverIRQHandler();
1440 }
1441
1442 WEAK void GPIO6_7_8_9_IRQHandler(void)
1443 { GPIO6_7_8_9_DriverIRQHandler();
1444 }
1445
1446 //*****************************************************************************
1447
1448 #if defined (DEBUG)
1449 #pragma GCC pop_options
1450 #endif // (DEBUG)
ADC_ETC_IRQ2_IRQHandler
WEAK void ADC_ETC_IRQ2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1294
GPIO3_Combined_0_15_IRQHandler
WEAK void GPIO3_Combined_0_15_IRQHandler(void)
Definition: startup_mimxrt1062.c:1150
WDOG2_IRQHandler
WEAK void WDOG2_IRQHandler(void)
Definition: startup_mimxrt1062.c:994
PWM4_1_IRQHandler
WEAK void PWM4_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1406
DMA11_DMA27_IRQHandler
WEAK void DMA11_DMA27_IRQHandler(void)
Definition: startup_mimxrt1062.c:858
__OCRAM_ALLOCATE_BANK_NUM
#define __OCRAM_ALLOCATE_BANK_NUM
Definition: startup_mimxrt1062.c:28
LPI2C1_IRQHandler
WEAK void LPI2C1_IRQHandler(void)
Definition: startup_mimxrt1062.c:926
PMU_EVENT_IRQHandler
WEAK void PMU_EVENT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1058
DCP_VMI_IRQHandler
WEAK void DCP_VMI_IRQHandler(void)
Definition: startup_mimxrt1062.c:1018
GPIO1_INT2_IRQHandler
WEAK void GPIO1_INT2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1110
LPUART2_IRQHandler
WEAK void LPUART2_IRQHandler(void)
Definition: startup_mimxrt1062.c:898
PWM4_FAULT_IRQHandler
WEAK void PWM4_FAULT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1418
LCDIF_IRQHandler
WEAK void LCDIF_IRQHandler(void)
Definition: startup_mimxrt1062.c:982
PWM1_FAULT_IRQHandler
WEAK void PWM1_FAULT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1238
CTI1_ERROR_IRQHandler
WEAK void CTI1_ERROR_IRQHandler(void)
Definition: startup_mimxrt1062.c:886
TSC_DIG_IRQHandler
WEAK void TSC_DIG_IRQHandler(void)
Definition: startup_mimxrt1062.c:974
USB_PHY2_IRQHandler
WEAK void USB_PHY2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1078
TMR2_IRQHandler
WEAK void TMR2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1350
LPUART5_IRQHandler
WEAK void LPUART5_IRQHandler(void)
Definition: startup_mimxrt1062.c:910
SAI1_IRQHandler
WEAK void SAI1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1038
FLEXIO1_IRQHandler
WEAK void FLEXIO1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1174
TRNG_IRQHandler
WEAK void TRNG_IRQHandler(void)
Definition: startup_mimxrt1062.c:1026
SNVS_HP_WRAPPER_IRQHandler
WEAK void SNVS_HP_WRAPPER_IRQHandler(void)
Definition: startup_mimxrt1062.c:998
TEMP_PANIC_IRQHandler
WEAK void TEMP_PANIC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1070
ENC1_IRQHandler
WEAK void ENC1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1330
ACMP4_IRQHandler
WEAK void ACMP4_IRQHandler(void)
Definition: startup_mimxrt1062.c:1318
ENET2_1588_Timer_IRQHandler
WEAK void ENET2_1588_Timer_IRQHandler(void)
Definition: startup_mimxrt1062.c:1426
LPUART3_IRQHandler
WEAK void LPUART3_IRQHandler(void)
Definition: startup_mimxrt1062.c:902
ADC1_IRQHandler
WEAK void ADC1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1082
USB_PHY1_IRQHandler
WEAK void USB_PHY1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1074
GPIO1_Combined_16_31_IRQHandler
WEAK void GPIO1_Combined_16_31_IRQHandler(void)
Definition: startup_mimxrt1062.c:1138
CORE_IRQHandler
WEAK void CORE_IRQHandler(void)
Definition: startup_mimxrt1062.c:890
PWM3_0_IRQHandler
WEAK void PWM3_0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1382
LPUART6_IRQHandler
WEAK void LPUART6_IRQHandler(void)
Definition: startup_mimxrt1062.c:914
DMA6_DMA22_IRQHandler
WEAK void DMA6_DMA22_IRQHandler(void)
Definition: startup_mimxrt1062.c:838
SJC_IRQHandler
WEAK void SJC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1030
Reserved171_IRQHandler
WEAK void Reserved171_IRQHandler(void)
Definition: startup_mimxrt1062.c:1434
GPIO1_INT0_IRQHandler
WEAK void GPIO1_INT0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1102
CCM_1_IRQHandler
WEAK void CCM_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1194
CTI0_ERROR_IRQHandler
WEAK void CTI0_ERROR_IRQHandler(void)
Definition: startup_mimxrt1062.c:882
EWM_IRQHandler
WEAK void EWM_IRQHandler(void)
Definition: startup_mimxrt1062.c:1190
LPSPI2_IRQHandler
WEAK void LPSPI2_IRQHandler(void)
Definition: startup_mimxrt1062.c:946
DMA10_DMA26_IRQHandler
WEAK void DMA10_DMA26_IRQHandler(void)
Definition: startup_mimxrt1062.c:854
ACMP3_IRQHandler
WEAK void ACMP3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1314
PWM2_3_IRQHandler
WEAK void PWM2_3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1374
DMA8_DMA24_IRQHandler
WEAK void DMA8_DMA24_IRQHandler(void)
Definition: startup_mimxrt1062.c:846
GPIO2_Combined_16_31_IRQHandler
WEAK void GPIO2_Combined_16_31_IRQHandler(void)
Definition: startup_mimxrt1062.c:1146
LPSPI4_IRQHandler
WEAK void LPSPI4_IRQHandler(void)
Definition: startup_mimxrt1062.c:954
TMR3_IRQHandler
WEAK void TMR3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1354
ADC_ETC_ERROR_IRQ_IRQHandler
WEAK void ADC_ETC_ERROR_IRQ_IRQHandler(void)
Definition: startup_mimxrt1062.c:1298
SAI3_TX_IRQHandler
WEAK void SAI3_TX_IRQHandler(void)
Definition: startup_mimxrt1062.c:1050
PIT_IRQHandler
WEAK void PIT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1302
DMA4_DMA20_IRQHandler
WEAK void DMA4_DMA20_IRQHandler(void)
Definition: startup_mimxrt1062.c:830
GPIO1_INT1_IRQHandler
WEAK void GPIO1_INT1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1106
Reserved78_IRQHandler
WEAK void Reserved78_IRQHandler(void)
Definition: startup_mimxrt1062.c:1062
__ITCM_ALLOCATE_BANK_NUM
#define __ITCM_ALLOCATE_BANK_NUM
Definition: startup_mimxrt1062.c:29
DMA0_DMA16_DriverIRQHandler
void DMA0_DMA16_DriverIRQHandler(void DMA1_DMA17_DriverIRQHandler() ALIAS(IntDefaultHandler) void)
Definition: startup_mimxrt1062.c:261
DCP_IRQHandler
WEAK void DCP_IRQHandler(void)
Definition: startup_mimxrt1062.c:1014
LPSPI1_IRQHandler
WEAK void LPSPI1_IRQHandler(void)
Definition: startup_mimxrt1062.c:942
Reserved144_IRQHandler
WEAK void Reserved144_IRQHandler(void)
Definition: startup_mimxrt1062.c:1326
GPIO1_Combined_0_15_IRQHandler
WEAK void GPIO1_Combined_0_15_IRQHandler(void)
Definition: startup_mimxrt1062.c:1134
LPI2C4_IRQHandler
WEAK void LPI2C4_IRQHandler(void)
Definition: startup_mimxrt1062.c:938
SVC_Handler
WEAK void SVC_Handler(void)
Definition: startup_mimxrt1062.c:788
GPIO3_Combined_16_31_IRQHandler
WEAK void GPIO3_Combined_16_31_IRQHandler(void)
Definition: startup_mimxrt1062.c:1154
GPIO5_Combined_0_15_IRQHandler
WEAK void GPIO5_Combined_0_15_IRQHandler(void)
Definition: startup_mimxrt1062.c:1166
GPT2_IRQHandler
WEAK void GPT2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1218
DMA0_DMA16_IRQHandler
WEAK void DMA0_DMA16_IRQHandler(void)
Definition: startup_mimxrt1062.c:814
LPSPI3_IRQHandler
WEAK void LPSPI3_IRQHandler(void)
Definition: startup_mimxrt1062.c:950
FLEXSPI_IRQHandler
WEAK void FLEXSPI_IRQHandler(void)
Definition: startup_mimxrt1062.c:1246
WDOG1_IRQHandler
WEAK void WDOG1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1182
ADC_ETC_IRQ0_IRQHandler
WEAK void ADC_ETC_IRQ0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1286
USB_OTG2_IRQHandler
WEAK void USB_OTG2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1262
Reserved115_IRQHandler
WEAK void Reserved115_IRQHandler(void)
Definition: startup_mimxrt1062.c:1210
__Vectors
uint32_t __Vectors[]
CSU_IRQHandler
WEAK void CSU_IRQHandler(void)
Definition: startup_mimxrt1062.c:1010
LPUART7_IRQHandler
WEAK void LPUART7_IRQHandler(void)
Definition: startup_mimxrt1062.c:918
GPIO4_Combined_0_15_IRQHandler
WEAK void GPIO4_Combined_0_15_IRQHandler(void)
Definition: startup_mimxrt1062.c:1158
DMA2_DMA18_IRQHandler
WEAK void DMA2_DMA18_IRQHandler(void)
Definition: startup_mimxrt1062.c:822
USB_OTG1_IRQHandler
WEAK void USB_OTG1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1266
DMA9_DMA25_IRQHandler
WEAK void DMA9_DMA25_IRQHandler(void)
Definition: startup_mimxrt1062.c:850
TMR1_IRQHandler
WEAK void TMR1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1346
GPIO2_Combined_0_15_IRQHandler
WEAK void GPIO2_Combined_0_15_IRQHandler(void)
Definition: startup_mimxrt1062.c:1142
FLEXSPI2_IRQHandler
WEAK void FLEXSPI2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1242
ENC3_IRQHandler
WEAK void ENC3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1338
SAI2_IRQHandler
WEAK void SAI2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1042
DMA7_DMA23_IRQHandler
WEAK void DMA7_DMA23_IRQHandler(void)
Definition: startup_mimxrt1062.c:842
GPR_IRQ_IRQHandler
WEAK void GPR_IRQ_IRQHandler(void)
Definition: startup_mimxrt1062.c:978
PWM2_0_IRQHandler
WEAK void PWM2_0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1362
GPIO1_INT3_IRQHandler
WEAK void GPIO1_INT3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1114
XBAR1_IRQ_2_3_IRQHandler
WEAK void XBAR1_IRQ_2_3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1282
CAN3_IRQHandler
WEAK void CAN3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1430
PWM3_FAULT_IRQHandler
WEAK void PWM3_FAULT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1398
DMA15_DMA31_IRQHandler
WEAK void DMA15_DMA31_IRQHandler(void)
Definition: startup_mimxrt1062.c:874
GPIO1_INT6_IRQHandler
WEAK void GPIO1_INT6_IRQHandler(void)
Definition: startup_mimxrt1062.c:1126
__attribute__
__attribute__((section(".after_vectors.init_data")))
Definition: startup_mimxrt1062.c:633
ENC4_IRQHandler
WEAK void ENC4_IRQHandler(void)
Definition: startup_mimxrt1062.c:1342
GPIO5_Combined_16_31_IRQHandler
WEAK void GPIO5_Combined_16_31_IRQHandler(void)
Definition: startup_mimxrt1062.c:1170
LPI2C2_IRQHandler
WEAK void LPI2C2_IRQHandler(void)
Definition: startup_mimxrt1062.c:930
IntDefaultHandler
WEAK void IntDefaultHandler(void)
Definition: startup_mimxrt1062.c:804
ENET_IRQHandler
WEAK void ENET_IRQHandler(void)
Definition: startup_mimxrt1062.c:1270
LPUART1_IRQHandler
WEAK void LPUART1_IRQHandler(void)
Definition: startup_mimxrt1062.c:894
__bss_section_table
unsigned int __bss_section_table
ENET2_IRQHandler
WEAK void ENET2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1422
CAN1_IRQHandler
WEAK void CAN1_IRQHandler(void)
Definition: startup_mimxrt1062.c:958
Reserved68_IRQHandler
WEAK void Reserved68_IRQHandler(void)
Definition: startup_mimxrt1062.c:1022
DMA12_DMA28_IRQHandler
WEAK void DMA12_DMA28_IRQHandler(void)
Definition: startup_mimxrt1062.c:862
__data_section_table_end
unsigned int __data_section_table_end
CSI_IRQHandler
WEAK void CSI_IRQHandler(void)
Definition: startup_mimxrt1062.c:986
USDHC2_IRQHandler
WEAK void USDHC2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1258
Reserved87_IRQHandler
WEAK void Reserved87_IRQHandler(void)
Definition: startup_mimxrt1062.c:1098
LPUART8_IRQHandler
WEAK void LPUART8_IRQHandler(void)
Definition: startup_mimxrt1062.c:922
DMA14_DMA30_IRQHandler
WEAK void DMA14_DMA30_IRQHandler(void)
Definition: startup_mimxrt1062.c:870
Reserved143_IRQHandler
WEAK void Reserved143_IRQHandler(void)
Definition: startup_mimxrt1062.c:1322
DMA5_DMA21_IRQHandler
WEAK void DMA5_DMA21_IRQHandler(void)
Definition: startup_mimxrt1062.c:834
LPUART4_IRQHandler
WEAK void LPUART4_IRQHandler(void)
Definition: startup_mimxrt1062.c:906
PWM1_0_IRQHandler
WEAK void PWM1_0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1222
PWM2_2_IRQHandler
WEAK void PWM2_2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1370
PWM1_1_IRQHandler
WEAK void PWM1_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1226
ACMP1_IRQHandler
WEAK void ACMP1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1306
ACMP2_IRQHandler
WEAK void ACMP2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1310
main
int main(void)
Application entry point.
Definition: bootloader.c:334
SysTick_Handler
WEAK void SysTick_Handler(void)
Definition: startup_mimxrt1062.c:796
SNVS_LP_WRAPPER_IRQHandler
WEAK void SNVS_LP_WRAPPER_IRQHandler(void)
Definition: startup_mimxrt1062.c:1006
DMA13_DMA29_IRQHandler
WEAK void DMA13_DMA29_IRQHandler(void)
Definition: startup_mimxrt1062.c:866
LPI2C3_IRQHandler
WEAK void LPI2C3_IRQHandler(void)
Definition: startup_mimxrt1062.c:934
PWM3_2_IRQHandler
WEAK void PWM3_2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1390
SystemInit
void SystemInit(void)
Setup the microcontroller system.
Definition: system_MIMXRT1062.c:71
ResetISR
void ResetISR(void)
GPIO4_Combined_16_31_IRQHandler
WEAK void GPIO4_Combined_16_31_IRQHandler(void)
Definition: startup_mimxrt1062.c:1162
GPIO6_7_8_9_IRQHandler
WEAK void GPIO6_7_8_9_IRQHandler(void)
Definition: startup_mimxrt1062.c:1442
PWM2_1_IRQHandler
WEAK void PWM2_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1366
FLEXRAM
#define FLEXRAM
Definition: MIMXRT1062.h:19258
PWM1_2_IRQHandler
WEAK void PWM1_2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1230
GPIO1_INT5_IRQHandler
WEAK void GPIO1_INT5_IRQHandler(void)
Definition: startup_mimxrt1062.c:1122
TEMP_LOW_HIGH_IRQHandler
WEAK void TEMP_LOW_HIGH_IRQHandler(void)
Definition: startup_mimxrt1062.c:1066
GPIO1_INT4_IRQHandler
WEAK void GPIO1_INT4_IRQHandler(void)
Definition: startup_mimxrt1062.c:1118
TMR4_IRQHandler
WEAK void TMR4_IRQHandler(void)
Definition: startup_mimxrt1062.c:1358
FLEXIO2_IRQHandler
WEAK void FLEXIO2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1178
__data_section_table
unsigned int __data_section_table
XBAR1_IRQ_0_1_IRQHandler
WEAK void XBAR1_IRQ_0_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1278
GPC_IRQHandler
WEAK void GPC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1202
SRC_IRQHandler
WEAK void SRC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1206
SAI3_RX_IRQHandler
WEAK void SAI3_RX_IRQHandler(void)
Definition: startup_mimxrt1062.c:1046
CAN2_IRQHandler
WEAK void CAN2_IRQHandler(void)
Definition: startup_mimxrt1062.c:962
SNVS_HP_WRAPPER_TZ_IRQHandler
WEAK void SNVS_HP_WRAPPER_TZ_IRQHandler(void)
Definition: startup_mimxrt1062.c:1002
GPIO1_INT7_IRQHandler
WEAK void GPIO1_INT7_IRQHandler(void)
Definition: startup_mimxrt1062.c:1130
DCDC_IRQHandler
WEAK void DCDC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1090
FLEXRAM_IRQHandler
WEAK void FLEXRAM_IRQHandler(void)
Definition: startup_mimxrt1062.c:966
ADC2_IRQHandler
WEAK void ADC2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1086
DMA_ERROR_IRQHandler
WEAK void DMA_ERROR_IRQHandler(void)
Definition: startup_mimxrt1062.c:878
PWM1_3_IRQHandler
WEAK void PWM1_3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1234
NMI_Handler
WEAK void NMI_Handler(void)
Definition: startup_mimxrt1062.c:780
ENET_1588_Timer_IRQHandler
WEAK void ENET_1588_Timer_IRQHandler(void)
Definition: startup_mimxrt1062.c:1274
GPT1_IRQHandler
WEAK void GPT1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1214
ADC_ETC_IRQ1_IRQHandler
WEAK void ADC_ETC_IRQ1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1290
PWM4_3_IRQHandler
WEAK void PWM4_3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1414
WEAK
#define WEAK
Definition: startup_mimxrt1062.c:53
WEAK_AV
#define WEAK_AV
Definition: startup_mimxrt1062.c:54
PXP_IRQHandler
WEAK void PXP_IRQHandler(void)
Definition: startup_mimxrt1062.c:990
ENC2_IRQHandler
WEAK void ENC2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1334
PendSV_Handler
WEAK void PendSV_Handler(void)
Definition: startup_mimxrt1062.c:792
FLEXIO3_IRQHandler
WEAK void FLEXIO3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1438
DMA1_DMA17_IRQHandler
WEAK void DMA1_DMA17_IRQHandler(void)
Definition: startup_mimxrt1062.c:818
PWM2_FAULT_IRQHandler
WEAK void PWM2_FAULT_IRQHandler(void)
Definition: startup_mimxrt1062.c:1378
__bss_section_table_end
unsigned int __bss_section_table_end
PWM3_3_IRQHandler
WEAK void PWM3_3_IRQHandler(void)
Definition: startup_mimxrt1062.c:1394
SPDIF_IRQHandler
WEAK void SPDIF_IRQHandler(void)
Definition: startup_mimxrt1062.c:1054
ALIAS
#define ALIAS(f)
Definition: startup_mimxrt1062.c:55
CCM_2_IRQHandler
WEAK void CCM_2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1198
USDHC1_IRQHandler
WEAK void USDHC1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1254
PWM3_1_IRQHandler
WEAK void PWM3_1_IRQHandler(void)
Definition: startup_mimxrt1062.c:1386
RTWDOG_IRQHandler
WEAK void RTWDOG_IRQHandler(void)
Definition: startup_mimxrt1062.c:1186
Reserved86_IRQHandler
WEAK void Reserved86_IRQHandler(void)
Definition: startup_mimxrt1062.c:1094
KPP_IRQHandler
WEAK void KPP_IRQHandler(void)
Definition: startup_mimxrt1062.c:970
SEMC_IRQHandler
WEAK void SEMC_IRQHandler(void)
Definition: startup_mimxrt1062.c:1250
PWM4_0_IRQHandler
WEAK void PWM4_0_IRQHandler(void)
Definition: startup_mimxrt1062.c:1402
HardFault_Handler
WEAK void HardFault_Handler(void)
Definition: startup_mimxrt1062.c:784
PWM4_2_IRQHandler
WEAK void PWM4_2_IRQHandler(void)
Definition: startup_mimxrt1062.c:1410
BEE_IRQHandler
WEAK void BEE_IRQHandler(void)
Definition: startup_mimxrt1062.c:1034
__DTCM_ALLOCATE_BANK_NUM
#define __DTCM_ALLOCATE_BANK_NUM
Definition: startup_mimxrt1062.c:30
DMA3_DMA19_IRQHandler
WEAK void DMA3_DMA19_IRQHandler(void)
Definition: startup_mimxrt1062.c:826