Skip to content

Commit ee7c33d

Browse files
committed
K20D5M default irq handler
1 parent 15e246f commit ee7c33d

File tree

1 file changed

+68
-47
lines changed
  • libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D5M/TOOLCHAIN_GCC_ARM

1 file changed

+68
-47
lines changed

libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D5M/TOOLCHAIN_GCC_ARM/startup_MK20D5.s

Lines changed: 68 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* File: startup_ARMCM4.S
1+
/* File: startup_MK20D5.s
22
* Purpose: startup file for Cortex-M4 devices. Should use with
33
* GCC for ARM Embedded Processors
44
* Version: V1.3
@@ -134,7 +134,7 @@ __isr_vector:
134134
.long SWI_IRQHandler
135135
.size __isr_vector, . - __isr_vector
136136

137-
.text
137+
.section .text.Reset_Handler
138138
.thumb
139139
.thumb_func
140140
.align 2
@@ -152,34 +152,27 @@ Reset_Handler:
152152
ldr r2, =__data_start__
153153
ldr r3, =__data_end__
154154

155-
156-
/* Here are two copies of loop implemenations. First one favors code size
157-
* and the second one favors performance. Default uses the first one.
158-
* Change to "#if 0" to use the second one */
159-
.flash_to_ram_loop:
155+
.Lflash_to_ram_loop:
160156
cmp r2, r3
161157
ittt lt
162158
ldrlt r0, [r1], #4
163159
strlt r0, [r2], #4
164-
blt .flash_to_ram_loop
160+
blt .Lflash_to_ram_loop
165161

166-
.flash_to_ram_loop_end:
162+
.Lflash_to_ram_loop_end:
167163

168-
169-
#ifndef __NO_SYSTEM_INIT
170164
ldr r0, =SystemInit
171165
blx r0
172-
#endif
173-
174166
ldr r0, =_start
175167
bx r0
176168
.pool
177169
.size Reset_Handler, . - Reset_Handler
178170

171+
.text
179172
/* Macro to define default handlers. Default handler
180173
* will be weak symbol and just dead loops. They can be
181174
* overwritten by other handlers */
182-
.macro def_irq_handler handler_name
175+
.macro def_default_handler handler_name
183176
.align 1
184177
.thumb_func
185178
.weak \handler_name
@@ -189,40 +182,68 @@ Reset_Handler:
189182
.size \handler_name, . - \handler_name
190183
.endm
191184

192-
def_irq_handler NMI_Handler
193-
def_irq_handler HardFault_Handler
194-
def_irq_handler MemManage_Handler
195-
def_irq_handler BusFault_Handler
196-
def_irq_handler UsageFault_Handler
197-
def_irq_handler SVC_Handler
198-
def_irq_handler DebugMon_Handler
199-
def_irq_handler PendSV_Handler
200-
def_irq_handler SysTick_Handler
201-
def_irq_handler Default_Handler
185+
def_default_handler NMI_Handler
186+
def_default_handler HardFault_Handler
187+
def_default_handler MemManage_Handler
188+
def_default_handler BusFault_Handler
189+
def_default_handler UsageFault_Handler
190+
def_default_handler SVC_Handler
191+
def_default_handler DebugMon_Handler
192+
def_default_handler PendSV_Handler
193+
def_default_handler SysTick_Handler
194+
def_default_handler Default_Handler
195+
196+
.macro def_irq_default_handler handler_name
197+
.weak \handler_name
198+
.set \handler_name, Default_Handler
199+
.endm
202200

