]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/TOOLCHAIN_IAR/startup_MKL46Z4.s
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_Freescale / TARGET_KLXX / TARGET_KL46Z / TOOLCHAIN_IAR / startup_MKL46Z4.s
1 /**************************************************
2 *
3 * Copyright 2010 IAR Systems. All rights reserved.
4 *
5 * $Revision: 16 $
6 *
7 **************************************************/
8
9 ;
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.
15 ;
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.
21 ;
22 ; Cortex-M version
23 ;
24
25 MODULE ?cstartup
26
27 ;; Forward declaration of sections.
28 SECTION CSTACK:DATA:NOROOT(3)
29
30 SECTION .intvec:CODE:ROOT(2)
31
32 EXTERN __iar_program_start
33 EXTERN SystemInit
34 PUBLIC __vector_table
35
36 DATA
37 __vector_table
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 0 ; Reserved
43 DCD 0 ; Reserved
44 DCD 0 ; Reserved
45 DCD 0 ; Reserved
46 DCD 0 ; Reserved
47 DCD 0 ; Reserved
48 DCD 0 ; Reserved
49 DCD SVC_Handler ; SVCall Handler
50 DCD 0 ; Reserved
51 DCD 0 ; Reserved
52 DCD PendSV_Handler ; PendSV Handler
53 DCD SysTick_Handler ; SysTick Handler
54 ; External Interrupts
55 DCD DMA0_IRQHandler ; DMA channel 0 transfer complete/error interrupt
56 DCD DMA1_IRQHandler ; DMA channel 1 transfer complete/error interrupt
57 DCD DMA2_IRQHandler ; DMA channel 2 transfer complete/error interrupt
58 DCD DMA3_IRQHandler ; DMA channel 3 transfer complete/error interrupt
59 DCD 0 ; Reserved
60 DCD FTFA_IRQHandler ; FTFA command complete/read collision interrupt
61 DCD LVD_LVW_IRQHandler ; Low Voltage Detect, Low Voltage Warning
62 DCD LLW_IRQHandler ; Low Leakage Wakeup
63 DCD I2C0_IRQHandler ; I2C0 interrupt
64 DCD I2C1_IRQHandler ; I2C0 interrupt 25
65 DCD SPI0_IRQHandler ; SPI0 interrupt
66 DCD SPI1_IRQHandler ; SPI1 interrupt
67 DCD UART0_IRQHandler ; UART0 status/error interrupt
68 DCD UART1_IRQHandler ; UART1 status/error interrupt
69 DCD UART2_IRQHandler ; UART2 status/error interrupt
70 DCD ADC0_IRQHandler ; ADC0 interrupt
71 DCD CMP0_IRQHandler ; CMP0 interrupt
72 DCD TPM0_IRQHandler ; TPM0 fault, overflow and channels interrupt
73 DCD TPM1_IRQHandler ; TPM1 fault, overflow and channels interrupt
74 DCD TPM2_IRQHandler ; TPM2 fault, overflow and channels interrupt
75 DCD RTC_IRQHandler ; RTC interrupt
76 DCD RTC_Seconds_IRQHandler ; RTC seconds interrupt
77 DCD PIT_IRQHandler ; PIT timer interrupt
78 DCD I2S0_IRQHandler ; I2S0 transmit interrupt
79 DCD USB0_IRQHandler ; USB0 interrupt
80 DCD DAC0_IRQHandler ; DAC0 interrupt
81 DCD TSI0_IRQHandler ; TSI0 interrupt
82 DCD MCG_IRQHandler ; MCG interrupt
83 DCD LPTimer_IRQHandler ; LPTimer interrupt
84 DCD LCD_IRQHandler ; Segment LCD Interrupt
85 DCD PORTA_IRQHandler ; Port A interrupt
86 DCD PORTD_IRQHandler ; Port D interrupt
87 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
88 ;;Flash Configuration
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.
91
92 BackDoorK0 EQU 0xFF
93 BackDoorK1 EQU 0xFF
94 BackDoorK2 EQU 0xFF
95 BackDoorK3 EQU 0xFF
96 BackDoorK4 EQU 0xFF
97 BackDoorK5 EQU 0xFF
98 BackDoorK6 EQU 0xFF
99 BackDoorK7 EQU 0xFF
100
101 nFPROT0 EQU 0x00
102 FPROT0 EQU nFPROT0^0xFF
103
104 nFPROT1 EQU 0x00
105 FPROT1 EQU nFPROT1^0xFF
106
107 nFPROT2 EQU 0x00
108 FPROT2 EQU nFPROT2^0xFF
109
110 nFPROT3 EQU 0x00
111 FPROT3 EQU nFPROT3^0xFF
112
113 FOPT EQU 0xFF
114
115 FSEC EQU 0xFE
116 SECTION FlashConfig:CONST:REORDER:ROOT(2)
117 Config:
118 DATA
119 DCB BackDoorK0, BackDoorK1, BackDoorK2, BackDoorK3
120 DCB BackDoorK4, BackDoorK5, BackDoorK6, BackDoorK7
121 DCB FPROT0, FPROT1, FPROT2, FPROT3
122 DCB FSEC, FOPT, 0xFF, 0xFF
123 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
124 ;;
125 ;; Default interrupt handlers.
126 ;;
127 THUMB
128 PUBWEAK Reset_Handler
129 SECTION .text:CODE:NOROOT:REORDER(2)
130 Reset_Handler
131
132 LDR R0, =SystemInit
133 BLX R0
134 LDR R0, =__iar_program_start
135 BX R0
136
137 PUBWEAK NMI_Handler
138 PUBWEAK HardFault_Handler
139 PUBWEAK SVC_Handler
140 PUBWEAK PendSV_Handler
141 PUBWEAK SysTick_Handler
142 PUBWEAK DMA0_IRQHandler
143 PUBWEAK DMA1_IRQHandler
144 PUBWEAK DMA2_IRQHandler
145 PUBWEAK DMA3_IRQHandler
146 PUBWEAK Reserved20_IRQHandler
147 PUBWEAK FTFA_IRQHandler
148 PUBWEAK LVD_LVW_IRQHandler
149 PUBWEAK LLW_IRQHandler
150 PUBWEAK I2C0_IRQHandler
151 PUBWEAK I2C1_IRQHandler
152 PUBWEAK SPI0_IRQHandler
153 PUBWEAK SPI1_IRQHandler
154 PUBWEAK UART0_IRQHandler
155 PUBWEAK UART1_IRQHandler
156 PUBWEAK UART2_IRQHandler
157 PUBWEAK ADC0_IRQHandler
158 PUBWEAK CMP0_IRQHandler
159 PUBWEAK TPM0_IRQHandler
160 PUBWEAK TPM1_IRQHandler
161 PUBWEAK TPM2_IRQHandler
162 PUBWEAK RTC_IRQHandler
163 PUBWEAK RTC_Seconds_IRQHandler
164 PUBWEAK PIT_IRQHandler
165 PUBWEAK I2S0_IRQHandler
166 PUBWEAK USB0_IRQHandler
167 PUBWEAK DAC0_IRQHandler
168 PUBWEAK TSI0_IRQHandler
169 PUBWEAK MCG_IRQHandler
170 PUBWEAK LPTimer_IRQHandler
171 PUBWEAK LCD_IRQHandler
172 PUBWEAK PORTA_IRQHandler
173 PUBWEAK PORTD_IRQHandler
174
175 SECTION .text:CODE:REORDER:NOROOT(1)
176 THUMB
177 NMI_Handler
178 HardFault_Handler
179 SVC_Handler
180 PendSV_Handler
181 SysTick_Handler
182 DMA0_IRQHandler
183 DMA1_IRQHandler
184 DMA2_IRQHandler
185 DMA3_IRQHandler
186 Reserved20_IRQHandler
187 FTFA_IRQHandler
188 LVD_LVW_IRQHandler
189 LLW_IRQHandler
190 I2C0_IRQHandler
191 I2C1_IRQHandler
192 SPI0_IRQHandler
193 SPI1_IRQHandler
194 UART0_IRQHandler
195 UART1_IRQHandler
196 UART2_IRQHandler
197 ADC0_IRQHandler
198 CMP0_IRQHandler
199 TPM0_IRQHandler
200 TPM1_IRQHandler
201 TPM2_IRQHandler
202 RTC_IRQHandler
203 RTC_Seconds_IRQHandler
204 PIT_IRQHandler
205 I2S0_IRQHandler
206 USB0_IRQHandler
207 DAC0_IRQHandler
208 TSI0_IRQHandler
209 MCG_IRQHandler
210 LPTimer_IRQHandler
211 LCD_IRQHandler
212 PORTA_IRQHandler
213 PORTD_IRQHandler
214 Default_Handler
215
216 B Default_Handler
217 END
Imprint / Impressum