1 /**************************************************
3 * Copyright 2012 IAR Systems. All rights reserved.
7 **************************************************/
10 ; The modules in this file are included in the libraries, and may be replaced
11 ; by any user-defined modules that define the PUBLIC symbol _program_start or
12 ; a user defined start symbol.
13 ; To override the cstartup defined in the library, simply add your modified
14 ; version to the workbench project.
16 ; The vector table is normally located at address 0.
17 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
18 ; The name "__vector_table" has special meaning for C-SPY:
19 ; it is where the SP start value is found, and the NVIC vector
20 ; table register (VTOR) is initialized to this address if != 0.
27 ;; Forward declaration of sections.
28 SECTION CSTACK:DATA:NOROOT(3)
30 SECTION .intvec:CODE:ROOT(2)
32 EXTERN __iar_program_start
38 DCD sfe(CSTACK) ; Top of Stack
39 DCD Reset_Handler ; Reset Handler
40 DCD NMI_Handler ; NMI Handler
41 DCD HardFault_Handler ; Hard Fault Handler
49 DCD SVC_Handler ; SVCall Handler
52 DCD PendSV_Handler ; PendSV Handler
53 DCD SysTick_Handler ; SysTick Handler
55 DCD DMA0_IRQHandler ; 0: DMA Channel 0 transfer complete intertrupt
56 DCD DMA1_IRQHandler ; 1: DMA Channel 1 transfer complete intertrupt
57 DCD DMA2_IRQHandler ; 2: DMA Channel 2 transfer complete intertrupt
58 DCD DMA3_IRQHandler ; 3: DMA Channel 3 transfer complete intertrupt
59 DCD 0 ; 4: Reserved DMA Channel 5 transfer complete intertrupt
60 DCD FTFA_IRQHandler ; 5: FTFA
61 DCD LVD_LVW_IRQHandler ; 6: Low-voltage detect, low-voltage warning
62 DCD LLW_IRQHandler ; 7: Low Leakage Wakeup
63 DCD I2C0_IRQHandler ; 8: IIC 0 interrupt
64 DCD I2C1_IRQHandler ; 9: IIC 1 intertrupt
65 DCD SPI0_IRQHandler ;10: SPI0 intertrupt
66 DCD SPI1_IRQHandler ;11: SPI1 intertrupt
67 DCD UART0_IRQHandler ;12: UART 0 status and error intertrupt
68 DCD UART1_IRQHandler ;13: UART 1 status and error intertrupt
69 DCD UART2_IRQHandler ;14: UART 2 status and error intertrupt
70 DCD ADC0_IRQHandler ;15: ADC 0 interrupt
71 DCD CMP0_IRQHandler ;16: CMP 0 interrupt
72 DCD TPM0_IRQHandler ;17: TPM 0 interrupt
73 DCD TPM1_IRQHandler ;18: TPM 1 interrupt
74 DCD TPM2_IRQHandler ;19: TPM 2 interrupt
75 DCD RTC_IRQHandler ;20: RTC Alarm interrupt
76 DCD RTC_Seconds_IRQHandler ;21: RTC Seconds interrupt
77 DCD PIT_IRQHandler ;22: PIT Single interrupt vector for all channels
79 DCD USB0_IRQHandler ;24: USB OTG intertrupt
80 DCD DAC0_IRQHandler ;25: UART 0 status intertrupt
81 DCD TSI0_IRQHandler ;26: TSI 0 interrupt
82 DCD MCG_IRQHandler ;27: MCG intertrupt
83 DCD LPTimer_IRQHandler ;28: LPTMR0 intertrupt
85 DCD PORTA_IRQHandler ;30: PORT A interrupt
86 DCD PORTD_IRQHandler ;31: PORT D interrupt
87 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
89 ;;16-byte flash configuration field that stores default protection settings (loaded on reset)
90 ;;and security information that allows the MCU to restrict acces to the FTFL module.
102 FPROT0 EQU nFPROT0^0xFF
105 FPROT1 EQU nFPROT1^0xFF
108 FPROT2 EQU nFPROT2^0xFF
111 FPROT3 EQU nFPROT3^0xFF
116 SECTION FlashConfig:CONST:REORDER:ROOT(2)
119 DCB BackDoorK0, BackDoorK1, BackDoorK2, BackDoorK3
120 DCB BackDoorK4, BackDoorK5, BackDoorK6, BackDoorK7
121 DCB FPROT0, FPROT1, FPROT2, FPROT3
122 DCB FSEC, FOPT, 0xFF, 0xFF
125 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
127 ;; Default interrupt handlers.
130 PUBWEAK Reset_Handler
131 SECTION .text:CODE:NOROOT:REORDER(2)
136 LDR R0, =__iar_program_start
140 PUBWEAK HardFault_Handler
142 PUBWEAK PendSV_Handler
143 PUBWEAK SysTick_Handler
144 PUBWEAK DMA0_IRQHandler
145 PUBWEAK DMA1_IRQHandler
146 PUBWEAK DMA2_IRQHandler
147 PUBWEAK DMA3_IRQHandler
148 PUBWEAK FTFA_IRQHandler
149 PUBWEAK LVD_LVW_IRQHandler
150 PUBWEAK LLW_IRQHandler
151 PUBWEAK I2C0_IRQHandler
152 PUBWEAK I2C1_IRQHandler
153 PUBWEAK SPI0_IRQHandler
154 PUBWEAK SPI1_IRQHandler
155 PUBWEAK UART0_IRQHandler
156 PUBWEAK UART1_IRQHandler
157 PUBWEAK UART2_IRQHandler
158 PUBWEAK ADC0_IRQHandler
159 PUBWEAK CMP0_IRQHandler
160 PUBWEAK TPM0_IRQHandler
161 PUBWEAK TPM1_IRQHandler
162 PUBWEAK TPM2_IRQHandler
163 PUBWEAK RTC_IRQHandler
164 PUBWEAK RTC_Seconds_IRQHandler
165 PUBWEAK PIT_IRQHandler
166 PUBWEAK USB0_IRQHandler
167 PUBWEAK DAC0_IRQHandler
168 PUBWEAK TSI0_IRQHandler
169 PUBWEAK MCG_IRQHandler
170 PUBWEAK LPTimer_IRQHandler
171 PUBWEAK PORTA_IRQHandler
172 PUBWEAK PORTD_IRQHandler
174 SECTION .text:CODE:REORDER:NOROOT(1)
201 RTC_Seconds_IRQHandler