1 /**************************************************
3 * Copyright 2010 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
42 DCD MemManage_Handler ; MPU Fault Handler
43 DCD BusFault_Handler ; Bus Fault Handler
44 DCD UsageFault_Handler ; Usage Fault Handler
49 DCD SVC_Handler ; SVCall Handler
50 DCD DebugMon_Handler ; Debug Monitor Handler
52 DCD PendSV_Handler ; PendSV Handler
53 DCD SysTick_Handler ; SysTick Handler
55 DCD DMA0_IRQHandler ; 0: DMA Channel 0 transfer complete
56 DCD DMA1_IRQHandler ; 1: DMA Channel 1 transfer complete
57 DCD DMA2_IRQHandler ; 2: DMA Channel 2 transfer complete
58 DCD DMA3_IRQHandler ; 3: DMA Channel 3 transfer complete
59 DCD DMA_ERR_IRQHandler ; 4: DMA Error Interrupt Channels 0-15
61 DCD FLASH_CC_IRQHandler ; 6: Flash memory command complete
62 DCD FLASH_RC_IRQHandler ; 7: Flash memory read collision
63 DCD VLD_IRQHandler ; 8: Low Voltage Detect, Low Voltage Warning
64 DCD LLWU_IRQHandler ; 9: Low Leakage Wakeup
65 DCD WDOG_IRQHandler ;10: WDOG interrupt
66 DCD I2C0_IRQHandler ;11: I2C0 interrupt
67 DCD SPI0_IRQHandler ;12: SPI 0 interrupt
68 DCD I2S0_IRQHandler ;13: I2S 0 interrupt
69 DCD I2S1_IRQHandler ;14: I2S 1 interrupt
70 DCD UART0_LON_IRQHandler ;15: UART 0 LON intertrupt
71 DCD UART0_IRQHandler ;16: UART 0 intertrupt
72 DCD UART0_ERR_IRQHandler ;17: UART 0 error intertrupt
73 DCD UART1_IRQHandler ;18: UART 1 intertrupt
74 DCD UART1_ERR_IRQHandler ;19: UART 1 error intertrupt
75 DCD UART2_IRQHandler ;20: UART 2 intertrupt
76 DCD UART2_ERR_IRQHandler ;21: UART 2 error intertrupt
77 DCD ADC0_IRQHandler ;22: ADC 0 interrupt
78 DCD CMP0_IRQHandler ;23: CMP 0 High-speed comparator interrupt
79 DCD CMP1_IRQHandler ;24: CMP 1 interrupt
80 DCD FTM0_IRQHandler ;25: FTM 0 interrupt
81 DCD FTM1_IRQHandler ;26: FTM 1 interrupt
82 DCD CMT_IRQHandler ;27: CMT intrrupt
83 DCD RTC_ALRM_IRQHandler ;28: RTC Alarm interrupt
84 DCD RTC_SEC_IRQHandler ;29: RTC Sec interrupt
85 DCD PIT0_IRQHandler ;30: PIT 0 interrupt
86 DCD PIT1_IRQHandler ;31: PIT 1 interrupt
87 DCD PIT2_IRQHandler ;32: PIT 2 interrupt
88 DCD PIT3_IRQHandler ;33: PIT 3 interrupt
89 DCD PDB_IRQHandler ;34: PDB interrupt
90 DCD USB_OTG_IRQHandler ;35: USB OTG interrupt
91 DCD USB_CD_IRQHandler ;36: USB Charger Detect interrupt
92 DCD TSI_IRQHandler ;37: TSI interrupt
93 DCD MCG_IRQHandler ;38: MCG interrupt
94 DCD LPT_IRQHandler ;39: LPT interrupt
95 DCD PORTA_IRQHandler ;40: PORT A interrupt
96 DCD PORTB_IRQHandler ;41: PORT B interrupt
97 DCD PORTC_IRQHandler ;42: PORT C interrupt
98 DCD PORTD_IRQHandler ;43: PORT D interrupt
99 DCD PORTE_IRQHandler ;44: PORT E interrupt
100 DCD SW_IRQHandler ;45: Software initiated interrupt
101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
102 ;;Flash Configuration
103 ;;16-byte flash configuration field that stores default protection settings (loaded on reset)
104 ;;and security information that allows the MCU to restrict acces to the FTFL module.
116 FPROT0 EQU nFPROT0^0xFF
119 FPROT1 EQU nFPROT1^0xFF
122 FPROT2 EQU nFPROT2^0xFF
125 FPROT3 EQU nFPROT3^0xFF
128 FEPROT EQU nFEPROT^0xFF
131 FDPROT EQU nFDPROT^0xFF
136 SECTION FlashConfig:CONST:REORDER:ROOT(2)
139 DCB BackDoorK0, BackDoorK1, BackDoorK2, BackDoorK3
140 DCB BackDoorK4, BackDoorK5, BackDoorK6, BackDoorK7
141 DCB FPROT0, FPROT1, FPROT2, FPROT3
142 DCB FSEC, FOPT, FEPROT, FDPROT
143 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
145 ;; Default interrupt handlers.
148 PUBWEAK Reset_Handler
149 SECTION .text:CODE:NOROOT:REORDER(2)
154 LDR R0, =__iar_program_start
158 PUBWEAK HardFault_Handler
159 PUBWEAK MemManage_Handler
160 PUBWEAK BusFault_Handler
161 PUBWEAK UsageFault_Handler
163 PUBWEAK DebugMon_Handler
164 PUBWEAK PendSV_Handler
165 PUBWEAK SysTick_Handler
166 PUBWEAK DMA0_IRQHandler
167 PUBWEAK DMA1_IRQHandler
168 PUBWEAK DMA2_IRQHandler
169 PUBWEAK DMA3_IRQHandler
170 PUBWEAK DMA_ERR_IRQHandler
171 PUBWEAK FLASH_CC_IRQHandler
172 PUBWEAK FLASH_RC_IRQHandler
173 PUBWEAK VLD_IRQHandler
174 PUBWEAK LLWU_IRQHandler
175 PUBWEAK WDOG_IRQHandler
176 PUBWEAK I2C0_IRQHandler
177 PUBWEAK SPI0_IRQHandler
178 PUBWEAK I2S0_IRQHandler
179 PUBWEAK I2S1_IRQHandler
180 PUBWEAK UART0_LON_IRQHandler
181 PUBWEAK UART0_IRQHandler
182 PUBWEAK UART0_ERR_IRQHandler
183 PUBWEAK UART1_IRQHandler
184 PUBWEAK UART1_ERR_IRQHandler
185 PUBWEAK UART2_IRQHandler
186 PUBWEAK UART2_ERR_IRQHandler
187 PUBWEAK ADC0_IRQHandler
188 PUBWEAK CMP0_IRQHandler
189 PUBWEAK CMP1_IRQHandler
190 PUBWEAK FTM0_IRQHandler
191 PUBWEAK FTM1_IRQHandler
192 PUBWEAK CMT_IRQHandler
193 PUBWEAK RTC_ALRM_IRQHandler
194 PUBWEAK RTC_SEC_IRQHandler
195 PUBWEAK PIT0_IRQHandler
196 PUBWEAK PIT1_IRQHandler
197 PUBWEAK PIT2_IRQHandler
198 PUBWEAK PIT3_IRQHandler
199 PUBWEAK PDB_IRQHandler
200 PUBWEAK USB_OTG_IRQHandler
201 PUBWEAK USB_CD_IRQHandler
202 PUBWEAK TSI_IRQHandler
203 PUBWEAK MCG_IRQHandler
204 PUBWEAK LPT_IRQHandler
205 PUBWEAK PORTA_IRQHandler
206 PUBWEAK PORTB_IRQHandler
207 PUBWEAK PORTC_IRQHandler
208 PUBWEAK PORTD_IRQHandler
209 PUBWEAK PORTE_IRQHandler
210 PUBWEAK SW_IRQHandler
212 SECTION .text:CODE:REORDER:NOROOT(1)