#include "samd51.h"
#include "md_bootloader.h"
extern uint32_t _sfixed;
extern uint32_t _efixed;
extern uint32_t _etext;
extern uint32_t _srelocate;
extern uint32_t _erelocate;
extern uint32_t _szero;
extern uint32_t _ezero;
extern uint32_t _sstack;
extern uint32_t _estack;
int main(void);
void __libc_init_array(void);
void Dummy_Handler(void);
void NMI_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void HardFault_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void MemManage_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void BusFault_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void UsageFault_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SVC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DebugMon_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void PendSV_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SysTick_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void PM_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void MCLK_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSCCTRL_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSCCTRL_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSCCTRL_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSCCTRL_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSCCTRL_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void OSC32KCTRL_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SUPC_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SUPC_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void WDT_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void RTC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_5_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_6_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_7_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_8_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_9_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_10_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_11_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_12_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_13_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_14_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EIC_15_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void FREQM_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void NVMCTRL_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void NVMCTRL_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMAC_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMAC_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMAC_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMAC_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMAC_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EVSYS_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EVSYS_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EVSYS_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EVSYS_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void EVSYS_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void PAC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TAL_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TAL_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void RAMECC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM0_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM0_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM0_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM0_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM1_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM1_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM1_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM1_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM2_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM2_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM2_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM2_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM3_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM3_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM3_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM3_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_SERCOM4
void SERCOM4_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM4_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM4_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM4_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_SERCOM5
void SERCOM5_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM5_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM5_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM5_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_SERCOM6
void SERCOM6_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM6_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM6_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM6_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_SERCOM7
void SERCOM7_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM7_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM7_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void SERCOM7_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_CAN0
void CAN0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_CAN1
void CAN1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_USB
void USB_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_GMAC
void GMAC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
void TCC0_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_5_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC0_6_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC1_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC1_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC1_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC1_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC1_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC2_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC2_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC2_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC2_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_TCC3
void TCC3_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC3_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC3_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_TCC4
void TCC4_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC4_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TCC4_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
void TC0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TC1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TC2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TC3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_TC4
void TC4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_TC5
void TC5_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_TC6
void TC6_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_TC7
void TC7_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
void PDEC_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void PDEC_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void PDEC_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void ADC0_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void ADC0_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void ADC1_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void ADC1_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void AC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_2_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_3_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_4_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_I2S
void I2S_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
void PCC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void AES_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
void TRNG_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_ICM
void ICM_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_PUKCC
void PUKCC_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
void QSPI_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#ifdef ID_SDHC0
void SDHC0_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
#ifdef ID_SDHC1
void SDHC1_Handler(void) __attribute__((weak, alias("Dummy_Handler")));
#endif
__attribute__((section(".vectors"))) const DeviceVectors exception_table = {
.pvStack = (void *)(&_estack),
.pfnReset_Handler = (void *)Reset_Handler,
.pfnNMI_Handler = (void *)NMI_Handler,
.pfnHardFault_Handler = (void *)HardFault_Handler,
.pfnMemManage_Handler = (void *)MemManage_Handler,
.pfnBusFault_Handler = (void *)BusFault_Handler,
.pfnUsageFault_Handler = (void *)UsageFault_Handler,
.pvReservedM9 = (void *)(0UL),
.pvReservedM8 = (void *)(0UL),
.pvReservedM7 = (void *)(0UL),
.pvReservedM6 = (void *)(0UL),
.pfnSVC_Handler = (void *)SVC_Handler,
.pfnDebugMon_Handler = (void *)DebugMon_Handler,
.pvReservedM3 = (void *)(0UL),
.pfnPendSV_Handler = (void *)PendSV_Handler,
.pfnSysTick_Handler = (void *)SysTick_Handler,
.pfnPM_Handler = (void *)PM_Handler,
.pfnMCLK_Handler = (void *)MCLK_Handler,
.pfnOSCCTRL_0_Handler = (void *)OSCCTRL_0_Handler,
.pfnOSCCTRL_1_Handler = (void *)OSCCTRL_1_Handler,
.pfnOSCCTRL_2_Handler = (void *)OSCCTRL_2_Handler,
.pfnOSCCTRL_3_Handler = (void *)OSCCTRL_3_Handler,
.pfnOSCCTRL_4_Handler = (void *)OSCCTRL_4_Handler,
.pfnOSC32KCTRL_Handler = (void *)OSC32KCTRL_Handler,
.pfnSUPC_0_Handler = (void *)SUPC_0_Handler,
.pfnSUPC_1_Handler = (void *)SUPC_1_Handler,
.pfnWDT_Handler = (void *)WDT_Handler,
.pfnRTC_Handler = (void *)RTC_Handler,
.pfnEIC_0_Handler = (void *)EIC_0_Handler,
.pfnEIC_1_Handler = (void *)EIC_1_Handler,
.pfnEIC_2_Handler = (void *)EIC_2_Handler,
.pfnEIC_3_Handler = (void *)EIC_3_Handler,
.pfnEIC_4_Handler = (void *)EIC_4_Handler,
.pfnEIC_5_Handler = (void *)EIC_5_Handler,
.pfnEIC_6_Handler = (void *)EIC_6_Handler,
.pfnEIC_7_Handler = (void *)EIC_7_Handler,
.pfnEIC_8_Handler = (void *)EIC_8_Handler,
.pfnEIC_9_Handler = (void *)EIC_9_Handler,
.pfnEIC_10_Handler = (void *)EIC_10_Handler,
.pfnEIC_11_Handler = (void *)EIC_11_Handler,
.pfnEIC_12_Handler = (void *)EIC_12_Handler,
.pfnEIC_13_Handler = (void *)EIC_13_Handler,
.pfnEIC_14_Handler = (void *)EIC_14_Handler,
.pfnEIC_15_Handler = (void *)EIC_15_Handler,
.pfnFREQM_Handler = (void *)FREQM_Handler,
.pfnNVMCTRL_0_Handler = (void *)NVMCTRL_0_Handler,
.pfnNVMCTRL_1_Handler = (void *)NVMCTRL_1_Handler,
.pfnDMAC_0_Handler = (void *)DMAC_0_Handler,
.pfnDMAC_1_Handler = (void *)DMAC_1_Handler,
.pfnDMAC_2_Handler = (void *)DMAC_2_Handler,
.pfnDMAC_3_Handler = (void *)DMAC_3_Handler,
.pfnDMAC_4_Handler = (void *)DMAC_4_Handler,
.pfnEVSYS_0_Handler = (void *)EVSYS_0_Handler,
.pfnEVSYS_1_Handler = (void *)EVSYS_1_Handler,
.pfnEVSYS_2_Handler = (void *)EVSYS_2_Handler,
.pfnEVSYS_3_Handler = (void *)EVSYS_3_Handler,
.pfnEVSYS_4_Handler = (void *)EVSYS_4_Handler,
.pfnPAC_Handler = (void *)PAC_Handler,
.pfnTAL_0_Handler = (void *)TAL_0_Handler,
.pfnTAL_1_Handler = (void *)TAL_1_Handler,
.pvReserved44 = (void *)(0UL),
.pfnRAMECC_Handler = (void *)RAMECC_Handler,
.pfnSERCOM0_0_Handler = (void *)SERCOM0_0_Handler,
.pfnSERCOM0_1_Handler = (void *)SERCOM0_1_Handler,
.pfnSERCOM0_2_Handler = (void *)SERCOM0_2_Handler,
.pfnSERCOM0_3_Handler = (void *)SERCOM0_3_Handler,
.pfnSERCOM1_0_Handler = (void *)SERCOM1_0_Handler,
.pfnSERCOM1_1_Handler = (void *)SERCOM1_1_Handler,
.pfnSERCOM1_2_Handler = (void *)SERCOM1_2_Handler,
.pfnSERCOM1_3_Handler = (void *)SERCOM1_3_Handler,
.pfnSERCOM2_0_Handler = (void *)SERCOM2_0_Handler,
.pfnSERCOM2_1_Handler = (void *)SERCOM2_1_Handler,
.pfnSERCOM2_2_Handler = (void *)SERCOM2_2_Handler,
.pfnSERCOM2_3_Handler = (void *)SERCOM2_3_Handler,
.pfnSERCOM3_0_Handler = (void *)SERCOM3_0_Handler,
.pfnSERCOM3_1_Handler = (void *)SERCOM3_1_Handler,
.pfnSERCOM3_2_Handler = (void *)SERCOM3_2_Handler,
.pfnSERCOM3_3_Handler = (void *)SERCOM3_3_Handler,
#ifdef ID_SERCOM4
.pfnSERCOM4_0_Handler = (void *)SERCOM4_0_Handler,
.pfnSERCOM4_1_Handler = (void *)SERCOM4_1_Handler,
.pfnSERCOM4_2_Handler = (void *)SERCOM4_2_Handler,
.pfnSERCOM4_3_Handler = (void *)SERCOM4_3_Handler,
#else
.pvReserved62 = (void *)(0UL),
.pvReserved63 = (void *)(0UL),
.pvReserved64 = (void *)(0UL),
.pvReserved65 = (void *)(0UL),
#endif
#ifdef ID_SERCOM5
.pfnSERCOM5_0_Handler = (void *)SERCOM5_0_Handler,
.pfnSERCOM5_1_Handler = (void *)SERCOM5_1_Handler,
.pfnSERCOM5_2_Handler = (void *)SERCOM5_2_Handler,
.pfnSERCOM5_3_Handler = (void *)SERCOM5_3_Handler,
#else
.pvReserved66 = (void *)(0UL),
.pvReserved67 = (void *)(0UL),
.pvReserved68 = (void *)(0UL),
.pvReserved69 = (void *)(0UL),
#endif
#ifdef ID_SERCOM6
.pfnSERCOM6_0_Handler = (void *)SERCOM6_0_Handler,
.pfnSERCOM6_1_Handler = (void *)SERCOM6_1_Handler,
.pfnSERCOM6_2_Handler = (void *)SERCOM6_2_Handler,
.pfnSERCOM6_3_Handler = (void *)SERCOM6_3_Handler,
#else
.pvReserved70 = (void *)(0UL),
.pvReserved71 = (void *)(0UL),
.pvReserved72 = (void *)(0UL),
.pvReserved73 = (void *)(0UL),
#endif
#ifdef ID_SERCOM7
.pfnSERCOM7_0_Handler = (void *)SERCOM7_0_Handler,
.pfnSERCOM7_1_Handler = (void *)SERCOM7_1_Handler,
.pfnSERCOM7_2_Handler = (void *)SERCOM7_2_Handler,
.pfnSERCOM7_3_Handler = (void *)SERCOM7_3_Handler,
#else
.pvReserved74 = (void *)(0UL),
.pvReserved75 = (void *)(0UL),
.pvReserved76 = (void *)(0UL),
.pvReserved77 = (void *)(0UL),
#endif
#ifdef ID_CAN0
.pfnCAN0_Handler = (void *)CAN0_Handler,
#else
.pvReserved78 = (void *)(0UL),
#endif
#ifdef ID_CAN1
.pfnCAN1_Handler = (void *)CAN1_Handler,
#else
.pvReserved79 = (void *)(0UL),
#endif
#ifdef ID_USB
.pfnUSB_0_Handler = (void *)USB_0_Handler,
.pfnUSB_1_Handler = (void *)USB_1_Handler,
.pfnUSB_2_Handler = (void *)USB_2_Handler,
.pfnUSB_3_Handler = (void *)USB_3_Handler,
#else
.pvReserved80 = (void *)(0UL),
.pvReserved81 = (void *)(0UL),
.pvReserved82 = (void *)(0UL),
.pvReserved83 = (void *)(0UL),
#endif
#ifdef ID_GMAC
.pfnGMAC_Handler = (void *)GMAC_Handler,
#else
.pvReserved84 = (void *)(0UL),
#endif
.pfnTCC0_0_Handler = (void *)TCC0_0_Handler,
.pfnTCC0_1_Handler = (void *)TCC0_1_Handler,
.pfnTCC0_2_Handler = (void *)TCC0_2_Handler,
.pfnTCC0_3_Handler = (void *)TCC0_3_Handler,
.pfnTCC0_4_Handler = (void *)TCC0_4_Handler,
.pfnTCC0_5_Handler = (void *)TCC0_5_Handler,
.pfnTCC0_6_Handler = (void *)TCC0_6_Handler,
.pfnTCC1_0_Handler = (void *)TCC1_0_Handler,
.pfnTCC1_1_Handler = (void *)TCC1_1_Handler,
.pfnTCC1_2_Handler = (void *)TCC1_2_Handler,
.pfnTCC1_3_Handler = (void *)TCC1_3_Handler,
.pfnTCC1_4_Handler = (void *)TCC1_4_Handler,
.pfnTCC2_0_Handler = (void *)TCC2_0_Handler,
.pfnTCC2_1_Handler = (void *)TCC2_1_Handler,
.pfnTCC2_2_Handler = (void *)TCC2_2_Handler,
.pfnTCC2_3_Handler = (void *)TCC2_3_Handler,
#ifdef ID_TCC3
.pfnTCC3_0_Handler = (void *)TCC3_0_Handler,
.pfnTCC3_1_Handler = (void *)TCC3_1_Handler,
.pfnTCC3_2_Handler = (void *)TCC3_2_Handler,
#else
.pvReserved101 = (void *)(0UL),
.pvReserved102 = (void *)(0UL),
.pvReserved103 = (void *)(0UL),
#endif
#ifdef ID_TCC4
.pfnTCC4_0_Handler = (void *)TCC4_0_Handler,
.pfnTCC4_1_Handler = (void *)TCC4_1_Handler,
.pfnTCC4_2_Handler = (void *)TCC4_2_Handler,
#else
.pvReserved104 = (void *)(0UL),
.pvReserved105 = (void *)(0UL),
.pvReserved106 = (void *)(0UL),
#endif
.pfnTC0_Handler = (void *)TC0_Handler,
.pfnTC1_Handler = (void *)TC1_Handler,
.pfnTC2_Handler = (void *)TC2_Handler,
.pfnTC3_Handler = (void *)TC3_Handler,
#ifdef ID_TC4
.pfnTC4_Handler = (void *)TC4_Handler,
#else
.pvReserved111 = (void *)(0UL),
#endif
#ifdef ID_TC5
.pfnTC5_Handler = (void *)TC5_Handler,
#else
.pvReserved112 = (void *)(0UL),
#endif
#ifdef ID_TC6
.pfnTC6_Handler = (void *)TC6_Handler,
#else
.pvReserved113 = (void *)(0UL),
#endif
#ifdef ID_TC7
.pfnTC7_Handler = (void *)TC7_Handler,
#else
.pvReserved114 = (void *)(0UL),
#endif
.pfnPDEC_0_Handler = (void *)PDEC_0_Handler,
.pfnPDEC_1_Handler = (void *)PDEC_1_Handler,
.pfnPDEC_2_Handler = (void *)PDEC_2_Handler,
.pfnADC0_0_Handler = (void *)ADC0_0_Handler,
.pfnADC0_1_Handler = (void *)ADC0_1_Handler,
.pfnADC1_0_Handler = (void *)ADC1_0_Handler,
.pfnADC1_1_Handler = (void *)ADC1_1_Handler,
.pfnAC_Handler = (void *)AC_Handler,
.pfnDAC_0_Handler = (void *)DAC_0_Handler,
.pfnDAC_1_Handler = (void *)DAC_1_Handler,
.pfnDAC_2_Handler = (void *)DAC_2_Handler,
.pfnDAC_3_Handler = (void *)DAC_3_Handler,
.pfnDAC_4_Handler = (void *)DAC_4_Handler,
#ifdef ID_I2S
.pfnI2S_Handler = (void *)I2S_Handler,
#else
.pvReserved128 = (void *)(0UL),
#endif
.pfnPCC_Handler = (void *)PCC_Handler,
.pfnAES_Handler = (void *)AES_Handler,
.pfnTRNG_Handler = (void *)TRNG_Handler,
#ifdef ID_ICM
.pfnICM_Handler = (void *)ICM_Handler,
#else
.pvReserved132 = (void *)(0UL),
#endif
#ifdef ID_PUKCC
.pfnPUKCC_Handler = (void *)PUKCC_Handler,
#else
.pvReserved133 = (void *)(0UL),
#endif
.pfnQSPI_Handler = (void *)QSPI_Handler,
#ifdef ID_SDHC0
.pfnSDHC0_Handler = (void *)SDHC0_Handler,
#else
.pvReserved135 = (void *)(0UL),
#endif
#ifdef ID_SDHC1
.pfnSDHC1_Handler = (void *)SDHC1_Handler
#else
.pvReserved136 = (void *)(0UL)
#endif
};
void Reset_Handler(void) {
#ifdef KEYBOARD_massdrop_ctrl
if (*MAGIC_ADDR == BOOTLOADER_MAGIC) {
*MAGIC_ADDR = 0x00000000;
__set_MSP(0x20008818);
SCB->VTOR = 0x00000000;
asm("bx %0" ::"r"(0x00001267));
}
#endif
uint32_t *pSrc, *pDest;
pSrc = &_etext;
pDest = &_srelocate;
if (pSrc != pDest) {
for (; pDest < &_erelocate;) {
*pDest++ = *pSrc++;
}
}
for (pDest = &_szero; pDest < &_ezero;) {
*pDest++ = 0;
}
pSrc = (uint32_t *)&_sfixed;
SCB->VTOR = ((uint32_t)pSrc & SCB_VTOR_TBLOFF_Msk);
#if __FPU_USED
SCB->CPACR |= (0xFu << 20);
__DSB();
__ISB();
#endif
__libc_init_array();
main();
while (1)
;
}
void Dummy_Handler(void) {
while (1) {
}
}