Mouse code for the MacroRat
mbed-dev/targets/TARGET_NUVOTON/TARGET_NUC472/device/startup_NUC472_442.c@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | /****************************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 2 | * @file startup_NUC472_442.c |
sahilmgandhi | 18:6a4db94011d3 | 3 | * @version V0.10 |
sahilmgandhi | 18:6a4db94011d3 | 4 | * $Revision: 11 $ |
sahilmgandhi | 18:6a4db94011d3 | 5 | * $Date: 15/09/02 10:02a $ |
sahilmgandhi | 18:6a4db94011d3 | 6 | * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Source File for NUC472/442 MCU |
sahilmgandhi | 18:6a4db94011d3 | 7 | * |
sahilmgandhi | 18:6a4db94011d3 | 8 | * @note |
sahilmgandhi | 18:6a4db94011d3 | 9 | * Copyright (C) 2013~2015 Nuvoton Technology Corp. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 10 | *****************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 11 | |
sahilmgandhi | 18:6a4db94011d3 | 12 | #include "NUC472_442.h" |
sahilmgandhi | 18:6a4db94011d3 | 13 | |
sahilmgandhi | 18:6a4db94011d3 | 14 | /* Suppress warning messages */ |
sahilmgandhi | 18:6a4db94011d3 | 15 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 16 | // Suppress warning message: extended constant initialiser used |
sahilmgandhi | 18:6a4db94011d3 | 17 | #pragma diag_suppress 1296 |
sahilmgandhi | 18:6a4db94011d3 | 18 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 19 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 20 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 21 | |
sahilmgandhi | 18:6a4db94011d3 | 22 | /* Macro Definitions */ |
sahilmgandhi | 18:6a4db94011d3 | 23 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 24 | #define WEAK __attribute__ ((weak)) |
sahilmgandhi | 18:6a4db94011d3 | 25 | #define ALIAS(f) __attribute__ ((weak, alias(#f))) |
sahilmgandhi | 18:6a4db94011d3 | 26 | |
sahilmgandhi | 18:6a4db94011d3 | 27 | #define WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) \ |
sahilmgandhi | 18:6a4db94011d3 | 28 | void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS))); |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 31 | //#define STRINGIFY(x) #x |
sahilmgandhi | 18:6a4db94011d3 | 32 | //#define _STRINGIFY(x) STRINGIFY(x) |
sahilmgandhi | 18:6a4db94011d3 | 33 | #define WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) \ |
sahilmgandhi | 18:6a4db94011d3 | 34 | void FUN(void); \ |
sahilmgandhi | 18:6a4db94011d3 | 35 | _Pragma(_STRINGIFY(_WEAK_ALIAS_FUNC(FUN, FUN_ALIAS))) |
sahilmgandhi | 18:6a4db94011d3 | 36 | #define _WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) weak __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) |
sahilmgandhi | 18:6a4db94011d3 | 37 | #define __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) FUN##=##FUN_ALIAS |
sahilmgandhi | 18:6a4db94011d3 | 38 | |
sahilmgandhi | 18:6a4db94011d3 | 39 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 40 | #define WEAK __attribute__ ((weak)) |
sahilmgandhi | 18:6a4db94011d3 | 41 | #define ALIAS(f) __attribute__ ((weak, alias(#f))) |
sahilmgandhi | 18:6a4db94011d3 | 42 | |
sahilmgandhi | 18:6a4db94011d3 | 43 | #define WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) \ |
sahilmgandhi | 18:6a4db94011d3 | 44 | void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS))); |
sahilmgandhi | 18:6a4db94011d3 | 45 | |
sahilmgandhi | 18:6a4db94011d3 | 46 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | |
sahilmgandhi | 18:6a4db94011d3 | 49 | /* Initialize segments */ |
sahilmgandhi | 18:6a4db94011d3 | 50 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 51 | extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit; |
sahilmgandhi | 18:6a4db94011d3 | 52 | extern void __main(void); |
sahilmgandhi | 18:6a4db94011d3 | 53 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 54 | void __iar_program_start(void); |
sahilmgandhi | 18:6a4db94011d3 | 55 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 56 | extern uint32_t __StackTop; |
sahilmgandhi | 18:6a4db94011d3 | 57 | extern uint32_t __etext; |
sahilmgandhi | 18:6a4db94011d3 | 58 | extern uint32_t __data_start__; |
sahilmgandhi | 18:6a4db94011d3 | 59 | extern uint32_t __data_end__; |
sahilmgandhi | 18:6a4db94011d3 | 60 | extern uint32_t __bss_start__; |
sahilmgandhi | 18:6a4db94011d3 | 61 | extern uint32_t __bss_end__; |
sahilmgandhi | 18:6a4db94011d3 | 62 | extern uint32_t __bss_extern_start__ WEAK; |
sahilmgandhi | 18:6a4db94011d3 | 63 | extern uint32_t __bss_extern_end__ WEAK; |
sahilmgandhi | 18:6a4db94011d3 | 64 | |
sahilmgandhi | 18:6a4db94011d3 | 65 | extern void uvisor_init(void); |
sahilmgandhi | 18:6a4db94011d3 | 66 | //#if defined(TOOLCHAIN_GCC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 67 | //extern void _start(void); |
sahilmgandhi | 18:6a4db94011d3 | 68 | //#endif |
sahilmgandhi | 18:6a4db94011d3 | 69 | extern void software_init_hook(void) __attribute__((weak)); |
sahilmgandhi | 18:6a4db94011d3 | 70 | extern void __libc_init_array(void); |
sahilmgandhi | 18:6a4db94011d3 | 71 | extern int main(void); |
sahilmgandhi | 18:6a4db94011d3 | 72 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 73 | |
sahilmgandhi | 18:6a4db94011d3 | 74 | /* Default empty handler */ |
sahilmgandhi | 18:6a4db94011d3 | 75 | void Default_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 76 | |
sahilmgandhi | 18:6a4db94011d3 | 77 | /* Reset handler */ |
sahilmgandhi | 18:6a4db94011d3 | 78 | void Reset_Handler(void); |
sahilmgandhi | 18:6a4db94011d3 | 79 | |
sahilmgandhi | 18:6a4db94011d3 | 80 | /* Cortex-M4 core handlers */ |
sahilmgandhi | 18:6a4db94011d3 | 81 | WEAK_ALIAS_FUNC(NMI_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 82 | WEAK_ALIAS_FUNC(HardFault_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 83 | WEAK_ALIAS_FUNC(MemManage_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 84 | WEAK_ALIAS_FUNC(BusFault_Handler , Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 85 | WEAK_ALIAS_FUNC(UsageFault_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 86 | WEAK_ALIAS_FUNC(SVC_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 87 | WEAK_ALIAS_FUNC(DebugMon_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 88 | WEAK_ALIAS_FUNC(PendSV_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 89 | WEAK_ALIAS_FUNC(SysTick_Handler, Default_Handler) |
sahilmgandhi | 18:6a4db94011d3 | 90 | |
sahilmgandhi | 18:6a4db94011d3 | 91 | /* Peripherals handlers */ |
sahilmgandhi | 18:6a4db94011d3 | 92 | WEAK_ALIAS_FUNC(BOD_IRQHandler, Default_Handler) // 0: Brown Out detection |
sahilmgandhi | 18:6a4db94011d3 | 93 | WEAK_ALIAS_FUNC(IRC_IRQHandler, Default_Handler) // 1: Internal RC |
sahilmgandhi | 18:6a4db94011d3 | 94 | WEAK_ALIAS_FUNC(PWRWU_IRQHandler, Default_Handler) // 2: Power Down Wake Up |
sahilmgandhi | 18:6a4db94011d3 | 95 | WEAK_ALIAS_FUNC(SRAMF_IRQHandler, Default_Handler) // 3: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 96 | WEAK_ALIAS_FUNC(CLKF_IRQHandler, Default_Handler) // 4: CLKF |
sahilmgandhi | 18:6a4db94011d3 | 97 | // 5: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 98 | WEAK_ALIAS_FUNC(RTC_IRQHandler, Default_Handler) // 6: Real Time Clock |
sahilmgandhi | 18:6a4db94011d3 | 99 | WEAK_ALIAS_FUNC(TAMPER_IRQHandler, Default_Handler) // 7: Tamper detection |
sahilmgandhi | 18:6a4db94011d3 | 100 | WEAK_ALIAS_FUNC(EINT0_IRQHandler, Default_Handler) // 8: External Input 0 |
sahilmgandhi | 18:6a4db94011d3 | 101 | WEAK_ALIAS_FUNC(EINT1_IRQHandler, Default_Handler) // 9: External Input 1 |
sahilmgandhi | 18:6a4db94011d3 | 102 | WEAK_ALIAS_FUNC(EINT2_IRQHandler, Default_Handler) // 10: External Input 2 |
sahilmgandhi | 18:6a4db94011d3 | 103 | WEAK_ALIAS_FUNC(EINT3_IRQHandler, Default_Handler) // 11: External Input 3 |
sahilmgandhi | 18:6a4db94011d3 | 104 | WEAK_ALIAS_FUNC(EINT4_IRQHandler, Default_Handler) // 12: External Input 4 |
sahilmgandhi | 18:6a4db94011d3 | 105 | WEAK_ALIAS_FUNC(EINT5_IRQHandler, Default_Handler) // 13: External Input 5 |
sahilmgandhi | 18:6a4db94011d3 | 106 | WEAK_ALIAS_FUNC(EINT6_IRQHandler, Default_Handler) // 14: External Input 6 |
sahilmgandhi | 18:6a4db94011d3 | 107 | WEAK_ALIAS_FUNC(EINT7_IRQHandler, Default_Handler) // 15: External Input 7 |
sahilmgandhi | 18:6a4db94011d3 | 108 | WEAK_ALIAS_FUNC(GPA_IRQHandler, Default_Handler) // 16: GPIO Port A |
sahilmgandhi | 18:6a4db94011d3 | 109 | WEAK_ALIAS_FUNC(GPB_IRQHandler, Default_Handler) // 17: GPIO Port B |
sahilmgandhi | 18:6a4db94011d3 | 110 | WEAK_ALIAS_FUNC(GPC_IRQHandler, Default_Handler) // 18: GPIO Port C |
sahilmgandhi | 18:6a4db94011d3 | 111 | WEAK_ALIAS_FUNC(GPD_IRQHandler, Default_Handler) // 19: GPIO Port D |
sahilmgandhi | 18:6a4db94011d3 | 112 | WEAK_ALIAS_FUNC(GPE_IRQHandler, Default_Handler) // 20: GPIO Port E |
sahilmgandhi | 18:6a4db94011d3 | 113 | WEAK_ALIAS_FUNC(GPF_IRQHandler, Default_Handler) // 21: GPIO Port F |
sahilmgandhi | 18:6a4db94011d3 | 114 | WEAK_ALIAS_FUNC(GPG_IRQHandler, Default_Handler) // 22: GPIO Port G |
sahilmgandhi | 18:6a4db94011d3 | 115 | WEAK_ALIAS_FUNC(GPH_IRQHandler, Default_Handler) // 23: GPIO Port H |
sahilmgandhi | 18:6a4db94011d3 | 116 | WEAK_ALIAS_FUNC(GPI_IRQHandler, Default_Handler) // 24: GPIO Port I |
sahilmgandhi | 18:6a4db94011d3 | 117 | // 25: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 118 | // 26: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 119 | // 27: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 120 | // 28: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 121 | // 29: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 122 | // 30: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 123 | // 31: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 124 | WEAK_ALIAS_FUNC(TMR0_IRQHandler, Default_Handler) // 32: Timer 0 |
sahilmgandhi | 18:6a4db94011d3 | 125 | WEAK_ALIAS_FUNC(TMR1_IRQHandler, Default_Handler) // 33: Timer 1 |
sahilmgandhi | 18:6a4db94011d3 | 126 | WEAK_ALIAS_FUNC(TMR2_IRQHandler, Default_Handler) // 34: Timer 2 |
sahilmgandhi | 18:6a4db94011d3 | 127 | WEAK_ALIAS_FUNC(TMR3_IRQHandler, Default_Handler) // 35: Timer 3 |
sahilmgandhi | 18:6a4db94011d3 | 128 | // 36: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 129 | // 37: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 130 | // 38: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 131 | // 39: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 132 | WEAK_ALIAS_FUNC(PDMA_IRQHandler, Default_Handler) // 40: Peripheral DMA |
sahilmgandhi | 18:6a4db94011d3 | 133 | // 41: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 134 | WEAK_ALIAS_FUNC(ADC_IRQHandler, Default_Handler) // 42: ADC |
sahilmgandhi | 18:6a4db94011d3 | 135 | // 43: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 136 | // 44: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 137 | // 45: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 138 | WEAK_ALIAS_FUNC(WDT_IRQHandler, Default_Handler) // 46: Watch Dog Timer |
sahilmgandhi | 18:6a4db94011d3 | 139 | WEAK_ALIAS_FUNC(WWDT_IRQHandler, Default_Handler) // 47: Window Watch Dog Timer |
sahilmgandhi | 18:6a4db94011d3 | 140 | WEAK_ALIAS_FUNC(EADC0_IRQHandler, Default_Handler) // 48: EDAC 0 |
sahilmgandhi | 18:6a4db94011d3 | 141 | WEAK_ALIAS_FUNC(EADC1_IRQHandler, Default_Handler) // 49: EDAC 1 |
sahilmgandhi | 18:6a4db94011d3 | 142 | WEAK_ALIAS_FUNC(EADC2_IRQHandler, Default_Handler) // 50: EDAC 2 |
sahilmgandhi | 18:6a4db94011d3 | 143 | WEAK_ALIAS_FUNC(EADC3_IRQHandler, Default_Handler) // 51: EDAC 3 |
sahilmgandhi | 18:6a4db94011d3 | 144 | // 52: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 145 | // 53: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 146 | // 54: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 147 | // 55: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 148 | WEAK_ALIAS_FUNC(ACMP_IRQHandler, Default_Handler) // 56: Analog Comparator |
sahilmgandhi | 18:6a4db94011d3 | 149 | // 57: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 150 | // 58: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 151 | // 59: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 152 | WEAK_ALIAS_FUNC(OPA0_IRQHandler, Default_Handler) // 60: OPA 0 |
sahilmgandhi | 18:6a4db94011d3 | 153 | WEAK_ALIAS_FUNC(OPA1_IRQHandler, Default_Handler) // 61: OPA 1 |
sahilmgandhi | 18:6a4db94011d3 | 154 | WEAK_ALIAS_FUNC(ICAP0_IRQHandler, Default_Handler) // 62: ICAP 0 |
sahilmgandhi | 18:6a4db94011d3 | 155 | WEAK_ALIAS_FUNC(ICAP1_IRQHandler, Default_Handler) // 63: ICAP 1 |
sahilmgandhi | 18:6a4db94011d3 | 156 | WEAK_ALIAS_FUNC(PWM0CH0_IRQHandler, Default_Handler) // 64: PWM0 CH0 |
sahilmgandhi | 18:6a4db94011d3 | 157 | WEAK_ALIAS_FUNC(PWM0CH1_IRQHandler, Default_Handler) // 65: PWM0 CH1 |
sahilmgandhi | 18:6a4db94011d3 | 158 | WEAK_ALIAS_FUNC(PWM0CH2_IRQHandler, Default_Handler) // 66: PWM0 CH2 |
sahilmgandhi | 18:6a4db94011d3 | 159 | WEAK_ALIAS_FUNC(PWM0CH3_IRQHandler, Default_Handler) // 67: PWM0 CH3 |
sahilmgandhi | 18:6a4db94011d3 | 160 | WEAK_ALIAS_FUNC(PWM0CH4_IRQHandler, Default_Handler) // 68: PWM0 CH4 |
sahilmgandhi | 18:6a4db94011d3 | 161 | WEAK_ALIAS_FUNC(PWM0CH5_IRQHandler, Default_Handler) // 69: PWM0 CH5 |
sahilmgandhi | 18:6a4db94011d3 | 162 | WEAK_ALIAS_FUNC(PWM0_BRK_IRQHandler, Default_Handler) // 70: PWM0 Break |
sahilmgandhi | 18:6a4db94011d3 | 163 | WEAK_ALIAS_FUNC(QEI0_IRQHandler, Default_Handler) // 71: QEI 0 |
sahilmgandhi | 18:6a4db94011d3 | 164 | WEAK_ALIAS_FUNC(PWM1CH0_IRQHandler, Default_Handler) // 72: PWM1 CH0 |
sahilmgandhi | 18:6a4db94011d3 | 165 | WEAK_ALIAS_FUNC(PWM1CH1_IRQHandler, Default_Handler) // 73: PWM1 CH1 |
sahilmgandhi | 18:6a4db94011d3 | 166 | WEAK_ALIAS_FUNC(PWM1CH2_IRQHandler, Default_Handler) // 74: PWM1 CH2 |
sahilmgandhi | 18:6a4db94011d3 | 167 | WEAK_ALIAS_FUNC(PWM1CH3_IRQHandler, Default_Handler) // 75: PWM1 CH3 |
sahilmgandhi | 18:6a4db94011d3 | 168 | WEAK_ALIAS_FUNC(PWM1CH4_IRQHandler, Default_Handler) // 76: PWM1 CH4 |
sahilmgandhi | 18:6a4db94011d3 | 169 | WEAK_ALIAS_FUNC(PWM1CH5_IRQHandler, Default_Handler) // 77: PWM1 CH5 |
sahilmgandhi | 18:6a4db94011d3 | 170 | WEAK_ALIAS_FUNC(PWM1_BRK_IRQHandler, Default_Handler) // 78: PWM1 Break |
sahilmgandhi | 18:6a4db94011d3 | 171 | WEAK_ALIAS_FUNC(QEI1_IRQHandler, Default_Handler) // 79: QEI 1 |
sahilmgandhi | 18:6a4db94011d3 | 172 | WEAK_ALIAS_FUNC(EPWM0_IRQHandler, Default_Handler) // 80: EPWM0 |
sahilmgandhi | 18:6a4db94011d3 | 173 | WEAK_ALIAS_FUNC(EPWM0BRK_IRQHandler, Default_Handler) // 81: EPWM0 Break |
sahilmgandhi | 18:6a4db94011d3 | 174 | WEAK_ALIAS_FUNC(EPWM1_IRQHandler, Default_Handler) // 82: EPWM1 |
sahilmgandhi | 18:6a4db94011d3 | 175 | WEAK_ALIAS_FUNC(EPWM1BRK_IRQHandler, Default_Handler) // 83: EPWM1 Break |
sahilmgandhi | 18:6a4db94011d3 | 176 | // 84: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 177 | // 85: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 178 | // 86: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 179 | // 87: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 180 | WEAK_ALIAS_FUNC(USBD_IRQHandler, Default_Handler) // 88: USB Device |
sahilmgandhi | 18:6a4db94011d3 | 181 | WEAK_ALIAS_FUNC(USBH_IRQHandler, Default_Handler) // 89: USB Host |
sahilmgandhi | 18:6a4db94011d3 | 182 | WEAK_ALIAS_FUNC(USB_OTG_IRQHandler, Default_Handler) // 90: USB OTG |
sahilmgandhi | 18:6a4db94011d3 | 183 | // 91: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 184 | WEAK_ALIAS_FUNC(EMAC_TX_IRQHandler, Default_Handler) // 92: Ethernet MAC TX |
sahilmgandhi | 18:6a4db94011d3 | 185 | WEAK_ALIAS_FUNC(EMAC_RX_IRQHandler, Default_Handler) // 93: Ethernet MAC RX |
sahilmgandhi | 18:6a4db94011d3 | 186 | // 94: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 187 | // 95: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 188 | WEAK_ALIAS_FUNC(SPI0_IRQHandler, Default_Handler) // 96: SPI 0 |
sahilmgandhi | 18:6a4db94011d3 | 189 | WEAK_ALIAS_FUNC(SPI1_IRQHandler, Default_Handler) // 97: SPI 1 |
sahilmgandhi | 18:6a4db94011d3 | 190 | WEAK_ALIAS_FUNC(SPI2_IRQHandler, Default_Handler) // 98: SPI 2 |
sahilmgandhi | 18:6a4db94011d3 | 191 | WEAK_ALIAS_FUNC(SPI3_IRQHandler, Default_Handler) // 99: SPI 3 |
sahilmgandhi | 18:6a4db94011d3 | 192 | // 100: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 193 | // 101: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 194 | // 102: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 195 | // 103: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 196 | WEAK_ALIAS_FUNC(UART0_IRQHandler, Default_Handler) // 104: UART 0 |
sahilmgandhi | 18:6a4db94011d3 | 197 | WEAK_ALIAS_FUNC(UART1_IRQHandler, Default_Handler) // 105: UART 1 |
sahilmgandhi | 18:6a4db94011d3 | 198 | WEAK_ALIAS_FUNC(UART2_IRQHandler, Default_Handler) // 106: UART 2 |
sahilmgandhi | 18:6a4db94011d3 | 199 | WEAK_ALIAS_FUNC(UART3_IRQHandler, Default_Handler) // 107: UART 3 |
sahilmgandhi | 18:6a4db94011d3 | 200 | WEAK_ALIAS_FUNC(UART4_IRQHandler, Default_Handler) // 108: UART 4 |
sahilmgandhi | 18:6a4db94011d3 | 201 | WEAK_ALIAS_FUNC(UART5_IRQHandler, Default_Handler) // 109: UART 5 |
sahilmgandhi | 18:6a4db94011d3 | 202 | // 110: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 203 | // 111: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 204 | WEAK_ALIAS_FUNC(I2C0_IRQHandler, Default_Handler) // 112: I2C 0 |
sahilmgandhi | 18:6a4db94011d3 | 205 | WEAK_ALIAS_FUNC(I2C1_IRQHandler, Default_Handler) // 113: I2C 1 |
sahilmgandhi | 18:6a4db94011d3 | 206 | WEAK_ALIAS_FUNC(I2C2_IRQHandler, Default_Handler) // 114: I2C 2 |
sahilmgandhi | 18:6a4db94011d3 | 207 | WEAK_ALIAS_FUNC(I2C3_IRQHandler, Default_Handler) // 115: I2C 3 |
sahilmgandhi | 18:6a4db94011d3 | 208 | WEAK_ALIAS_FUNC(I2C4_IRQHandler, Default_Handler) // 116: I2C 4 |
sahilmgandhi | 18:6a4db94011d3 | 209 | // 117: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 210 | // 118: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 211 | // 119: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 212 | WEAK_ALIAS_FUNC(SC0_IRQHandler, Default_Handler) // 120: Smart Card 0 |
sahilmgandhi | 18:6a4db94011d3 | 213 | WEAK_ALIAS_FUNC(SC1_IRQHandler, Default_Handler) // 121: Smart Card 1 |
sahilmgandhi | 18:6a4db94011d3 | 214 | WEAK_ALIAS_FUNC(SC2_IRQHandler, Default_Handler) // 122: Smart Card 2 |
sahilmgandhi | 18:6a4db94011d3 | 215 | WEAK_ALIAS_FUNC(SC3_IRQHandler, Default_Handler) // 123: Smart Card 3 |
sahilmgandhi | 18:6a4db94011d3 | 216 | WEAK_ALIAS_FUNC(SC4_IRQHandler, Default_Handler) // 124: Smart Card 4 |
sahilmgandhi | 18:6a4db94011d3 | 217 | WEAK_ALIAS_FUNC(SC5_IRQHandler, Default_Handler) // 125: Smart Card 5 |
sahilmgandhi | 18:6a4db94011d3 | 218 | // 126: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 219 | // 127: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 220 | WEAK_ALIAS_FUNC(CAN0_IRQHandler, Default_Handler) // 128: CAN 0 |
sahilmgandhi | 18:6a4db94011d3 | 221 | WEAK_ALIAS_FUNC(CAN1_IRQHandler, Default_Handler) // 129: CAN 1 |
sahilmgandhi | 18:6a4db94011d3 | 222 | // 130: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 223 | // 131: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 224 | WEAK_ALIAS_FUNC(I2S0_IRQHandler, Default_Handler) // 132: I2S 0 |
sahilmgandhi | 18:6a4db94011d3 | 225 | WEAK_ALIAS_FUNC(I2S1_IRQHandler, Default_Handler) // 133: I2S 1 |
sahilmgandhi | 18:6a4db94011d3 | 226 | // 134: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 227 | // 135: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 228 | WEAK_ALIAS_FUNC(SD_IRQHandler, Default_Handler) // 136: SD card |
sahilmgandhi | 18:6a4db94011d3 | 229 | // 137: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 230 | WEAK_ALIAS_FUNC(PS2D_IRQHandler, Default_Handler) // 138: PS/2 device |
sahilmgandhi | 18:6a4db94011d3 | 231 | WEAK_ALIAS_FUNC(CAP_IRQHandler, Default_Handler) // 139: VIN |
sahilmgandhi | 18:6a4db94011d3 | 232 | WEAK_ALIAS_FUNC(CRYPTO_IRQHandler, Default_Handler) // 140: CRYPTO |
sahilmgandhi | 18:6a4db94011d3 | 233 | WEAK_ALIAS_FUNC(CRC_IRQHandler, Default_Handler) // 141: CRC |
sahilmgandhi | 18:6a4db94011d3 | 234 | |
sahilmgandhi | 18:6a4db94011d3 | 235 | /* Vector table */ |
sahilmgandhi | 18:6a4db94011d3 | 236 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 237 | __attribute__ ((section("RESET"))) |
sahilmgandhi | 18:6a4db94011d3 | 238 | const uint32_t __vector_handlers[] = { |
sahilmgandhi | 18:6a4db94011d3 | 239 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 240 | extern uint32_t CSTACK$$Limit; |
sahilmgandhi | 18:6a4db94011d3 | 241 | const uint32_t __vector_table[] @ ".intvec" = { |
sahilmgandhi | 18:6a4db94011d3 | 242 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 243 | __attribute__ ((section(".vector_table"))) |
sahilmgandhi | 18:6a4db94011d3 | 244 | const uint32_t __vector_handlers[] = { |
sahilmgandhi | 18:6a4db94011d3 | 245 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 246 | |
sahilmgandhi | 18:6a4db94011d3 | 247 | /* Configure Initial Stack Pointer, using linker-generated symbols */ |
sahilmgandhi | 18:6a4db94011d3 | 248 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 249 | (uint32_t) &Image$$ARM_LIB_STACK$$ZI$$Limit, |
sahilmgandhi | 18:6a4db94011d3 | 250 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 251 | //(uint32_t) __sfe("CSTACK"), |
sahilmgandhi | 18:6a4db94011d3 | 252 | (uint32_t) &CSTACK$$Limit, |
sahilmgandhi | 18:6a4db94011d3 | 253 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 254 | (uint32_t) &__StackTop, |
sahilmgandhi | 18:6a4db94011d3 | 255 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 256 | |
sahilmgandhi | 18:6a4db94011d3 | 257 | (uint32_t) Reset_Handler, // Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 258 | (uint32_t) NMI_Handler, // NMI Handler |
sahilmgandhi | 18:6a4db94011d3 | 259 | (uint32_t) HardFault_Handler, // Hard Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 260 | (uint32_t) MemManage_Handler, // MPU Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 261 | (uint32_t) BusFault_Handler, // Bus Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 262 | (uint32_t) UsageFault_Handler, // Usage Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 263 | 0, // Reserved |
sahilmgandhi | 18:6a4db94011d3 | 264 | 0, // Reserved |
sahilmgandhi | 18:6a4db94011d3 | 265 | 0, // Reserved |
sahilmgandhi | 18:6a4db94011d3 | 266 | 0, // Reserved |
sahilmgandhi | 18:6a4db94011d3 | 267 | (uint32_t) SVC_Handler, // SVCall Handler |
sahilmgandhi | 18:6a4db94011d3 | 268 | (uint32_t) DebugMon_Handler, // Debug Monitor Handler |
sahilmgandhi | 18:6a4db94011d3 | 269 | 0, // Reserved |
sahilmgandhi | 18:6a4db94011d3 | 270 | (uint32_t) PendSV_Handler, // PendSV Handler |
sahilmgandhi | 18:6a4db94011d3 | 271 | (uint32_t) SysTick_Handler, // SysTick Handler |
sahilmgandhi | 18:6a4db94011d3 | 272 | |
sahilmgandhi | 18:6a4db94011d3 | 273 | /* External Interrupts */ |
sahilmgandhi | 18:6a4db94011d3 | 274 | (uint32_t) BOD_IRQHandler, // 0: Brown Out detection |
sahilmgandhi | 18:6a4db94011d3 | 275 | (uint32_t) IRC_IRQHandler, // 1: Internal RC |
sahilmgandhi | 18:6a4db94011d3 | 276 | (uint32_t) PWRWU_IRQHandler, // 2: Power Down Wake Up |
sahilmgandhi | 18:6a4db94011d3 | 277 | (uint32_t) SRAMF_IRQHandler, // 3: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 278 | (uint32_t) CLKF_IRQHandler, // 4: CLKF |
sahilmgandhi | 18:6a4db94011d3 | 279 | (uint32_t) Default_Handler, // 5: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 280 | (uint32_t) RTC_IRQHandler, // 6: Real Time Clock |
sahilmgandhi | 18:6a4db94011d3 | 281 | (uint32_t) TAMPER_IRQHandler, // 7: Tamper detection |
sahilmgandhi | 18:6a4db94011d3 | 282 | (uint32_t) EINT0_IRQHandler, // 8: External Input 0 |
sahilmgandhi | 18:6a4db94011d3 | 283 | (uint32_t) EINT1_IRQHandler, // 9: External Input 1 |
sahilmgandhi | 18:6a4db94011d3 | 284 | (uint32_t) EINT2_IRQHandler, // 10: External Input 2 |
sahilmgandhi | 18:6a4db94011d3 | 285 | (uint32_t) EINT3_IRQHandler, // 11: External Input 3 |
sahilmgandhi | 18:6a4db94011d3 | 286 | (uint32_t) EINT4_IRQHandler, // 12: External Input 4 |
sahilmgandhi | 18:6a4db94011d3 | 287 | (uint32_t) EINT5_IRQHandler, // 13: External Input 5 |
sahilmgandhi | 18:6a4db94011d3 | 288 | (uint32_t) EINT6_IRQHandler, // 14: External Input 6 |
sahilmgandhi | 18:6a4db94011d3 | 289 | (uint32_t) EINT7_IRQHandler, // 15: External Input 7 |
sahilmgandhi | 18:6a4db94011d3 | 290 | (uint32_t) GPA_IRQHandler, // 16: GPIO Port A |
sahilmgandhi | 18:6a4db94011d3 | 291 | (uint32_t) GPB_IRQHandler, // 17: GPIO Port B |
sahilmgandhi | 18:6a4db94011d3 | 292 | (uint32_t) GPC_IRQHandler, // 18: GPIO Port C |
sahilmgandhi | 18:6a4db94011d3 | 293 | (uint32_t) GPD_IRQHandler, // 19: GPIO Port D |
sahilmgandhi | 18:6a4db94011d3 | 294 | (uint32_t) GPE_IRQHandler, // 20: GPIO Port E |
sahilmgandhi | 18:6a4db94011d3 | 295 | (uint32_t) GPF_IRQHandler, // 21: GPIO Port F |
sahilmgandhi | 18:6a4db94011d3 | 296 | (uint32_t) GPG_IRQHandler, // 22: GPIO Port G |
sahilmgandhi | 18:6a4db94011d3 | 297 | (uint32_t) GPH_IRQHandler, // 23: GPIO Port H |
sahilmgandhi | 18:6a4db94011d3 | 298 | (uint32_t) GPI_IRQHandler, // 24: GPIO Port I |
sahilmgandhi | 18:6a4db94011d3 | 299 | (uint32_t) Default_Handler, // 25: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 300 | (uint32_t) Default_Handler, // 26: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 301 | (uint32_t) Default_Handler, // 27: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 302 | (uint32_t) Default_Handler, // 28: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 303 | (uint32_t) Default_Handler, // 29: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 304 | (uint32_t) Default_Handler, // 30: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 305 | (uint32_t) Default_Handler, // 31: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 306 | (uint32_t) TMR0_IRQHandler, // 32: Timer 0 |
sahilmgandhi | 18:6a4db94011d3 | 307 | (uint32_t) TMR1_IRQHandler, // 33: Timer 1 |
sahilmgandhi | 18:6a4db94011d3 | 308 | (uint32_t) TMR2_IRQHandler, // 34: Timer 2 |
sahilmgandhi | 18:6a4db94011d3 | 309 | (uint32_t) TMR3_IRQHandler, // 35: Timer 3 |
sahilmgandhi | 18:6a4db94011d3 | 310 | (uint32_t) Default_Handler, // 36: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 311 | (uint32_t) Default_Handler, // 37: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 312 | (uint32_t) Default_Handler, // 38: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 313 | (uint32_t) Default_Handler, // 39: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 314 | (uint32_t) PDMA_IRQHandler, // 40: Peripheral DMA |
sahilmgandhi | 18:6a4db94011d3 | 315 | (uint32_t) Default_Handler, // 41: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 316 | (uint32_t) ADC_IRQHandler, // 42: ADC |
sahilmgandhi | 18:6a4db94011d3 | 317 | (uint32_t) Default_Handler, // 43: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 318 | (uint32_t) Default_Handler, // 44: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 319 | (uint32_t) Default_Handler, // 45: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 320 | (uint32_t) WDT_IRQHandler, // 46: Watch Dog Timer |
sahilmgandhi | 18:6a4db94011d3 | 321 | (uint32_t) WWDT_IRQHandler, // 47: Window Watch Dog Timer |
sahilmgandhi | 18:6a4db94011d3 | 322 | (uint32_t) EADC0_IRQHandler, // 48: EDAC 0 |
sahilmgandhi | 18:6a4db94011d3 | 323 | (uint32_t) EADC1_IRQHandler, // 49: EDAC 1 |
sahilmgandhi | 18:6a4db94011d3 | 324 | (uint32_t) EADC2_IRQHandler, // 50: EDAC 2 |
sahilmgandhi | 18:6a4db94011d3 | 325 | (uint32_t) EADC3_IRQHandler, // 51: EDAC 3 |
sahilmgandhi | 18:6a4db94011d3 | 326 | (uint32_t) Default_Handler, // 52: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 327 | (uint32_t) Default_Handler, // 53: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 328 | (uint32_t) Default_Handler, // 54: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 329 | (uint32_t) Default_Handler, // 55: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 330 | (uint32_t) ACMP_IRQHandler, // 56: Analog Comparator |
sahilmgandhi | 18:6a4db94011d3 | 331 | (uint32_t) Default_Handler, // 57: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 332 | (uint32_t) Default_Handler, // 58: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 333 | (uint32_t) Default_Handler, // 59: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 334 | (uint32_t) OPA0_IRQHandler, // 60: OPA 0 |
sahilmgandhi | 18:6a4db94011d3 | 335 | (uint32_t) OPA1_IRQHandler, // 61: OPA 1 |
sahilmgandhi | 18:6a4db94011d3 | 336 | (uint32_t) ICAP0_IRQHandler, // 62: ICAP 0 |
sahilmgandhi | 18:6a4db94011d3 | 337 | (uint32_t) ICAP1_IRQHandler, // 63: ICAP 1 |
sahilmgandhi | 18:6a4db94011d3 | 338 | (uint32_t) PWM0CH0_IRQHandler, // 64: PWM0 CH0 |
sahilmgandhi | 18:6a4db94011d3 | 339 | (uint32_t) PWM0CH1_IRQHandler, // 65: PWM0 CH1 |
sahilmgandhi | 18:6a4db94011d3 | 340 | (uint32_t) PWM0CH2_IRQHandler, // 66: PWM0 CH2 |
sahilmgandhi | 18:6a4db94011d3 | 341 | (uint32_t) PWM0CH3_IRQHandler, // 67: PWM0 CH3 |
sahilmgandhi | 18:6a4db94011d3 | 342 | (uint32_t) PWM0CH4_IRQHandler, // 68: PWM0 CH4 |
sahilmgandhi | 18:6a4db94011d3 | 343 | (uint32_t) PWM0CH5_IRQHandler, // 69: PWM0 CH5 |
sahilmgandhi | 18:6a4db94011d3 | 344 | (uint32_t) PWM0_BRK_IRQHandler, // 70: PWM0 Break |
sahilmgandhi | 18:6a4db94011d3 | 345 | (uint32_t) QEI0_IRQHandler, // 71: QEI 0 |
sahilmgandhi | 18:6a4db94011d3 | 346 | (uint32_t) PWM1CH0_IRQHandler, // 72: PWM1 CH0 |
sahilmgandhi | 18:6a4db94011d3 | 347 | (uint32_t) PWM1CH1_IRQHandler, // 73: PWM1 CH1 |
sahilmgandhi | 18:6a4db94011d3 | 348 | (uint32_t) PWM1CH2_IRQHandler, // 74: PWM1 CH2 |
sahilmgandhi | 18:6a4db94011d3 | 349 | (uint32_t) PWM1CH3_IRQHandler, // 75: PWM1 CH3 |
sahilmgandhi | 18:6a4db94011d3 | 350 | (uint32_t) PWM1CH4_IRQHandler, // 76: PWM1 CH4 |
sahilmgandhi | 18:6a4db94011d3 | 351 | (uint32_t) PWM1CH5_IRQHandler, // 77: PWM1 CH5 |
sahilmgandhi | 18:6a4db94011d3 | 352 | (uint32_t) PWM1_BRK_IRQHandler, // 78: PWM1 Break |
sahilmgandhi | 18:6a4db94011d3 | 353 | (uint32_t) QEI1_IRQHandler, // 79: QEI 1 |
sahilmgandhi | 18:6a4db94011d3 | 354 | (uint32_t) EPWM0_IRQHandler, // 80: EPWM0 |
sahilmgandhi | 18:6a4db94011d3 | 355 | (uint32_t) EPWM0BRK_IRQHandler, // 81: EPWM0 Break |
sahilmgandhi | 18:6a4db94011d3 | 356 | (uint32_t) EPWM1_IRQHandler, // 82: EPWM1 |
sahilmgandhi | 18:6a4db94011d3 | 357 | (uint32_t) EPWM1BRK_IRQHandler, // 83: EPWM1 Break |
sahilmgandhi | 18:6a4db94011d3 | 358 | (uint32_t) Default_Handler, // 84: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 359 | (uint32_t) Default_Handler, // 85: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 360 | (uint32_t) Default_Handler, // 86: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 361 | (uint32_t) Default_Handler, // 87: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 362 | (uint32_t) USBD_IRQHandler, // 88: USB Device |
sahilmgandhi | 18:6a4db94011d3 | 363 | (uint32_t) USBH_IRQHandler, // 89: USB Host |
sahilmgandhi | 18:6a4db94011d3 | 364 | (uint32_t) USB_OTG_IRQHandler, // 90: USB OTG |
sahilmgandhi | 18:6a4db94011d3 | 365 | (uint32_t) Default_Handler, // 91: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 366 | (uint32_t) EMAC_TX_IRQHandler, // 92: Ethernet MAC TX |
sahilmgandhi | 18:6a4db94011d3 | 367 | (uint32_t) EMAC_RX_IRQHandler, // 93: Ethernet MAC RX |
sahilmgandhi | 18:6a4db94011d3 | 368 | (uint32_t) Default_Handler, // 94: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 369 | (uint32_t) Default_Handler, // 95: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 370 | (uint32_t) SPI0_IRQHandler, // 96: SPI 0 |
sahilmgandhi | 18:6a4db94011d3 | 371 | (uint32_t) SPI1_IRQHandler, // 97: SPI 1 |
sahilmgandhi | 18:6a4db94011d3 | 372 | (uint32_t) SPI2_IRQHandler, // 98: SPI 2 |
sahilmgandhi | 18:6a4db94011d3 | 373 | (uint32_t) SPI3_IRQHandler, // 99: SPI 3 |
sahilmgandhi | 18:6a4db94011d3 | 374 | (uint32_t) Default_Handler, // 100: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 375 | (uint32_t) Default_Handler, // 101: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 376 | (uint32_t) Default_Handler, // 102: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 377 | (uint32_t) Default_Handler, // 103: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 378 | (uint32_t) UART0_IRQHandler, // 104: UART 0 |
sahilmgandhi | 18:6a4db94011d3 | 379 | (uint32_t) UART1_IRQHandler, // 105: UART 1 |
sahilmgandhi | 18:6a4db94011d3 | 380 | (uint32_t) UART2_IRQHandler, // 106: UART 2 |
sahilmgandhi | 18:6a4db94011d3 | 381 | (uint32_t) UART3_IRQHandler, // 107: UART 3 |
sahilmgandhi | 18:6a4db94011d3 | 382 | (uint32_t) UART4_IRQHandler, // 108: UART 4 |
sahilmgandhi | 18:6a4db94011d3 | 383 | (uint32_t) UART5_IRQHandler, // 109: UART 5 |
sahilmgandhi | 18:6a4db94011d3 | 384 | (uint32_t) Default_Handler, // 110: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 385 | (uint32_t) Default_Handler, // 111: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 386 | (uint32_t) I2C0_IRQHandler, // 112: I2C 0 |
sahilmgandhi | 18:6a4db94011d3 | 387 | (uint32_t) I2C1_IRQHandler, // 113: I2C 1 |
sahilmgandhi | 18:6a4db94011d3 | 388 | (uint32_t) I2C2_IRQHandler, // 114: I2C 2 |
sahilmgandhi | 18:6a4db94011d3 | 389 | (uint32_t) I2C3_IRQHandler, // 115: I2C 3 |
sahilmgandhi | 18:6a4db94011d3 | 390 | (uint32_t) I2C4_IRQHandler, // 116: I2C 4 |
sahilmgandhi | 18:6a4db94011d3 | 391 | (uint32_t) Default_Handler, // 117: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 392 | (uint32_t) Default_Handler, // 118: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 393 | (uint32_t) Default_Handler, // 119: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 394 | (uint32_t) SC0_IRQHandler, // 120: Smart Card 0 |
sahilmgandhi | 18:6a4db94011d3 | 395 | (uint32_t) SC1_IRQHandler, // 121: Smart Card 1 |
sahilmgandhi | 18:6a4db94011d3 | 396 | (uint32_t) SC2_IRQHandler, // 122: Smart Card 2 |
sahilmgandhi | 18:6a4db94011d3 | 397 | (uint32_t) SC3_IRQHandler, // 123: Smart Card 3 |
sahilmgandhi | 18:6a4db94011d3 | 398 | (uint32_t) SC4_IRQHandler, // 124: Smart Card 4 |
sahilmgandhi | 18:6a4db94011d3 | 399 | (uint32_t) SC5_IRQHandler, // 125: Smart Card 5 |
sahilmgandhi | 18:6a4db94011d3 | 400 | (uint32_t) Default_Handler, // 126: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 401 | (uint32_t) Default_Handler, // 127: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 402 | (uint32_t) CAN0_IRQHandler, // 128: CAN 0 |
sahilmgandhi | 18:6a4db94011d3 | 403 | (uint32_t) CAN1_IRQHandler, // 129: CAN 1 |
sahilmgandhi | 18:6a4db94011d3 | 404 | (uint32_t) Default_Handler, // 130: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 405 | (uint32_t) Default_Handler, // 131: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 406 | (uint32_t) I2S0_IRQHandler, // 132: I2S 0 |
sahilmgandhi | 18:6a4db94011d3 | 407 | (uint32_t) I2S1_IRQHandler, // 133: I2S 1 |
sahilmgandhi | 18:6a4db94011d3 | 408 | (uint32_t) Default_Handler, // 134: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 409 | (uint32_t) Default_Handler, // 135: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 410 | (uint32_t) SD_IRQHandler, // 136: SD card |
sahilmgandhi | 18:6a4db94011d3 | 411 | (uint32_t) Default_Handler, // 137: Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 412 | (uint32_t) PS2D_IRQHandler, // 138: PS/2 device |
sahilmgandhi | 18:6a4db94011d3 | 413 | (uint32_t) CAP_IRQHandler, // 139: VIN |
sahilmgandhi | 18:6a4db94011d3 | 414 | (uint32_t) CRYPTO_IRQHandler, // 140: CRYPTO |
sahilmgandhi | 18:6a4db94011d3 | 415 | (uint32_t) CRC_IRQHandler, // 141: CRC |
sahilmgandhi | 18:6a4db94011d3 | 416 | }; |
sahilmgandhi | 18:6a4db94011d3 | 417 | |
sahilmgandhi | 18:6a4db94011d3 | 418 | /** |
sahilmgandhi | 18:6a4db94011d3 | 419 | * \brief This is the code that gets called on processor reset. |
sahilmgandhi | 18:6a4db94011d3 | 420 | */ |
sahilmgandhi | 18:6a4db94011d3 | 421 | void Reset_Handler(void) |
sahilmgandhi | 18:6a4db94011d3 | 422 | { |
sahilmgandhi | 18:6a4db94011d3 | 423 | /* Disable register write-protection function */ |
sahilmgandhi | 18:6a4db94011d3 | 424 | SYS_UnlockReg(); |
sahilmgandhi | 18:6a4db94011d3 | 425 | |
sahilmgandhi | 18:6a4db94011d3 | 426 | /* Disable branch buffer if VCID is 0 */ |
sahilmgandhi | 18:6a4db94011d3 | 427 | if (SYS->VCID == 0) { |
sahilmgandhi | 18:6a4db94011d3 | 428 | FMC->FTCTL |= 0x80; |
sahilmgandhi | 18:6a4db94011d3 | 429 | } |
sahilmgandhi | 18:6a4db94011d3 | 430 | |
sahilmgandhi | 18:6a4db94011d3 | 431 | /* Disable Power-on Reset function */ |
sahilmgandhi | 18:6a4db94011d3 | 432 | SYS_DISABLE_POR(); |
sahilmgandhi | 18:6a4db94011d3 | 433 | |
sahilmgandhi | 18:6a4db94011d3 | 434 | /* Enable register write-protection function */ |
sahilmgandhi | 18:6a4db94011d3 | 435 | SYS_LockReg(); |
sahilmgandhi | 18:6a4db94011d3 | 436 | |
sahilmgandhi | 18:6a4db94011d3 | 437 | /** |
sahilmgandhi | 18:6a4db94011d3 | 438 | * Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start. |
sahilmgandhi | 18:6a4db94011d3 | 439 | */ |
sahilmgandhi | 18:6a4db94011d3 | 440 | SystemInit(); |
sahilmgandhi | 18:6a4db94011d3 | 441 | |
sahilmgandhi | 18:6a4db94011d3 | 442 | #if defined(__CC_ARM) |
sahilmgandhi | 18:6a4db94011d3 | 443 | __main(); |
sahilmgandhi | 18:6a4db94011d3 | 444 | |
sahilmgandhi | 18:6a4db94011d3 | 445 | #elif defined(__ICCARM__) |
sahilmgandhi | 18:6a4db94011d3 | 446 | __iar_program_start(); |
sahilmgandhi | 18:6a4db94011d3 | 447 | |
sahilmgandhi | 18:6a4db94011d3 | 448 | #elif defined(__GNUC__) |
sahilmgandhi | 18:6a4db94011d3 | 449 | uint32_t *src_ind = (uint32_t *) &__etext; |
sahilmgandhi | 18:6a4db94011d3 | 450 | uint32_t *dst_ind = (uint32_t *) &__data_start__; |
sahilmgandhi | 18:6a4db94011d3 | 451 | uint32_t *dst_end = (uint32_t *) &__data_end__; |
sahilmgandhi | 18:6a4db94011d3 | 452 | |
sahilmgandhi | 18:6a4db94011d3 | 453 | /* Move .data section from ROM to RAM */ |
sahilmgandhi | 18:6a4db94011d3 | 454 | if (src_ind != dst_ind) { |
sahilmgandhi | 18:6a4db94011d3 | 455 | for (; dst_ind < dst_end;) { |
sahilmgandhi | 18:6a4db94011d3 | 456 | *dst_ind ++ = *src_ind ++; |
sahilmgandhi | 18:6a4db94011d3 | 457 | } |
sahilmgandhi | 18:6a4db94011d3 | 458 | } |
sahilmgandhi | 18:6a4db94011d3 | 459 | |
sahilmgandhi | 18:6a4db94011d3 | 460 | /* Initialize .bss section to zero */ |
sahilmgandhi | 18:6a4db94011d3 | 461 | dst_ind = (uint32_t *) &__bss_start__; |
sahilmgandhi | 18:6a4db94011d3 | 462 | dst_end = (uint32_t *) &__bss_end__; |
sahilmgandhi | 18:6a4db94011d3 | 463 | if (dst_ind != dst_end) { |
sahilmgandhi | 18:6a4db94011d3 | 464 | for (; dst_ind < dst_end;) { |
sahilmgandhi | 18:6a4db94011d3 | 465 | *dst_ind ++ = 0; |
sahilmgandhi | 18:6a4db94011d3 | 466 | } |
sahilmgandhi | 18:6a4db94011d3 | 467 | } |
sahilmgandhi | 18:6a4db94011d3 | 468 | |
sahilmgandhi | 18:6a4db94011d3 | 469 | /* Initialize .bss.extern section to zero */ |
sahilmgandhi | 18:6a4db94011d3 | 470 | dst_ind = (uint32_t *) &__bss_extern_start__; |
sahilmgandhi | 18:6a4db94011d3 | 471 | dst_end = (uint32_t *) &__bss_extern_end__; |
sahilmgandhi | 18:6a4db94011d3 | 472 | if (dst_ind != dst_end) { |
sahilmgandhi | 18:6a4db94011d3 | 473 | for (; dst_ind < dst_end;) { |
sahilmgandhi | 18:6a4db94011d3 | 474 | *dst_ind ++ = 0; |
sahilmgandhi | 18:6a4db94011d3 | 475 | } |
sahilmgandhi | 18:6a4db94011d3 | 476 | } |
sahilmgandhi | 18:6a4db94011d3 | 477 | |
sahilmgandhi | 18:6a4db94011d3 | 478 | //uvisor_init(); |
sahilmgandhi | 18:6a4db94011d3 | 479 | |
sahilmgandhi | 18:6a4db94011d3 | 480 | if (software_init_hook) { |
sahilmgandhi | 18:6a4db94011d3 | 481 | /** |
sahilmgandhi | 18:6a4db94011d3 | 482 | * Give control to the RTOS via software_init_hook() which will also call __libc_init_array(). |
sahilmgandhi | 18:6a4db94011d3 | 483 | * Assume software_init_hook() is defined in libraries/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h. |
sahilmgandhi | 18:6a4db94011d3 | 484 | */ |
sahilmgandhi | 18:6a4db94011d3 | 485 | software_init_hook(); |
sahilmgandhi | 18:6a4db94011d3 | 486 | } |
sahilmgandhi | 18:6a4db94011d3 | 487 | else { |
sahilmgandhi | 18:6a4db94011d3 | 488 | __libc_init_array(); |
sahilmgandhi | 18:6a4db94011d3 | 489 | main(); |
sahilmgandhi | 18:6a4db94011d3 | 490 | } |
sahilmgandhi | 18:6a4db94011d3 | 491 | |
sahilmgandhi | 18:6a4db94011d3 | 492 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 493 | /* Infinite loop */ |
sahilmgandhi | 18:6a4db94011d3 | 494 | while (1); |
sahilmgandhi | 18:6a4db94011d3 | 495 | } |
sahilmgandhi | 18:6a4db94011d3 | 496 | |
sahilmgandhi | 18:6a4db94011d3 | 497 | /** |
sahilmgandhi | 18:6a4db94011d3 | 498 | * \brief Default interrupt handler for unused IRQs. |
sahilmgandhi | 18:6a4db94011d3 | 499 | */ |
sahilmgandhi | 18:6a4db94011d3 | 500 | void Default_Handler(void) |
sahilmgandhi | 18:6a4db94011d3 | 501 | { |
sahilmgandhi | 18:6a4db94011d3 | 502 | while (1); |
sahilmgandhi | 18:6a4db94011d3 | 503 | } |