startup_same70.c
Go to the documentation of this file.
1 
31 /*
32  * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
33  */
34 
35 #include "same70.h"
36 
37 #if __FPU_USED /* CMSIS defined value to indicate usage of FPU */
38 #include "fpu.h"
39 #endif
40 
41 /* Initialize segments */
42 extern uint32_t _sfixed;
43 extern uint32_t _efixed;
44 extern uint32_t _etext;
45 extern uint32_t _srelocate;
46 extern uint32_t _erelocate;
47 extern uint32_t _szero;
48 extern uint32_t _ezero;
49 extern uint32_t _sstack;
50 extern uint32_t _estack;
51 
53 int main(void);
56 void __libc_init_array(void);
57 
58 /* Default empty handler */
59 void Dummy_Handler(void);
60 
61 /* Cortex-M7 core handlers */
62 void NMI_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
63 void HardFault_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
64 void MemManage_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
65 void BusFault_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
66 void UsageFault_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
67 void SVC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
68 void DebugMon_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
69 void PendSV_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
70 void SysTick_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
71 
72 /* Peripherals handlers */
73 void SUPC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
74 void RSTC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
75 void RTC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
76 void RTT_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
77 void WDT_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
78 void PMC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
79 void EFC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
80 void UART0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
81 void UART1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
82 void PIOA_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
83 void PIOB_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
84 #ifdef _SAME70_PIOC_INSTANCE_
85 void PIOC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
86 #endif /* _SAME70_PIOC_INSTANCE_ */
87 #ifdef _SAME70_USART0_INSTANCE_
88 void USART0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
89 #endif /* _SAME70_USART0_INSTANCE_ */
90 #ifdef _SAME70_USART1_INSTANCE_
91 void USART1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
92 #endif /* _SAME70_USART1_INSTANCE_ */
93 #ifdef _SAME70_USART2_INSTANCE_
94 void USART2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
95 #endif /* _SAME70_USART2_INSTANCE_ */
96 void PIOD_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
97 #ifdef _SAME70_PIOE_INSTANCE_
98 void PIOE_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
99 #endif /* _SAME70_PIOE_INSTANCE_ */
100 #ifdef _SAME70_HSMCI_INSTANCE_
101 void HSMCI_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
102 #endif /* _SAME70_HSMCI_INSTANCE_ */
103 void TWIHS0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
104 void TWIHS1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
105 #ifdef _SAME70_SPI0_INSTANCE_
106 void SPI0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
107 #endif /* _SAME70_SPI0_INSTANCE_ */
108 void SSC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
109 void TC0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
110 void TC1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
111 void TC2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
112 #ifdef _SAME70_TC1_INSTANCE_
113 void TC3_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
114 #endif /* _SAME70_TC1_INSTANCE_ */
115 #ifdef _SAME70_TC1_INSTANCE_
116 void TC4_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
117 #endif /* _SAME70_TC1_INSTANCE_ */
118 #ifdef _SAME70_TC1_INSTANCE_
119 void TC5_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
120 #endif /* _SAME70_TC1_INSTANCE_ */
121 void AFEC0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
122 #ifdef _SAME70_DACC_INSTANCE_
123 void DACC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
124 #endif /* _SAME70_DACC_INSTANCE_ */
125 void PWM0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
126 void ICM_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
127 void ACC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
128 void USBHS_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
129 void MCAN0_INT0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
130 void MCAN0_INT1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
131 #ifdef _SAME70_MCAN1_INSTANCE_
132 void MCAN1_INT0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
133 void MCAN1_INT1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
134 #endif /* _SAME70_MCAN1_INSTANCE_ */
135 void GMAC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
136 void AFEC1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
137 #ifdef _SAME70_TWIHS2_INSTANCE_
138 void TWIHS2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
139 #endif /* _SAME70_TWIHS2_INSTANCE_ */
140 #ifdef _SAME70_SPI1_INSTANCE_
141 void SPI1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
142 #endif /* _SAME70_SPI1_INSTANCE_ */
143 void QSPI_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
144 void UART2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
145 #ifdef _SAME70_UART3_INSTANCE_
146 void UART3_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
147 #endif /* _SAME70_UART3_INSTANCE_ */
148 #ifdef _SAME70_UART4_INSTANCE_
149 void UART4_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
150 #endif /* _SAME70_UART4_INSTANCE_ */
151 #ifdef _SAME70_TC2_INSTANCE_
152 void TC6_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
153 #endif /* _SAME70_TC2_INSTANCE_ */
154 #ifdef _SAME70_TC2_INSTANCE_
155 void TC7_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
156 #endif /* _SAME70_TC2_INSTANCE_ */
157 #ifdef _SAME70_TC2_INSTANCE_
158 void TC8_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
159 #endif /* _SAME70_TC2_INSTANCE_ */
160 void TC9_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
161 void TC10_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
162 void TC11_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
163 void AES_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
164 void TRNG_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
165 void XDMAC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
166 void ISI_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
167 void PWM1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
168 void FPU_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
169 #ifdef _SAME70_SDRAMC_INSTANCE_
170 void SDRAMC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
171 #endif /* _SAME70_SDRAMC_INSTANCE_ */
172 void RSWDT_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
173 void CCW_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
174 void CCF_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
175 void GMAC_Q1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
176 void GMAC_Q2_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
177 void IXC_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
178 #ifdef _SAME70_I2SC0_INSTANCE_
179 void I2SC0_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
180 #endif /* _SAME70_I2SC0_INSTANCE_ */
181 #ifdef _SAME70_I2SC1_INSTANCE_
182 void I2SC1_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
183 #endif /* _SAME70_I2SC1_INSTANCE_ */
184 #if (__SAM_M7_REVB == 1)
185 void GMAC_Q3_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
186 void GMAC_Q4_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
187 void GMAC_Q5_Handler ( void ) __attribute__ ((weak, alias("Dummy_Handler")));
188 #endif
189 /* Exception Table */
190 __attribute__ ((section(".vectors")))
191 const DeviceVectors exception_table = {
192 
193  /* Configure Initial Stack Pointer, using linker-generated symbols */
194  .pvStack = (void*) (&_estack),
195 
196  .pfnReset_Handler = (void*) Reset_Handler,
197  .pfnNMI_Handler = (void*) NMI_Handler,
198  .pfnHardFault_Handler = (void*) HardFault_Handler,
199  .pfnMemManage_Handler = (void*) MemManage_Handler,
200  .pfnBusFault_Handler = (void*) BusFault_Handler,
201  .pfnUsageFault_Handler = (void*) UsageFault_Handler,
202  .pfnReserved1_Handler = (void*) (0UL), /* Reserved */
203  .pfnReserved2_Handler = (void*) (0UL), /* Reserved */
204  .pfnReserved3_Handler = (void*) (0UL), /* Reserved */
205  .pfnReserved4_Handler = (void*) (0UL), /* Reserved */
206  .pfnSVC_Handler = (void*) SVC_Handler,
207  .pfnDebugMon_Handler = (void*) DebugMon_Handler,
208  .pfnReserved5_Handler = (void*) (0UL), /* Reserved */
209  .pfnPendSV_Handler = (void*) PendSV_Handler,
210  .pfnSysTick_Handler = (void*) SysTick_Handler,
211 
212  /* Configurable interrupts */
213  .pfnSUPC_Handler = (void*) SUPC_Handler, /* 0 Supply Controller */
214  .pfnRSTC_Handler = (void*) RSTC_Handler, /* 1 Reset Controller */
215  .pfnRTC_Handler = (void*) RTC_Handler, /* 2 Real Time Clock */
216  .pfnRTT_Handler = (void*) RTT_Handler, /* 3 Real Time Timer */
217  .pfnWDT_Handler = (void*) WDT_Handler, /* 4 Watchdog Timer */
218  .pfnPMC_Handler = (void*) PMC_Handler, /* 5 Power Management Controller */
219  .pfnEFC_Handler = (void*) EFC_Handler, /* 6 Enhanced Embedded Flash Controller */
220  .pfnUART0_Handler = (void*) UART0_Handler, /* 7 UART 0 */
221  .pfnUART1_Handler = (void*) UART1_Handler, /* 8 UART 1 */
222  .pvReserved9 = (void*) (0UL), /* 9 Reserved */
223  .pfnPIOA_Handler = (void*) PIOA_Handler, /* 10 Parallel I/O Controller A */
224  .pfnPIOB_Handler = (void*) PIOB_Handler, /* 11 Parallel I/O Controller B */
225 #ifdef _SAME70_PIOC_INSTANCE_
226  .pfnPIOC_Handler = (void*) PIOC_Handler, /* 12 Parallel I/O Controller C */
227 #else
228  .pvReserved12 = (void*) (0UL), /* 12 Reserved */
229 #endif /* _SAME70_PIOC_INSTANCE_ */
230 #ifdef _SAME70_USART0_INSTANCE_
231  .pfnUSART0_Handler = (void*) USART0_Handler, /* 13 USART 0 */
232 #else
233  .pvReserved13 = (void*) (0UL), /* 13 Reserved */
234 #endif /* _SAME70_USART0_INSTANCE_ */
235 #ifdef _SAME70_USART1_INSTANCE_
236  .pfnUSART1_Handler = (void*) USART1_Handler, /* 14 USART 1 */
237 #else
238  .pvReserved14 = (void*) (0UL), /* 14 Reserved */
239 #endif /* _SAME70_USART1_INSTANCE_ */
240 #ifdef _SAME70_USART2_INSTANCE_
241  .pfnUSART2_Handler = (void*) USART2_Handler, /* 15 USART 2 */
242 #else
243  .pvReserved15 = (void*) (0UL), /* 15 Reserved */
244 #endif /* _SAME70_USART2_INSTANCE_ */
245  .pfnPIOD_Handler = (void*) PIOD_Handler, /* 16 Parallel I/O Controller D */
246 #ifdef _SAME70_PIOE_INSTANCE_
247  .pfnPIOE_Handler = (void*) PIOE_Handler, /* 17 Parallel I/O Controller E */
248 #else
249  .pvReserved17 = (void*) (0UL), /* 17 Reserved */
250 #endif /* _SAME70_PIOE_INSTANCE_ */
251 #ifdef _SAME70_HSMCI_INSTANCE_
252  .pfnHSMCI_Handler = (void*) HSMCI_Handler, /* 18 Multimedia Card Interface */
253 #else
254  .pvReserved18 = (void*) (0UL), /* 18 Reserved */
255 #endif /* _SAME70_HSMCI_INSTANCE_ */
256  .pfnTWIHS0_Handler = (void*) TWIHS0_Handler, /* 19 Two Wire Interface 0 HS */
257  .pfnTWIHS1_Handler = (void*) TWIHS1_Handler, /* 20 Two Wire Interface 1 HS */
258 #ifdef _SAME70_SPI0_INSTANCE_
259  .pfnSPI0_Handler = (void*) SPI0_Handler, /* 21 Serial Peripheral Interface 0 */
260 #else
261  .pvReserved21 = (void*) (0UL), /* 21 Reserved */
262 #endif /* _SAME70_SPI0_INSTANCE_ */
263  .pfnSSC_Handler = (void*) SSC_Handler, /* 22 Synchronous Serial Controller */
264  .pfnTC0_Handler = (void*) TC0_Handler, /* 23 Timer/Counter 0 */
265  .pfnTC1_Handler = (void*) TC1_Handler, /* 24 Timer/Counter 1 */
266  .pfnTC2_Handler = (void*) TC2_Handler, /* 25 Timer/Counter 2 */
267 #ifdef _SAME70_TC1_INSTANCE_
268  .pfnTC3_Handler = (void*) TC3_Handler, /* 26 Timer/Counter 3 */
269 #else
270  .pvReserved26 = (void*) (0UL), /* 26 Reserved */
271 #endif /* _SAME70_TC1_INSTANCE_ */
272 #ifdef _SAME70_TC1_INSTANCE_
273  .pfnTC4_Handler = (void*) TC4_Handler, /* 27 Timer/Counter 4 */
274 #else
275  .pvReserved27 = (void*) (0UL), /* 27 Reserved */
276 #endif /* _SAME70_TC1_INSTANCE_ */
277 #ifdef _SAME70_TC1_INSTANCE_
278  .pfnTC5_Handler = (void*) TC5_Handler, /* 28 Timer/Counter 5 */
279 #else
280  .pvReserved28 = (void*) (0UL), /* 28 Reserved */
281 #endif /* _SAME70_TC1_INSTANCE_ */
282  .pfnAFEC0_Handler = (void*) AFEC0_Handler, /* 29 Analog Front End 0 */
283 #ifdef _SAME70_DACC_INSTANCE_
284  .pfnDACC_Handler = (void*) DACC_Handler, /* 30 Digital To Analog Converter */
285 #else
286  .pvReserved30 = (void*) (0UL), /* 30 Reserved */
287 #endif /* _SAME70_DACC_INSTANCE_ */
288  .pfnPWM0_Handler = (void*) PWM0_Handler, /* 31 Pulse Width Modulation 0 */
289  .pfnICM_Handler = (void*) ICM_Handler, /* 32 Integrity Check Monitor */
290  .pfnACC_Handler = (void*) ACC_Handler, /* 33 Analog Comparator */
291  .pfnUSBHS_Handler = (void*) USBHS_Handler, /* 34 USB Host / Device Controller */
292  .pfnMCAN0_INT0_Handler = (void*) MCAN0_INT0_Handler, /* 35 Controller Area Network */
293  .pfnMCAN0_INT1_Handler = (void*) MCAN0_INT1_Handler, /* 36 Controller Area Network */
294 #ifdef _SAME70_MCAN1_INSTANCE_
295  .pfnMCAN1_INT0_Handler = (void*) MCAN1_INT0_Handler, /* 37 Controller Area Network */
296  .pfnMCAN1_INT1_Handler = (void*) MCAN1_INT1_Handler, /* 38 Controller Area Network */
297 #else
298  .pvReserved37 = (void*) (0UL), /* 37 Reserved */
299  .pvReserved38 = (void*) (0UL), /* 38 Reserved */
300 #endif /* _SAME70_MCAN1_INSTANCE_ */
301  .pfnGMAC_Handler = (void*) GMAC_Handler, /* 39 Ethernet MAC */
302  .pfnAFEC1_Handler = (void*) AFEC1_Handler, /* 40 Analog Front End 1 */
303 #ifdef _SAME70_TWIHS2_INSTANCE_
304  .pfnTWIHS2_Handler = (void*) TWIHS2_Handler, /* 41 Two Wire Interface 2 HS */
305 #else
306  .pvReserved41 = (void*) (0UL), /* 41 Reserved */
307 #endif /* _SAME70_TWIHS2_INSTANCE_ */
308 #ifdef _SAME70_SPI1_INSTANCE_
309  .pfnSPI1_Handler = (void*) SPI1_Handler, /* 42 Serial Peripheral Interface 1 */
310 #else
311  .pvReserved42 = (void*) (0UL), /* 42 Reserved */
312 #endif /* _SAME70_SPI1_INSTANCE_ */
313  .pfnQSPI_Handler = (void*) QSPI_Handler, /* 43 Quad I/O Serial Peripheral Interface */
314  .pfnUART2_Handler = (void*) UART2_Handler, /* 44 UART 2 */
315 #ifdef _SAME70_UART3_INSTANCE_
316  .pfnUART3_Handler = (void*) UART3_Handler, /* 45 UART 3 */
317 #else
318  .pvReserved45 = (void*) (0UL), /* 45 Reserved */
319 #endif /* _SAME70_UART3_INSTANCE_ */
320 #ifdef _SAME70_UART4_INSTANCE_
321  .pfnUART4_Handler = (void*) UART4_Handler, /* 46 UART 4 */
322 #else
323  .pvReserved46 = (void*) (0UL), /* 46 Reserved */
324 #endif /* _SAME70_UART4_INSTANCE_ */
325 #ifdef _SAME70_TC2_INSTANCE_
326  .pfnTC6_Handler = (void*) TC6_Handler, /* 47 Timer/Counter 6 */
327 #else
328  .pvReserved47 = (void*) (0UL), /* 47 Reserved */
329 #endif /* _SAME70_TC2_INSTANCE_ */
330 #ifdef _SAME70_TC2_INSTANCE_
331  .pfnTC7_Handler = (void*) TC7_Handler, /* 48 Timer/Counter 7 */
332 #else
333  .pvReserved48 = (void*) (0UL), /* 48 Reserved */
334 #endif /* _SAME70_TC2_INSTANCE_ */
335 #ifdef _SAME70_TC2_INSTANCE_
336  .pfnTC8_Handler = (void*) TC8_Handler, /* 49 Timer/Counter 8 */
337 #else
338  .pvReserved49 = (void*) (0UL), /* 49 Reserved */
339 #endif /* _SAME70_TC2_INSTANCE_ */
340  .pfnTC9_Handler = (void*) TC9_Handler, /* 50 Timer/Counter 9 */
341  .pfnTC10_Handler = (void*) TC10_Handler, /* 51 Timer/Counter 10 */
342  .pfnTC11_Handler = (void*) TC11_Handler, /* 52 Timer/Counter 11 */
343  .pvReserved53 = (void*) (0UL), /* 53 Reserved */
344  .pvReserved54 = (void*) (0UL), /* 54 Reserved */
345  .pvReserved55 = (void*) (0UL), /* 55 Reserved */
346  .pfnAES_Handler = (void*) AES_Handler, /* 56 AES */
347  .pfnTRNG_Handler = (void*) TRNG_Handler, /* 57 True Random Generator */
348  .pfnXDMAC_Handler = (void*) XDMAC_Handler, /* 58 DMA */
349  .pfnISI_Handler = (void*) ISI_Handler, /* 59 Camera Interface */
350  .pfnPWM1_Handler = (void*) PWM1_Handler, /* 60 Pulse Width Modulation 1 */
351  .pfnFPU_Handler = (void*) FPU_Handler, /* 61 Floating Point Unit Registers */
352 #ifdef _SAME70_SDRAMC_INSTANCE_
353  .pfnSDRAMC_Handler = (void*) SDRAMC_Handler, /* 62 SDRAM Controller */
354 #else
355  .pvReserved62 = (void*) (0UL), /* 62 Reserved */
356 #endif /* _SAME70_SDRAMC_INSTANCE_ */
357  .pfnRSWDT_Handler = (void*) RSWDT_Handler, /* 63 Reinforced Secure Watchdog Timer */
358  .pfnCCW_Handler = (void*) CCW_Handler, /* 64 System Control Registers */
359  .pfnCCF_Handler = (void*) CCF_Handler, /* 65 System Control Registers */
360  .pfnGMAC_Q1_Handler= (void*) GMAC_Q1_Handler,/* 66 Gigabit Ethernet MAC */
361  .pfnGMAC_Q2_Handler= (void*) GMAC_Q2_Handler,/* 67 Gigabit Ethernet MAC */
362  .pfnIXC_Handler = (void*) IXC_Handler, /* 68 Floating Point Unit Registers */
363 #ifdef _SAME70_I2SC0_INSTANCE_
364  .pfnI2SC0_Handler = (void*) I2SC0_Handler, /* 69 Inter-IC Sound controller */
365 #else
366  .pvReserved69 = (void*) (0UL), /* 69 Reserved */
367 #endif /* _SAME70_I2SC0_INSTANCE_ */
368 #ifdef _SAME70_I2SC1_INSTANCE_
369  .pfnI2SC1_Handler = (void*) I2SC1_Handler, /* 70 Inter-IC Sound controller */
370 #else
371  .pvReserved70 = (void*) (0UL), /* 70 Reserved */
372 #endif /* _SAME70_I2SC1_INSTANCE_ */
373 #if (__SAM_M7_REVB == 1)
374  .pfnGMAC_Q3_Handler= (void*) GMAC_Q3_Handler,/* 71 Gigabit Ethernet MAC */
375  .pfnGMAC_Q4_Handler= (void*) GMAC_Q4_Handler,/* 72 Gigabit Ethernet MAC */
376  .pfnGMAC_Q5_Handler= (void*) GMAC_Q5_Handler /* 73 Gigabit Ethernet MAC */
377 #else
378  .pvReserved71 = (void*) (0UL), /* 71 Reserved */
379  .pvReserved72 = (void*) (0UL), /* 72 Reserved */
380  .pvReserved73 = (void*) (0UL) /* 73 Reserved */
381 #endif
382 };
383 
388 void Reset_Handler(void)
389 {
390  uint32_t *pSrc, *pDest;
391 
392  /* Initialize the relocate segment */
393  pSrc = &_etext;
394  pDest = &_srelocate;
395 
396  if (pSrc != pDest) {
397  for (; pDest < &_erelocate;) {
398  *pDest++ = *pSrc++;
399  }
400  }
401 
402  /* Clear the zero segment */
403  for (pDest = &_szero; pDest < &_ezero;) {
404  *pDest++ = 0;
405  }
406 
407  /* Set the vector table base address */
408  pSrc = (uint32_t *) & _sfixed;
409  SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);
410 
411 #if __FPU_USED
412  fpu_enable();
413 #endif
414 
415  /* Initialize the C library */
417 
418  /* Branch to main function */
419  main();
420 
421  /* Infinite loop */
422  while (1);
423 }
424 
428 void Dummy_Handler(void)
429 {
430  while (1) {
431  }
432 }
uint32_t _erelocate
void TC1_Handler(void)
void MCAN0_INT0_Handler(void)
uint32_t _szero
void TC9_Handler(void)
void MemManage_Handler(void)
Definition: rtos.c:196
void Reset_Handler(void)
This is the code that gets called on processor reset. To initialize the device, and call the main() r...
void NMI_Handler(void HardFault_Handler void)
void __libc_init_array(void)
void GMAC_Q2_Handler(void)
void RTC_Handler(void)
uint32_t _srelocate
void FPU_Handler(void)
void USART1_Handler(void)
Definition: d_usartDMA.c:1647
void GMAC_Handler(void)
void GMAC_Q4_Handler(void)
void RTT_Handler(void)
Definition: d_time.c:22
void HardFault_Handler(void)
Definition: rtos.c:248
void TWIHS0_Handler(void)
uint32_t _sfixed
void UART0_Handler(void)
Definition: d_usartDMA.c:1641
void * pvStack
Definition: same70j19.h:130
uint32_t _efixed
void CCF_Handler(void)
void TC11_Handler(void)
void ACC_Handler(void)
void SUPC_Handler(void)
void SPI1_Handler(void)
void TC7_Handler(void)
#define __SAM_M7_REVB
Definition: same70j19.h:301
void PIOE_Handler(void)
void I2SC0_Handler(void)
void GMAC_Q5_Handler(void)
void I2SC1_Handler(void)
uint32_t _ezero
void ISI_Handler(void)
void UART1_Handler(void)
Definition: d_usartDMA.c:1642
#define SCB
Definition: core_cm7.h:1599
void CCW_Handler(void)
void DebugMon_Handler(void)
void PIOB_Handler(void)
void TRNG_Handler(void)
void DACC_Handler(void)
void PMC_Handler(void)
void USBHS_Handler(void)
Definition: USBD_HAL.c:1008
void MCAN0_INT1_Handler(void)
void MCAN1_INT0_Handler(void)
void EFC_Handler(void)
void UART2_Handler(void)
Definition: d_usartDMA.c:1643
void TC0_Handler(void)
void TC4_Handler(void)
void TWIHS1_Handler(void)
void AFEC1_Handler(void)
void SPI0_Handler(void)
void GMAC_Q1_Handler(void)
void PWM0_Handler(void)
void SysTick_Handler(void)
void TWIHS2_Handler(void)
typedef __attribute__
USB Device LPM Descriptor structure.
Definition: d_usartDMA.c:1064
void XDMAC_Handler(void)
Definition: d_usartDMA.c:704
void IXC_Handler(void)
void TC5_Handler(void)
void Dummy_Handler(void)
Default interrupt handler for unused IRQs.
void MCAN1_INT1_Handler(void)
void TC2_Handler(void)
void TC8_Handler(void)
uint32_t _estack
void RSWDT_Handler(void)
void USART0_Handler(void)
Definition: d_usartDMA.c:1646
void USART2_Handler(void)
Definition: d_usartDMA.c:1648
void UsageFault_Handler(void)
Definition: rtos.c:226
void AES_Handler(void)
void PIOD_Handler(void)
void TC3_Handler(void)
void RSTC_Handler(void)
void PWM1_Handler(void)
void SSC_Handler(void)
void PIOC_Handler(void)
uint32_t _etext
void GMAC_Q3_Handler(void)
FPU support for SAM.
#define SCB_VTOR_TBLOFF_Msk
Definition: core_cm7.h:515
uint32_t _sstack
void ICM_Handler(void)
void AFEC0_Handler(void)
void TC6_Handler(void)
void HSMCI_Handler(void)
void PIOA_Handler(void)
void UART3_Handler(void)
Definition: d_usartDMA.c:1644
void SVC_Handler(void)
static __always_inline void fpu_enable(void)
Enable FPU.
Definition: fpu.h:51
void WDT_Handler(void)
void QSPI_Handler(void)
void PendSV_Handler(void)
void UART4_Handler(void)
Definition: d_usartDMA.c:1645
void SDRAMC_Handler(void)
void BusFault_Handler(void)
Definition: rtos.c:211
void TC10_Handler(void)


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05