startup_MK24F12.S 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. /* ---------------------------------------------------------------------------------------*/
  2. /* @file: startup_MK24F12.s */
  3. /* @purpose: CMSIS Cortex-M4 Core Device Startup File */
  4. /* MK24F12 */
  5. /* @version: 2.8 */
  6. /* @date: 2016-3-21 */
  7. /* @build: b170730 */
  8. /* ---------------------------------------------------------------------------------------*/
  9. /* */
  10. /* Copyright 1997-2016 Freescale Semiconductor, Inc. */
  11. /* Copyright 2016-2017 NXP */
  12. /* Redistribution and use in source and binary forms, with or without modification, */
  13. /* are permitted provided that the following conditions are met: */
  14. /* */
  15. /* 1. Redistributions of source code must retain the above copyright notice, this list */
  16. /* of conditions and the following disclaimer. */
  17. /* */
  18. /* 2. Redistributions in binary form must reproduce the above copyright notice, this */
  19. /* list of conditions and the following disclaimer in the documentation and/or */
  20. /* other materials provided with the distribution. */
  21. /* */
  22. /* 3. Neither the name of the copyright holder nor the names of its */
  23. /* contributors may be used to endorse or promote products derived from this */
  24. /* software without specific prior written permission. */
  25. /* */
  26. /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
  27. /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
  28. /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  29. /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
  30. /* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  31. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
  32. /* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
  33. /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  34. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
  35. /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  36. /*****************************************************************************/
  37. /* Version: GCC for ARM Embedded Processors */
  38. /*****************************************************************************/
  39. .syntax unified
  40. .arch armv7-m
  41. .section .isr_vector, "a"
  42. .align 2
  43. .globl __isr_vector
  44. __isr_vector:
  45. .long __StackTop /* Top of Stack */
  46. .long Reset_Handler /* Reset Handler */
  47. .long NMI_Handler /* NMI Handler*/
  48. .long HardFault_Handler /* Hard Fault Handler*/
  49. .long MemManage_Handler /* MPU Fault Handler*/
  50. .long BusFault_Handler /* Bus Fault Handler*/
  51. .long UsageFault_Handler /* Usage Fault Handler*/
  52. .long 0 /* Reserved*/
  53. .long 0 /* Reserved*/
  54. .long 0 /* Reserved*/
  55. .long 0 /* Reserved*/
  56. .long SVC_Handler /* SVCall Handler*/
  57. .long DebugMon_Handler /* Debug Monitor Handler*/
  58. .long 0 /* Reserved*/
  59. .long PendSV_Handler /* PendSV Handler*/
  60. .long SysTick_Handler /* SysTick Handler*/
  61. /* External Interrupts*/
  62. .long DMA0_IRQHandler /* DMA Channel 0 Transfer Complete*/
  63. .long DMA1_IRQHandler /* DMA Channel 1 Transfer Complete*/
  64. .long DMA2_IRQHandler /* DMA Channel 2 Transfer Complete*/
  65. .long DMA3_IRQHandler /* DMA Channel 3 Transfer Complete*/
  66. .long DMA4_IRQHandler /* DMA Channel 4 Transfer Complete*/
  67. .long DMA5_IRQHandler /* DMA Channel 5 Transfer Complete*/
  68. .long DMA6_IRQHandler /* DMA Channel 6 Transfer Complete*/
  69. .long DMA7_IRQHandler /* DMA Channel 7 Transfer Complete*/
  70. .long DMA8_IRQHandler /* DMA Channel 8 Transfer Complete*/
  71. .long DMA9_IRQHandler /* DMA Channel 9 Transfer Complete*/
  72. .long DMA10_IRQHandler /* DMA Channel 10 Transfer Complete*/
  73. .long DMA11_IRQHandler /* DMA Channel 11 Transfer Complete*/
  74. .long DMA12_IRQHandler /* DMA Channel 12 Transfer Complete*/
  75. .long DMA13_IRQHandler /* DMA Channel 13 Transfer Complete*/
  76. .long DMA14_IRQHandler /* DMA Channel 14 Transfer Complete*/
  77. .long DMA15_IRQHandler /* DMA Channel 15 Transfer Complete*/
  78. .long DMA_Error_IRQHandler /* DMA Error Interrupt*/
  79. .long MCM_IRQHandler /* Normal Interrupt*/
  80. .long FTFE_IRQHandler /* FTFE Command complete interrupt*/
  81. .long Read_Collision_IRQHandler /* Read Collision Interrupt*/
  82. .long LVD_LVW_IRQHandler /* Low Voltage Detect, Low Voltage Warning*/
  83. .long LLWU_IRQHandler /* Low Leakage Wakeup Unit*/
  84. .long WDOG_EWM_IRQHandler /* WDOG Interrupt*/
  85. .long RNG_IRQHandler /* RNG Interrupt*/
  86. .long I2C0_IRQHandler /* I2C0 interrupt*/
  87. .long I2C1_IRQHandler /* I2C1 interrupt*/
  88. .long SPI0_IRQHandler /* SPI0 Interrupt*/
  89. .long SPI1_IRQHandler /* SPI1 Interrupt*/
  90. .long I2S0_Tx_IRQHandler /* I2S0 transmit interrupt*/
  91. .long I2S0_Rx_IRQHandler /* I2S0 receive interrupt*/
  92. .long UART0_LON_IRQHandler /* UART0 LON interrupt*/
  93. .long UART0_RX_TX_IRQHandler /* UART0 Receive/Transmit interrupt*/
  94. .long UART0_ERR_IRQHandler /* UART0 Error interrupt*/
  95. .long UART1_RX_TX_IRQHandler /* UART1 Receive/Transmit interrupt*/
  96. .long UART1_ERR_IRQHandler /* UART1 Error interrupt*/
  97. .long UART2_RX_TX_IRQHandler /* UART2 Receive/Transmit interrupt*/
  98. .long UART2_ERR_IRQHandler /* UART2 Error interrupt*/
  99. .long UART3_RX_TX_IRQHandler /* UART3 Receive/Transmit interrupt*/
  100. .long UART3_ERR_IRQHandler /* UART3 Error interrupt*/
  101. .long ADC0_IRQHandler /* ADC0 interrupt*/
  102. .long CMP0_IRQHandler /* CMP0 interrupt*/
  103. .long CMP1_IRQHandler /* CMP1 interrupt*/
  104. .long FTM0_IRQHandler /* FTM0 fault, overflow and channels interrupt*/
  105. .long FTM1_IRQHandler /* FTM1 fault, overflow and channels interrupt*/
  106. .long FTM2_IRQHandler /* FTM2 fault, overflow and channels interrupt*/
  107. .long CMT_IRQHandler /* CMT interrupt*/
  108. .long RTC_IRQHandler /* RTC interrupt*/
  109. .long RTC_Seconds_IRQHandler /* RTC seconds interrupt*/
  110. .long PIT0_IRQHandler /* PIT timer channel 0 interrupt*/
  111. .long PIT1_IRQHandler /* PIT timer channel 1 interrupt*/
  112. .long PIT2_IRQHandler /* PIT timer channel 2 interrupt*/
  113. .long PIT3_IRQHandler /* PIT timer channel 3 interrupt*/
  114. .long PDB0_IRQHandler /* PDB0 Interrupt*/
  115. .long USB0_IRQHandler /* USB0 interrupt*/
  116. .long USBDCD_IRQHandler /* USBDCD Interrupt*/
  117. .long Reserved71_IRQHandler /* Reserved interrupt 71*/
  118. .long DAC0_IRQHandler /* DAC0 interrupt*/
  119. .long MCG_IRQHandler /* MCG Interrupt*/
  120. .long LPTMR0_IRQHandler /* LPTimer interrupt*/
  121. .long PORTA_IRQHandler /* Port A interrupt*/
  122. .long PORTB_IRQHandler /* Port B interrupt*/
  123. .long PORTC_IRQHandler /* Port C interrupt*/
  124. .long PORTD_IRQHandler /* Port D interrupt*/
  125. .long PORTE_IRQHandler /* Port E interrupt*/
  126. .long SWI_IRQHandler /* Software interrupt*/
  127. .long SPI2_IRQHandler /* SPI2 Interrupt*/
  128. .long UART4_RX_TX_IRQHandler /* UART4 Receive/Transmit interrupt*/
  129. .long UART4_ERR_IRQHandler /* UART4 Error interrupt*/
  130. .long UART5_RX_TX_IRQHandler /* UART5 Receive/Transmit interrupt*/
  131. .long UART5_ERR_IRQHandler /* UART5 Error interrupt*/
  132. .long CMP2_IRQHandler /* CMP2 interrupt*/
  133. .long FTM3_IRQHandler /* FTM3 fault, overflow and channels interrupt*/
  134. .long DAC1_IRQHandler /* DAC1 interrupt*/
  135. .long ADC1_IRQHandler /* ADC1 interrupt*/
  136. .long I2C2_IRQHandler /* I2C2 interrupt*/
  137. .long CAN0_ORed_Message_buffer_IRQHandler /* CAN0 OR'd message buffers interrupt*/
  138. .long CAN0_Bus_Off_IRQHandler /* CAN0 bus off interrupt*/
  139. .long CAN0_Error_IRQHandler /* CAN0 error interrupt*/
  140. .long CAN0_Tx_Warning_IRQHandler /* CAN0 Tx warning interrupt*/
  141. .long CAN0_Rx_Warning_IRQHandler /* CAN0 Rx warning interrupt*/
  142. .long CAN0_Wake_Up_IRQHandler /* CAN0 wake up interrupt*/
  143. .long SDHC_IRQHandler /* SDHC interrupt*/
  144. .long Reserved98_IRQHandler /* Reserved interrupt 98*/
  145. .long Reserved99_IRQHandler /* Reserved interrupt 99*/
  146. .long Reserved100_IRQHandler /* Reserved interrupt 100*/
  147. .long Reserved101_IRQHandler /* Reserved interrupt 101*/
  148. .long DefaultISR /* 102*/
  149. .long DefaultISR /* 103*/
  150. .long DefaultISR /* 104*/
  151. .long DefaultISR /* 105*/
  152. .long DefaultISR /* 106*/
  153. .long DefaultISR /* 107*/
  154. .long DefaultISR /* 108*/
  155. .long DefaultISR /* 109*/
  156. .long DefaultISR /* 110*/
  157. .long DefaultISR /* 111*/
  158. .long DefaultISR /* 112*/
  159. .long DefaultISR /* 113*/
  160. .long DefaultISR /* 114*/
  161. .long DefaultISR /* 115*/
  162. .long DefaultISR /* 116*/
  163. .long DefaultISR /* 117*/
  164. .long DefaultISR /* 118*/
  165. .long DefaultISR /* 119*/
  166. .long DefaultISR /* 120*/
  167. .long DefaultISR /* 121*/
  168. .long DefaultISR /* 122*/
  169. .long DefaultISR /* 123*/
  170. .long DefaultISR /* 124*/
  171. .long DefaultISR /* 125*/
  172. .long DefaultISR /* 126*/
  173. .long DefaultISR /* 127*/
  174. .long DefaultISR /* 128*/
  175. .long DefaultISR /* 129*/
  176. .long DefaultISR /* 130*/
  177. .long DefaultISR /* 131*/
  178. .long DefaultISR /* 132*/
  179. .long DefaultISR /* 133*/
  180. .long DefaultISR /* 134*/
  181. .long DefaultISR /* 135*/
  182. .long DefaultISR /* 136*/
  183. .long DefaultISR /* 137*/
  184. .long DefaultISR /* 138*/
  185. .long DefaultISR /* 139*/
  186. .long DefaultISR /* 140*/
  187. .long DefaultISR /* 141*/
  188. .long DefaultISR /* 142*/
  189. .long DefaultISR /* 143*/
  190. .long DefaultISR /* 144*/
  191. .long DefaultISR /* 145*/
  192. .long DefaultISR /* 146*/
  193. .long DefaultISR /* 147*/
  194. .long DefaultISR /* 148*/
  195. .long DefaultISR /* 149*/
  196. .long DefaultISR /* 150*/
  197. .long DefaultISR /* 151*/
  198. .long DefaultISR /* 152*/
  199. .long DefaultISR /* 153*/
  200. .long DefaultISR /* 154*/
  201. .long DefaultISR /* 155*/
  202. .long DefaultISR /* 156*/
  203. .long DefaultISR /* 157*/
  204. .long DefaultISR /* 158*/
  205. .long DefaultISR /* 159*/
  206. .long DefaultISR /* 160*/
  207. .long DefaultISR /* 161*/
  208. .long DefaultISR /* 162*/
  209. .long DefaultISR /* 163*/
  210. .long DefaultISR /* 164*/
  211. .long DefaultISR /* 165*/
  212. .long DefaultISR /* 166*/
  213. .long DefaultISR /* 167*/
  214. .long DefaultISR /* 168*/
  215. .long DefaultISR /* 169*/
  216. .long DefaultISR /* 170*/
  217. .long DefaultISR /* 171*/
  218. .long DefaultISR /* 172*/
  219. .long DefaultISR /* 173*/
  220. .long DefaultISR /* 174*/
  221. .long DefaultISR /* 175*/
  222. .long DefaultISR /* 176*/
  223. .long DefaultISR /* 177*/
  224. .long DefaultISR /* 178*/
  225. .long DefaultISR /* 179*/
  226. .long DefaultISR /* 180*/
  227. .long DefaultISR /* 181*/
  228. .long DefaultISR /* 182*/
  229. .long DefaultISR /* 183*/
  230. .long DefaultISR /* 184*/
  231. .long DefaultISR /* 185*/
  232. .long DefaultISR /* 186*/
  233. .long DefaultISR /* 187*/
  234. .long DefaultISR /* 188*/
  235. .long DefaultISR /* 189*/
  236. .long DefaultISR /* 190*/
  237. .long DefaultISR /* 191*/
  238. .long DefaultISR /* 192*/
  239. .long DefaultISR /* 193*/
  240. .long DefaultISR /* 194*/
  241. .long DefaultISR /* 195*/
  242. .long DefaultISR /* 196*/
  243. .long DefaultISR /* 197*/
  244. .long DefaultISR /* 198*/
  245. .long DefaultISR /* 199*/
  246. .long DefaultISR /* 200*/
  247. .long DefaultISR /* 201*/
  248. .long DefaultISR /* 202*/
  249. .long DefaultISR /* 203*/
  250. .long DefaultISR /* 204*/
  251. .long DefaultISR /* 205*/
  252. .long DefaultISR /* 206*/
  253. .long DefaultISR /* 207*/
  254. .long DefaultISR /* 208*/
  255. .long DefaultISR /* 209*/
  256. .long DefaultISR /* 210*/
  257. .long DefaultISR /* 211*/
  258. .long DefaultISR /* 212*/
  259. .long DefaultISR /* 213*/
  260. .long DefaultISR /* 214*/
  261. .long DefaultISR /* 215*/
  262. .long DefaultISR /* 216*/
  263. .long DefaultISR /* 217*/
  264. .long DefaultISR /* 218*/
  265. .long DefaultISR /* 219*/
  266. .long DefaultISR /* 220*/
  267. .long DefaultISR /* 221*/
  268. .long DefaultISR /* 222*/
  269. .long DefaultISR /* 223*/
  270. .long DefaultISR /* 224*/
  271. .long DefaultISR /* 225*/
  272. .long DefaultISR /* 226*/
  273. .long DefaultISR /* 227*/
  274. .long DefaultISR /* 228*/
  275. .long DefaultISR /* 229*/
  276. .long DefaultISR /* 230*/
  277. .long DefaultISR /* 231*/
  278. .long DefaultISR /* 232*/
  279. .long DefaultISR /* 233*/
  280. .long DefaultISR /* 234*/
  281. .long DefaultISR /* 235*/
  282. .long DefaultISR /* 236*/
  283. .long DefaultISR /* 237*/
  284. .long DefaultISR /* 238*/
  285. .long DefaultISR /* 239*/
  286. .long DefaultISR /* 240*/
  287. .long DefaultISR /* 241*/
  288. .long DefaultISR /* 242*/
  289. .long DefaultISR /* 243*/
  290. .long DefaultISR /* 244*/
  291. .long DefaultISR /* 245*/
  292. .long DefaultISR /* 246*/
  293. .long DefaultISR /* 247*/
  294. .long DefaultISR /* 248*/
  295. .long DefaultISR /* 249*/
  296. .long DefaultISR /* 250*/
  297. .long DefaultISR /* 251*/
  298. .long DefaultISR /* 252*/
  299. .long DefaultISR /* 253*/
  300. .long DefaultISR /* 254*/
  301. .long 0xFFFFFFFF /* Reserved for user TRIM value*/
  302. .size __isr_vector, . - __isr_vector
  303. /* Flash Configuration */
  304. .section .FlashConfig, "a"
  305. .long 0xFFFFFFFF
  306. .long 0xFFFFFFFF
  307. .long 0xFFFFFFFF
  308. .long 0xFFFFFFFE
  309. .text
  310. .thumb
  311. /* Reset Handler */
  312. .thumb_func
  313. .align 2
  314. .globl Reset_Handler
  315. .weak Reset_Handler
  316. .type Reset_Handler, %function
  317. Reset_Handler:
  318. cpsid i /* Mask interrupts */
  319. .equ VTOR, 0xE000ED08
  320. ldr r0, =VTOR
  321. ldr r1, =__isr_vector
  322. str r1, [r0]
  323. ldr r2, [r1]
  324. msr msp, r2
  325. #ifndef __NO_SYSTEM_INIT
  326. ldr r0,=SystemInit
  327. blx r0
  328. #endif
  329. /* Loop to copy data from read only memory to RAM. The ranges
  330. * of copy from/to are specified by following symbols evaluated in
  331. * linker script.
  332. * __etext: End of code section, i.e., begin of data sections to copy from.
  333. * __data_start__/__data_end__: RAM address range that data should be
  334. * copied to. Both must be aligned to 4 bytes boundary. */
  335. ldr r1, =__etext
  336. ldr r2, =__data_start__
  337. ldr r3, =__data_end__
  338. #if 1
  339. /* Here are two copies of loop implemenations. First one favors code size
  340. * and the second one favors performance. Default uses the first one.
  341. * Change to "#if 0" to use the second one */
  342. .LC0:
  343. cmp r2, r3
  344. ittt lt
  345. ldrlt r0, [r1], #4
  346. strlt r0, [r2], #4
  347. blt .LC0
  348. #else
  349. subs r3, r2
  350. ble .LC1
  351. .LC0:
  352. subs r3, #4
  353. ldr r0, [r1, r3]
  354. str r0, [r2, r3]
  355. bgt .LC0
  356. .LC1:
  357. #endif
  358. #ifdef __STARTUP_CLEAR_BSS
  359. /* This part of work usually is done in C library startup code. Otherwise,
  360. * define this macro to enable it in this startup.
  361. *
  362. * Loop to zero out BSS section, which uses following symbols
  363. * in linker script:
  364. * __bss_start__: start of BSS section. Must align to 4
  365. * __bss_end__: end of BSS section. Must align to 4
  366. */
  367. ldr r1, =__bss_start__
  368. ldr r2, =__bss_end__
  369. movs r0, 0
  370. .LC2:
  371. cmp r1, r2
  372. itt lt
  373. strlt r0, [r1], #4
  374. blt .LC2
  375. #endif /* __STARTUP_CLEAR_BSS */
  376. cpsie i /* Unmask interrupts */
  377. #ifndef __START
  378. #define __START _start
  379. #endif
  380. #ifndef __ATOLLIC__
  381. ldr r0,=__START
  382. blx r0
  383. #else
  384. ldr r0,=__libc_init_array
  385. blx r0
  386. ldr r0,=main
  387. bx r0
  388. #endif
  389. .pool
  390. .size Reset_Handler, . - Reset_Handler
  391. .align 1
  392. .thumb_func
  393. .weak DefaultISR
  394. .type DefaultISR, %function
  395. DefaultISR:
  396. b DefaultISR
  397. .size DefaultISR, . - DefaultISR
  398. .align 1
  399. .thumb_func
  400. .weak NMI_Handler
  401. .type NMI_Handler, %function
  402. NMI_Handler:
  403. ldr r0,=NMI_Handler
  404. bx r0
  405. .size NMI_Handler, . - NMI_Handler
  406. .align 1
  407. .thumb_func
  408. .weak HardFault_Handler
  409. .type HardFault_Handler, %function
  410. HardFault_Handler:
  411. ldr r0,=HardFault_Handler
  412. bx r0
  413. .size HardFault_Handler, . - HardFault_Handler
  414. .align 1
  415. .thumb_func
  416. .weak SVC_Handler
  417. .type SVC_Handler, %function
  418. SVC_Handler:
  419. ldr r0,=SVC_Handler
  420. bx r0
  421. .size SVC_Handler, . - SVC_Handler
  422. .align 1
  423. .thumb_func
  424. .weak PendSV_Handler
  425. .type PendSV_Handler, %function
  426. PendSV_Handler:
  427. ldr r0,=PendSV_Handler
  428. bx r0
  429. .size PendSV_Handler, . - PendSV_Handler
  430. .align 1
  431. .thumb_func
  432. .weak SysTick_Handler
  433. .type SysTick_Handler, %function
  434. SysTick_Handler:
  435. ldr r0,=SysTick_Handler
  436. bx r0
  437. .size SysTick_Handler, . - SysTick_Handler
  438. .align 1
  439. .thumb_func
  440. .weak DMA0_IRQHandler
  441. .type DMA0_IRQHandler, %function
  442. DMA0_IRQHandler:
  443. ldr r0,=DMA0_DriverIRQHandler
  444. bx r0
  445. .size DMA0_IRQHandler, . - DMA0_IRQHandler
  446. .align 1
  447. .thumb_func
  448. .weak DMA1_IRQHandler
  449. .type DMA1_IRQHandler, %function
  450. DMA1_IRQHandler:
  451. ldr r0,=DMA1_DriverIRQHandler
  452. bx r0
  453. .size DMA1_IRQHandler, . - DMA1_IRQHandler
  454. .align 1
  455. .thumb_func
  456. .weak DMA2_IRQHandler
  457. .type DMA2_IRQHandler, %function
  458. DMA2_IRQHandler:
  459. ldr r0,=DMA2_DriverIRQHandler
  460. bx r0
  461. .size DMA2_IRQHandler, . - DMA2_IRQHandler
  462. .align 1
  463. .thumb_func
  464. .weak DMA3_IRQHandler
  465. .type DMA3_IRQHandler, %function
  466. DMA3_IRQHandler:
  467. ldr r0,=DMA3_DriverIRQHandler
  468. bx r0
  469. .size DMA3_IRQHandler, . - DMA3_IRQHandler
  470. .align 1
  471. .thumb_func
  472. .weak DMA4_IRQHandler
  473. .type DMA4_IRQHandler, %function
  474. DMA4_IRQHandler:
  475. ldr r0,=DMA4_DriverIRQHandler
  476. bx r0
  477. .size DMA4_IRQHandler, . - DMA4_IRQHandler
  478. .align 1
  479. .thumb_func
  480. .weak DMA5_IRQHandler
  481. .type DMA5_IRQHandler, %function
  482. DMA5_IRQHandler:
  483. ldr r0,=DMA5_DriverIRQHandler
  484. bx r0
  485. .size DMA5_IRQHandler, . - DMA5_IRQHandler
  486. .align 1
  487. .thumb_func
  488. .weak DMA6_IRQHandler
  489. .type DMA6_IRQHandler, %function
  490. DMA6_IRQHandler:
  491. ldr r0,=DMA6_DriverIRQHandler
  492. bx r0
  493. .size DMA6_IRQHandler, . - DMA6_IRQHandler
  494. .align 1
  495. .thumb_func
  496. .weak DMA7_IRQHandler
  497. .type DMA7_IRQHandler, %function
  498. DMA7_IRQHandler:
  499. ldr r0,=DMA7_DriverIRQHandler
  500. bx r0
  501. .size DMA7_IRQHandler, . - DMA7_IRQHandler
  502. .align 1
  503. .thumb_func
  504. .weak DMA8_IRQHandler
  505. .type DMA8_IRQHandler, %function
  506. DMA8_IRQHandler:
  507. ldr r0,=DMA8_DriverIRQHandler
  508. bx r0
  509. .size DMA8_IRQHandler, . - DMA8_IRQHandler
  510. .align 1
  511. .thumb_func
  512. .weak DMA9_IRQHandler
  513. .type DMA9_IRQHandler, %function
  514. DMA9_IRQHandler:
  515. ldr r0,=DMA9_DriverIRQHandler
  516. bx r0
  517. .size DMA9_IRQHandler, . - DMA9_IRQHandler
  518. .align 1
  519. .thumb_func
  520. .weak DMA10_IRQHandler
  521. .type DMA10_IRQHandler, %function
  522. DMA10_IRQHandler:
  523. ldr r0,=DMA10_DriverIRQHandler
  524. bx r0
  525. .size DMA10_IRQHandler, . - DMA10_IRQHandler
  526. .align 1
  527. .thumb_func
  528. .weak DMA11_IRQHandler
  529. .type DMA11_IRQHandler, %function
  530. DMA11_IRQHandler:
  531. ldr r0,=DMA11_DriverIRQHandler
  532. bx r0
  533. .size DMA11_IRQHandler, . - DMA11_IRQHandler
  534. .align 1
  535. .thumb_func
  536. .weak DMA12_IRQHandler
  537. .type DMA12_IRQHandler, %function
  538. DMA12_IRQHandler:
  539. ldr r0,=DMA12_DriverIRQHandler
  540. bx r0
  541. .size DMA12_IRQHandler, . - DMA12_IRQHandler
  542. .align 1
  543. .thumb_func
  544. .weak DMA13_IRQHandler
  545. .type DMA13_IRQHandler, %function
  546. DMA13_IRQHandler:
  547. ldr r0,=DMA13_DriverIRQHandler
  548. bx r0
  549. .size DMA13_IRQHandler, . - DMA13_IRQHandler
  550. .align 1
  551. .thumb_func
  552. .weak DMA14_IRQHandler
  553. .type DMA14_IRQHandler, %function
  554. DMA14_IRQHandler:
  555. ldr r0,=DMA14_DriverIRQHandler
  556. bx r0
  557. .size DMA14_IRQHandler, . - DMA14_IRQHandler
  558. .align 1
  559. .thumb_func
  560. .weak DMA15_IRQHandler
  561. .type DMA15_IRQHandler, %function
  562. DMA15_IRQHandler:
  563. ldr r0,=DMA15_DriverIRQHandler
  564. bx r0
  565. .size DMA15_IRQHandler, . - DMA15_IRQHandler
  566. .align 1
  567. .thumb_func
  568. .weak DMA_Error_IRQHandler
  569. .type DMA_Error_IRQHandler, %function
  570. DMA_Error_IRQHandler:
  571. ldr r0,=DMA_Error_DriverIRQHandler
  572. bx r0
  573. .size DMA_Error_IRQHandler, . - DMA_Error_IRQHandler
  574. .align 1
  575. .thumb_func
  576. .weak I2C0_IRQHandler
  577. .type I2C0_IRQHandler, %function
  578. I2C0_IRQHandler:
  579. ldr r0,=I2C0_DriverIRQHandler
  580. bx r0
  581. .size I2C0_IRQHandler, . - I2C0_IRQHandler
  582. .align 1
  583. .thumb_func
  584. .weak I2C1_IRQHandler
  585. .type I2C1_IRQHandler, %function
  586. I2C1_IRQHandler:
  587. ldr r0,=I2C1_DriverIRQHandler
  588. bx r0
  589. .size I2C1_IRQHandler, . - I2C1_IRQHandler
  590. .align 1
  591. .thumb_func
  592. .weak SPI0_IRQHandler
  593. .type SPI0_IRQHandler, %function
  594. SPI0_IRQHandler:
  595. ldr r0,=SPI0_DriverIRQHandler
  596. bx r0
  597. .size SPI0_IRQHandler, . - SPI0_IRQHandler
  598. .align 1
  599. .thumb_func
  600. .weak SPI1_IRQHandler
  601. .type SPI1_IRQHandler, %function
  602. SPI1_IRQHandler:
  603. ldr r0,=SPI1_DriverIRQHandler
  604. bx r0
  605. .size SPI1_IRQHandler, . - SPI1_IRQHandler
  606. .align 1
  607. .thumb_func
  608. .weak I2S0_Tx_IRQHandler
  609. .type I2S0_Tx_IRQHandler, %function
  610. I2S0_Tx_IRQHandler:
  611. ldr r0,=I2S0_Tx_DriverIRQHandler
  612. bx r0
  613. .size I2S0_Tx_IRQHandler, . - I2S0_Tx_IRQHandler
  614. .align 1
  615. .thumb_func
  616. .weak I2S0_Rx_IRQHandler
  617. .type I2S0_Rx_IRQHandler, %function
  618. I2S0_Rx_IRQHandler:
  619. ldr r0,=I2S0_Rx_DriverIRQHandler
  620. bx r0
  621. .size I2S0_Rx_IRQHandler, . - I2S0_Rx_IRQHandler
  622. .align 1
  623. .thumb_func
  624. .weak UART0_LON_IRQHandler
  625. .type UART0_LON_IRQHandler, %function
  626. UART0_LON_IRQHandler:
  627. ldr r0,=UART0_LON_DriverIRQHandler
  628. bx r0
  629. .size UART0_LON_IRQHandler, . - UART0_LON_IRQHandler
  630. .align 1
  631. .thumb_func
  632. .weak UART0_RX_TX_IRQHandler
  633. .type UART0_RX_TX_IRQHandler, %function
  634. UART0_RX_TX_IRQHandler:
  635. ldr r0,=UART0_RX_TX_DriverIRQHandler
  636. bx r0
  637. .size UART0_RX_TX_IRQHandler, . - UART0_RX_TX_IRQHandler
  638. .align 1
  639. .thumb_func
  640. .weak UART0_ERR_IRQHandler
  641. .type UART0_ERR_IRQHandler, %function
  642. UART0_ERR_IRQHandler:
  643. ldr r0,=UART0_ERR_DriverIRQHandler
  644. bx r0
  645. .size UART0_ERR_IRQHandler, . - UART0_ERR_IRQHandler
  646. .align 1
  647. .thumb_func
  648. .weak UART1_RX_TX_IRQHandler
  649. .type UART1_RX_TX_IRQHandler, %function
  650. UART1_RX_TX_IRQHandler:
  651. ldr r0,=UART1_RX_TX_DriverIRQHandler
  652. bx r0
  653. .size UART1_RX_TX_IRQHandler, . - UART1_RX_TX_IRQHandler
  654. .align 1
  655. .thumb_func
  656. .weak UART1_ERR_IRQHandler
  657. .type UART1_ERR_IRQHandler, %function
  658. UART1_ERR_IRQHandler:
  659. ldr r0,=UART1_ERR_DriverIRQHandler
  660. bx r0
  661. .size UART1_ERR_IRQHandler, . - UART1_ERR_IRQHandler
  662. .align 1
  663. .thumb_func
  664. .weak UART2_RX_TX_IRQHandler
  665. .type UART2_RX_TX_IRQHandler, %function
  666. UART2_RX_TX_IRQHandler:
  667. ldr r0,=UART2_RX_TX_DriverIRQHandler
  668. bx r0
  669. .size UART2_RX_TX_IRQHandler, . - UART2_RX_TX_IRQHandler
  670. .align 1
  671. .thumb_func
  672. .weak UART2_ERR_IRQHandler
  673. .type UART2_ERR_IRQHandler, %function
  674. UART2_ERR_IRQHandler:
  675. ldr r0,=UART2_ERR_DriverIRQHandler
  676. bx r0
  677. .size UART2_ERR_IRQHandler, . - UART2_ERR_IRQHandler
  678. .align 1
  679. .thumb_func
  680. .weak UART3_RX_TX_IRQHandler
  681. .type UART3_RX_TX_IRQHandler, %function
  682. UART3_RX_TX_IRQHandler:
  683. ldr r0,=UART3_RX_TX_DriverIRQHandler
  684. bx r0
  685. .size UART3_RX_TX_IRQHandler, . - UART3_RX_TX_IRQHandler
  686. .align 1
  687. .thumb_func
  688. .weak UART3_ERR_IRQHandler
  689. .type UART3_ERR_IRQHandler, %function
  690. UART3_ERR_IRQHandler:
  691. ldr r0,=UART3_ERR_DriverIRQHandler
  692. bx r0
  693. .size UART3_ERR_IRQHandler, . - UART3_ERR_IRQHandler
  694. .align 1
  695. .thumb_func
  696. .weak SPI2_IRQHandler
  697. .type SPI2_IRQHandler, %function
  698. SPI2_IRQHandler:
  699. ldr r0,=SPI2_DriverIRQHandler
  700. bx r0
  701. .size SPI2_IRQHandler, . - SPI2_IRQHandler
  702. .align 1
  703. .thumb_func
  704. .weak UART4_RX_TX_IRQHandler
  705. .type UART4_RX_TX_IRQHandler, %function
  706. UART4_RX_TX_IRQHandler:
  707. ldr r0,=UART4_RX_TX_DriverIRQHandler
  708. bx r0
  709. .size UART4_RX_TX_IRQHandler, . - UART4_RX_TX_IRQHandler
  710. .align 1
  711. .thumb_func
  712. .weak UART4_ERR_IRQHandler
  713. .type UART4_ERR_IRQHandler, %function
  714. UART4_ERR_IRQHandler:
  715. ldr r0,=UART4_ERR_DriverIRQHandler
  716. bx r0
  717. .size UART4_ERR_IRQHandler, . - UART4_ERR_IRQHandler
  718. .align 1
  719. .thumb_func
  720. .weak UART5_RX_TX_IRQHandler
  721. .type UART5_RX_TX_IRQHandler, %function
  722. UART5_RX_TX_IRQHandler:
  723. ldr r0,=UART5_RX_TX_DriverIRQHandler
  724. bx r0
  725. .size UART5_RX_TX_IRQHandler, . - UART5_RX_TX_IRQHandler
  726. .align 1
  727. .thumb_func
  728. .weak UART5_ERR_IRQHandler
  729. .type UART5_ERR_IRQHandler, %function
  730. UART5_ERR_IRQHandler:
  731. ldr r0,=UART5_ERR_DriverIRQHandler
  732. bx r0
  733. .size UART5_ERR_IRQHandler, . - UART5_ERR_IRQHandler
  734. .align 1
  735. .thumb_func
  736. .weak I2C2_IRQHandler
  737. .type I2C2_IRQHandler, %function
  738. I2C2_IRQHandler:
  739. ldr r0,=I2C2_DriverIRQHandler
  740. bx r0
  741. .size I2C2_IRQHandler, . - I2C2_IRQHandler
  742. .align 1
  743. .thumb_func
  744. .weak CAN0_ORed_Message_buffer_IRQHandler
  745. .type CAN0_ORed_Message_buffer_IRQHandler, %function
  746. CAN0_ORed_Message_buffer_IRQHandler:
  747. ldr r0,=CAN0_DriverIRQHandler
  748. bx r0
  749. .size CAN0_ORed_Message_buffer_IRQHandler, . - CAN0_ORed_Message_buffer_IRQHandler
  750. .align 1
  751. .thumb_func
  752. .weak CAN0_Bus_Off_IRQHandler
  753. .type CAN0_Bus_Off_IRQHandler, %function
  754. CAN0_Bus_Off_IRQHandler:
  755. ldr r0,=CAN0_DriverIRQHandler
  756. bx r0
  757. .size CAN0_Bus_Off_IRQHandler, . - CAN0_Bus_Off_IRQHandler
  758. .align 1
  759. .thumb_func
  760. .weak CAN0_Error_IRQHandler
  761. .type CAN0_Error_IRQHandler, %function
  762. CAN0_Error_IRQHandler:
  763. ldr r0,=CAN0_DriverIRQHandler
  764. bx r0
  765. .size CAN0_Error_IRQHandler, . - CAN0_Error_IRQHandler
  766. .align 1
  767. .thumb_func
  768. .weak CAN0_Tx_Warning_IRQHandler
  769. .type CAN0_Tx_Warning_IRQHandler, %function
  770. CAN0_Tx_Warning_IRQHandler:
  771. ldr r0,=CAN0_DriverIRQHandler
  772. bx r0
  773. .size CAN0_Tx_Warning_IRQHandler, . - CAN0_Tx_Warning_IRQHandler
  774. .align 1
  775. .thumb_func
  776. .weak CAN0_Rx_Warning_IRQHandler
  777. .type CAN0_Rx_Warning_IRQHandler, %function
  778. CAN0_Rx_Warning_IRQHandler:
  779. ldr r0,=CAN0_DriverIRQHandler
  780. bx r0
  781. .size CAN0_Rx_Warning_IRQHandler, . - CAN0_Rx_Warning_IRQHandler
  782. .align 1
  783. .thumb_func
  784. .weak CAN0_Wake_Up_IRQHandler
  785. .type CAN0_Wake_Up_IRQHandler, %function
  786. CAN0_Wake_Up_IRQHandler:
  787. ldr r0,=CAN0_DriverIRQHandler
  788. bx r0
  789. .size CAN0_Wake_Up_IRQHandler, . - CAN0_Wake_Up_IRQHandler
  790. .align 1
  791. .thumb_func
  792. .weak SDHC_IRQHandler
  793. .type SDHC_IRQHandler, %function
  794. SDHC_IRQHandler:
  795. ldr r0,=SDHC_DriverIRQHandler
  796. bx r0
  797. .size SDHC_IRQHandler, . - SDHC_IRQHandler
  798. /* Macro to define default handlers. Default handler
  799. * will be weak symbol and just dead loops. They can be
  800. * overwritten by other handlers */
  801. .macro def_irq_handler handler_name
  802. .weak \handler_name
  803. .set \handler_name, DefaultISR
  804. .endm
  805. /* Exception Handlers */
  806. def_irq_handler MemManage_Handler
  807. def_irq_handler BusFault_Handler
  808. def_irq_handler UsageFault_Handler
  809. def_irq_handler DebugMon_Handler
  810. def_irq_handler DMA0_DriverIRQHandler
  811. def_irq_handler DMA1_DriverIRQHandler
  812. def_irq_handler DMA2_DriverIRQHandler
  813. def_irq_handler DMA3_DriverIRQHandler
  814. def_irq_handler DMA4_DriverIRQHandler
  815. def_irq_handler DMA5_DriverIRQHandler
  816. def_irq_handler DMA6_DriverIRQHandler
  817. def_irq_handler DMA7_DriverIRQHandler
  818. def_irq_handler DMA8_DriverIRQHandler
  819. def_irq_handler DMA9_DriverIRQHandler
  820. def_irq_handler DMA10_DriverIRQHandler
  821. def_irq_handler DMA11_DriverIRQHandler
  822. def_irq_handler DMA12_DriverIRQHandler
  823. def_irq_handler DMA13_DriverIRQHandler
  824. def_irq_handler DMA14_DriverIRQHandler
  825. def_irq_handler DMA15_DriverIRQHandler
  826. def_irq_handler DMA_Error_DriverIRQHandler
  827. def_irq_handler MCM_IRQHandler
  828. def_irq_handler FTFE_IRQHandler
  829. def_irq_handler Read_Collision_IRQHandler
  830. def_irq_handler LVD_LVW_IRQHandler
  831. def_irq_handler LLWU_IRQHandler
  832. def_irq_handler WDOG_EWM_IRQHandler
  833. def_irq_handler RNG_IRQHandler
  834. def_irq_handler I2C0_DriverIRQHandler
  835. def_irq_handler I2C1_DriverIRQHandler
  836. def_irq_handler SPI0_DriverIRQHandler
  837. def_irq_handler SPI1_DriverIRQHandler
  838. def_irq_handler I2S0_Tx_DriverIRQHandler
  839. def_irq_handler I2S0_Rx_DriverIRQHandler
  840. def_irq_handler UART0_LON_DriverIRQHandler
  841. def_irq_handler UART0_RX_TX_DriverIRQHandler
  842. def_irq_handler UART0_ERR_DriverIRQHandler
  843. def_irq_handler UART1_RX_TX_DriverIRQHandler
  844. def_irq_handler UART1_ERR_DriverIRQHandler
  845. def_irq_handler UART2_RX_TX_DriverIRQHandler
  846. def_irq_handler UART2_ERR_DriverIRQHandler
  847. def_irq_handler UART3_RX_TX_DriverIRQHandler
  848. def_irq_handler UART3_ERR_DriverIRQHandler
  849. def_irq_handler ADC0_IRQHandler
  850. def_irq_handler CMP0_IRQHandler
  851. def_irq_handler CMP1_IRQHandler
  852. def_irq_handler FTM0_IRQHandler
  853. def_irq_handler FTM1_IRQHandler
  854. def_irq_handler FTM2_IRQHandler
  855. def_irq_handler CMT_IRQHandler
  856. def_irq_handler RTC_IRQHandler
  857. def_irq_handler RTC_Seconds_IRQHandler
  858. def_irq_handler PIT0_IRQHandler
  859. def_irq_handler PIT1_IRQHandler
  860. def_irq_handler PIT2_IRQHandler
  861. def_irq_handler PIT3_IRQHandler
  862. def_irq_handler PDB0_IRQHandler
  863. def_irq_handler USB0_IRQHandler
  864. def_irq_handler USBDCD_IRQHandler
  865. def_irq_handler Reserved71_IRQHandler
  866. def_irq_handler DAC0_IRQHandler
  867. def_irq_handler MCG_IRQHandler
  868. def_irq_handler LPTMR0_IRQHandler
  869. def_irq_handler PORTA_IRQHandler
  870. def_irq_handler PORTB_IRQHandler
  871. def_irq_handler PORTC_IRQHandler
  872. def_irq_handler PORTD_IRQHandler
  873. def_irq_handler PORTE_IRQHandler
  874. def_irq_handler SWI_IRQHandler
  875. def_irq_handler SPI2_DriverIRQHandler
  876. def_irq_handler UART4_RX_TX_DriverIRQHandler
  877. def_irq_handler UART4_ERR_DriverIRQHandler
  878. def_irq_handler UART5_RX_TX_DriverIRQHandler
  879. def_irq_handler UART5_ERR_DriverIRQHandler
  880. def_irq_handler CMP2_IRQHandler
  881. def_irq_handler FTM3_IRQHandler
  882. def_irq_handler DAC1_IRQHandler
  883. def_irq_handler ADC1_IRQHandler
  884. def_irq_handler I2C2_DriverIRQHandler
  885. def_irq_handler CAN0_DriverIRQHandler
  886. def_irq_handler SDHC_DriverIRQHandler
  887. def_irq_handler Reserved98_IRQHandler
  888. def_irq_handler Reserved99_IRQHandler
  889. def_irq_handler Reserved100_IRQHandler
  890. def_irq_handler Reserved101_IRQHandler
  891. .end