203-
def_irq_handler WDT_IRQHandler
204-
def_irq_handler RTC_IRQHandler
205-
def_irq_handler TIM0_IRQHandler
206-
def_irq_handler TIM2_IRQHandler
207-
def_irq_handler MCIA_IRQHandler
208-
def_irq_handler MCIB_IRQHandler
209-
def_irq_handler UART0_IRQHandler
210-
def_irq_handler UART1_IRQHandler
211-
def_irq_handler UART2_IRQHandler
212-
def_irq_handler UART3_IRQHandler
213-
def_irq_handler UART4_IRQHandler
214-
def_irq_handler AACI_IRQHandler
215-
def_irq_handler CLCD_IRQHandler
216-
def_irq_handler ENET_IRQHandler
217-
def_irq_handler USBDC_IRQHandler
218-
def_irq_handler USBHC_IRQHandler
219-
def_irq_handler CHLCD_IRQHandler
220-
def_irq_handler FLEXRAY_IRQHandler
221-
def_irq_handler CAN_IRQHandler
222-
def_irq_handler LIN_IRQHandler
223-
def_irq_handler I2C_IRQHandler
224-
def_irq_handler CPU_CLCD_IRQHandler
225-
def_irq_handler SPI_IRQHandler
201+
def_irq_default_handler DMA0_IRQHandler
202+
def_irq_default_handler DMA1_IRQHandler
203+
def_irq_default_handler DMA2_IRQHandler
204+
def_irq_default_handler DMA3_IRQHandler
205+
def_irq_default_handler DMA_Error_IRQHandler
206+
def_irq_default_handler FTFL_IRQHandler
207+
def_irq_default_handler Read_Collision_IRQHandler
208+
def_irq_default_handler LVD_LVW_IRQHandler
209+
def_irq_default_handler LLW_IRQHandler
210+
def_irq_default_handler Watchdog_IRQHandler
211+
def_irq_default_handler I2C0_IRQHandler
212+
def_irq_default_handler SPI0_IRQHandler
213+
def_irq_default_handler I2S0_Tx_IRQHandler
214+
def_irq_default_handler I2S0_Rx_IRQHandler
215+
def_irq_default_handler UART0_LON_IRQHandler
216+
def_irq_default_handler UART0_RX_TX_IRQHandler
217+
def_irq_default_handler UART0_ERR_IRQHandler
218+
def_irq_default_handler UART1_RX_TX_IRQHandler
219+
def_irq_default_handler UART1_ERR_IRQHandler
220+
def_irq_default_handler UART2_RX_TX_IRQHandler
221+
def_irq_default_handler UART2_ERR_IRQHandler
222+
def_irq_default_handler ADC0_IRQHandler
223+
def_irq_default_handler CMP0_IRQHandler
224+
def_irq_default_handler CMP1_IRQHandler
225+
def_irq_default_handler FTM0_IRQHandler
226+
def_irq_default_handler FTM1_IRQHandler
227+
def_irq_default_handler CMT_IRQHandler
228+
def_irq_default_handler RTC_IRQHandler
229+
def_irq_default_handler RTC_Seconds_IRQHandler
230+
def_irq_default_handler PIT0_IRQHandler
231+
def_irq_default_handler PIT1_IRQHandler
232+
def_irq_default_handler PIT2_IRQHandler
233+
def_irq_default_handler PIT3_IRQHandler
234+
def_irq_default_handler PDB0_IRQHandler
235+
def_irq_default_handler USB0_IRQHandler
236+
def_irq_default_handler USBDCD_IRQHandler
237+
def_irq_default_handler TSI0_IRQHandler
238+
def_irq_default_handler MCG_IRQHandler
239+
def_irq_default_handler LPTimer_IRQHandler
240+
def_irq_default_handler PORTA_IRQHandler
241+
def_irq_default_handler PORTB_IRQHandler
242+
def_irq_default_handler PORTC_IRQHandler
243+
def_irq_default_handler PORTD_IRQHandler
244+
def_irq_default_handler PORTE_IRQHandler
245+
def_irq_default_handler SWI_IRQHandler
246+
def_irq_default_handler DEF_IRQHandler
226247

227248
/* Flash protection region, placed at 0x400 */
228249
.text

0 commit comments

Comments
 (0)