CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
startup_LPC17xx.s
Go to the documentation of this file.
1 ;/*****************************************************************************
2 ; * @file: startup_LPC17xx.s
3 ; * @purpose: CMSIS Cortex-M3 Core Device Startup File
4 ; * for the NXP LPC17xx Device Series
5 ; * @version: V1.03
6 ; * @date: 09. February 2010
7 ; *----------------------------------------------------------------------------
8 ; *
9 ; * Copyright (C) 2010 ARM Limited. All rights reserved.
10 ; *
11 ; * ARM Limited (ARM) is supplying this software for use with Cortex-Mx
12 ; * processor based microcontrollers. This file can be freely distributed
13 ; * within development tools that are supporting such ARM based processors.
14 ; *
15 ; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
16 ; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
17 ; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
18 ; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
19 ; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
20 ; *
21 ; ******************************************************************************/
22 
23 
24 ;
25 ; The modules in this file are included in the libraries, and may be replaced
26 ; by any user-defined modules that define the PUBLIC symbol _program_start or
27 ; a user defined start symbol.
28 ; To override the cstartup defined in the library, simply add your modified
29 ; version to the workbench project.
30 ;
31 ; The vector table is normally located at address 0.
32 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
33 ; The name "__vector_table" has special meaning for C-SPY:
34 ; it is where the SP start value is found, and the NVIC vector
35 ; table register (VTOR) is initialized to this address if != 0.
36 ;
37 ; Cortex-M version
38 ;
39 
40  MODULE ?cstartup
41 
42  ;; Forward declaration of sections.
43  SECTION CSTACK:DATA:NOROOT(3)
44 
45  SECTION .intvec:CODE:NOROOT(2)
46 
47  EXTERN __iar_program_start
48  EXTERN SystemInit
49  PUBLIC __vector_table
50  PUBLIC __vector_table_0x1c
51  PUBLIC __Vectors
52  PUBLIC __Vectors_End
53  PUBLIC __Vectors_Size
54 
55  DATA
56 
57 __vector_table
58  DCD sfe(CSTACK)
60 
66 __vector_table_0x1c
67  DCD 0
68  DCD 0
69  DCD 0
70  DCD 0
73  DCD 0
76 
77  ; External Interrupts
78  DCD WDT_IRQHandler ; 16: Watchdog Timer
79  DCD TIMER0_IRQHandler ; 17: Timer0
80  DCD TIMER1_IRQHandler ; 18: Timer1
81  DCD TIMER2_IRQHandler ; 19: Timer2
82  DCD TIMER3_IRQHandler ; 20: Timer3
83  DCD UART0_IRQHandler ; 21: UART0
84  DCD UART1_IRQHandler ; 22: UART1
85  DCD UART2_IRQHandler ; 23: UART2
86  DCD UART3_IRQHandler ; 24: UART3
87  DCD PWM1_IRQHandler ; 25: PWM1
88  DCD I2C0_IRQHandler ; 26: I2C0
89  DCD I2C1_IRQHandler ; 27: I2C1
90  DCD I2C2_IRQHandler ; 28: I2C2
91  DCD SPI_IRQHandler ; 29: SPI
92  DCD SSP0_IRQHandler ; 30: SSP0
93  DCD SSP1_IRQHandler ; 31: SSP1
94  DCD PLL0_IRQHandler ; 32: PLL0 Lock (Main PLL)
95  DCD RTC_IRQHandler ; 33: Real Time Clock
96  DCD EINT0_IRQHandler ; 34: External Interrupt 0
97  DCD EINT1_IRQHandler ; 35: External Interrupt 1
98  DCD EINT2_IRQHandler ; 36: External Interrupt 2
99  DCD EINT3_IRQHandler ; 37: External Interrupt 3
100  DCD ADC_IRQHandler ; 38: A/D Converter
101  DCD BOD_IRQHandler ; 39: Brown-Out Detect
102  DCD USB_IRQHandler ; 40: USB
103  DCD CAN_IRQHandler ; 41: CAN
104  DCD DMA_IRQHandler ; 42: General Purpose DMA
105  DCD I2S_IRQHandler ; 43: I2S
106  DCD ENET_IRQHandler ; 44: Ethernet
107  DCD RIT_IRQHandler ; 45: Repetitive Interrupt Timer
108  DCD MCPWM_IRQHandler ; 46: Motor Control PWM
109  DCD QEI_IRQHandler ; 47: Quadrature Encoder Interface
110  DCD PLL1_IRQHandler ; 48: PLL1 Lock (USB PLL)
111  DCD USBActivity_IRQHandler ; 49: USB Activity Interrupt
112  DCD CANActivity_IRQHandler ; 50: CAN Activity Interrupt
113 __Vectors_End
114 
115 __Vectors EQU __vector_table
116 __Vectors_Size EQU __Vectors_End - __Vectors
117 
118 
119 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
120 ;;
121 ;; Default interrupt handlers.
122 ;;
123  THUMB
124 
125  PUBWEAK Reset_Handler
126  SECTION .text:CODE:REORDER(2)
128  LDR R0, =SystemInit
129  BLX R0
130  LDR R0, =__iar_program_start
131  BX R0
132 
133  PUBWEAK NMI_Handler
134  SECTION .text:CODE:REORDER(1)
136  B NMI_Handler
137 
138  PUBWEAK HardFault_Handler
139  SECTION .text:CODE:REORDER(1)
142 
143  PUBWEAK MemManage_Handler
144  SECTION .text:CODE:REORDER(1)
147 
148  PUBWEAK BusFault_Handler
149  SECTION .text:CODE:REORDER(1)
152 
153  PUBWEAK UsageFault_Handler
154  SECTION .text:CODE:REORDER(1)
157 
158  PUBWEAK SVC_Handler
159  SECTION .text:CODE:REORDER(1)
161  B SVC_Handler
162 
163  PUBWEAK DebugMon_Handler
164  SECTION .text:CODE:REORDER(1)
167 
168  PUBWEAK PendSV_Handler
169  SECTION .text:CODE:REORDER(1)
172 
173  PUBWEAK SysTick_Handler
174  SECTION .text:CODE:REORDER(1)
175 SysTick_Handler
176  B SysTick_Handler
177 
178  PUBWEAK WDT_IRQHandler
179  SECTION .text:CODE:REORDER(1)
180 WDT_IRQHandler
181  B WDT_IRQHandler
182 
183  PUBWEAK TIMER0_IRQHandler
184  SECTION .text:CODE:REORDER(1)
185 TIMER0_IRQHandler
186  B TIMER0_IRQHandler
187 
188  PUBWEAK TIMER1_IRQHandler
189  SECTION .text:CODE:REORDER(1)
190 TIMER1_IRQHandler
191  B TIMER1_IRQHandler
192 
193  PUBWEAK TIMER2_IRQHandler
194  SECTION .text:CODE:REORDER(1)
195 TIMER2_IRQHandler
196  B TIMER2_IRQHandler
197 
198  PUBWEAK TIMER3_IRQHandler
199  SECTION .text:CODE:REORDER(1)
200 TIMER3_IRQHandler
201  B TIMER3_IRQHandler
202 
203  PUBWEAK UART0_IRQHandler
204  SECTION .text:CODE:REORDER(1)
205 UART0_IRQHandler
206  B UART0_IRQHandler
207 
208  PUBWEAK UART1_IRQHandler
209  SECTION .text:CODE:REORDER(1)
210 UART1_IRQHandler
211  B UART1_IRQHandler
212 
213  PUBWEAK UART2_IRQHandler
214  SECTION .text:CODE:REORDER(1)
215 UART2_IRQHandler
216  B UART2_IRQHandler
217 
218  PUBWEAK UART3_IRQHandler
219  SECTION .text:CODE:REORDER(1)
220 UART3_IRQHandler
221  B UART3_IRQHandler
222 
223  PUBWEAK PWM1_IRQHandler
224  SECTION .text:CODE:REORDER(1)
225 PWM1_IRQHandler
226  B PWM1_IRQHandler
227 
228  PUBWEAK I2C0_IRQHandler
229  SECTION .text:CODE:REORDER(1)
230 I2C0_IRQHandler
231  B I2C0_IRQHandler
232 
233  PUBWEAK I2C1_IRQHandler
234  SECTION .text:CODE:REORDER(1)
235 I2C1_IRQHandler
236  B I2C1_IRQHandler
237 
238  PUBWEAK I2C2_IRQHandler
239  SECTION .text:CODE:REORDER(1)
240 I2C2_IRQHandler
241  B I2C2_IRQHandler
242 
243  PUBWEAK SPI_IRQHandler
244  SECTION .text:CODE:REORDER(1)
245 SPI_IRQHandler
246  B SPI_IRQHandler
247 
248  PUBWEAK SSP0_IRQHandler
249  SECTION .text:CODE:REORDER(1)
250 SSP0_IRQHandler
251  B SSP0_IRQHandler
252 
253  PUBWEAK SSP1_IRQHandler
254  SECTION .text:CODE:REORDER(1)
255 SSP1_IRQHandler
256  B SSP1_IRQHandler
257 
258  PUBWEAK PLL0_IRQHandler
259  SECTION .text:CODE:REORDER(1)
260 PLL0_IRQHandler
261  B PLL0_IRQHandler
262 
263  PUBWEAK RTC_IRQHandler
264  SECTION .text:CODE:REORDER(1)
265 RTC_IRQHandler
266  B RTC_IRQHandler
267 
268  PUBWEAK EINT0_IRQHandler
269  SECTION .text:CODE:REORDER(1)
270 EINT0_IRQHandler
271  B EINT0_IRQHandler
272 
273  PUBWEAK EINT1_IRQHandler
274  SECTION .text:CODE:REORDER(1)
275 EINT1_IRQHandler
276  B EINT1_IRQHandler
277 
278  PUBWEAK EINT2_IRQHandler
279  SECTION .text:CODE:REORDER(1)
280 EINT2_IRQHandler
281  B EINT2_IRQHandler
282 
283  PUBWEAK EINT3_IRQHandler
284  SECTION .text:CODE:REORDER(1)
285 EINT3_IRQHandler
286  B EINT3_IRQHandler
287 
288  PUBWEAK ADC_IRQHandler
289  SECTION .text:CODE:REORDER(1)
290 ADC_IRQHandler
291  B ADC_IRQHandler
292 
293  PUBWEAK BOD_IRQHandler
294  SECTION .text:CODE:REORDER(1)
295 BOD_IRQHandler
296  B BOD_IRQHandler
297 
298  PUBWEAK USB_IRQHandler
299  SECTION .text:CODE:REORDER(1)
300 USB_IRQHandler
301  B USB_IRQHandler
302 
303  PUBWEAK CAN_IRQHandler
304  SECTION .text:CODE:REORDER(1)
305 CAN_IRQHandler
306  B CAN_IRQHandler
307 
308  PUBWEAK DMA_IRQHandler
309  SECTION .text:CODE:REORDER(1)
310 DMA_IRQHandler
311  B DMA_IRQHandler
312 
313  PUBWEAK I2S_IRQHandler
314  SECTION .text:CODE:REORDER(1)
315 I2S_IRQHandler
316  B I2S_IRQHandler
317 
318  PUBWEAK ENET_IRQHandler
319  SECTION .text:CODE:REORDER(1)
320 ENET_IRQHandler
321  B ENET_IRQHandler
322 
323  PUBWEAK RIT_IRQHandler
324  SECTION .text:CODE:REORDER(1)
325 RIT_IRQHandler
326  B RIT_IRQHandler
327 
328  PUBWEAK MCPWM_IRQHandler
329  SECTION .text:CODE:REORDER(1)
330 MCPWM_IRQHandler
331  B MCPWM_IRQHandler
332 
333  PUBWEAK QEI_IRQHandler
334  SECTION .text:CODE:REORDER(1)
335 QEI_IRQHandler
336  B QEI_IRQHandler
337 
338  PUBWEAK PLL1_IRQHandler
339  SECTION .text:CODE:REORDER(1)
340 PLL1_IRQHandler
341  B PLL1_IRQHandler
342 
343  PUBWEAK USBActivity_IRQHandler
344  SECTION .text:CODE:REORDER(1)
345 USBActivity_IRQHandler
346  B USBActivity_IRQHandler
347 
348  PUBWEAK CANActivity_IRQHandler
349  SECTION .text:CODE:REORDER(1)
350 CANActivity_IRQHandler
351  B CANActivity_IRQHandler
352 
353  END