startup_MK82F25615.S 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. /* ------------------------------------------------------------------------- */
  2. /* @file: startup_MK82F25615.s */
  3. /* @purpose: CMSIS Cortex-M4 Core Device Startup File */
  4. /* MK82F25615 */
  5. /* @version: 1.2 */
  6. /* @date: 2015-7-29 */
  7. /* @build: b171205 */
  8. /* ------------------------------------------------------------------------- */
  9. /* */
  10. /* The Clear BSD License */
  11. /* Copyright 1997-2016 Freescale Semiconductor, Inc. */
  12. /* Copyright 2016-2017 NXP */
  13. /* All rights reserved. */
  14. /* */
  15. /* Redistribution and use in source and binary forms, with or without */
  16. /* modification, are permitted (subject to the limitations in the */
  17. /* disclaimer below) provided that the following conditions are met: */
  18. /* */
  19. /* * Redistributions of source code must retain the above copyright */
  20. /* notice, this list of conditions and the following disclaimer. */
  21. /* */
  22. /* * Redistributions in binary form must reproduce the above copyright */
  23. /* notice, this list of conditions and the following disclaimer in the */
  24. /* documentation and/or other materials provided with the distribution. */
  25. /* */
  26. /* * Neither the name of the copyright holder nor the names of its */
  27. /* contributors may be used to endorse or promote products derived from */
  28. /* this software without specific prior written permission. */
  29. /* */
  30. /* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE */
  31. /* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT */
  32. /* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED */
  33. /* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  34. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  35. /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE */
  36. /* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR */
  37. /* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF */
  38. /* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  39. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */
  40. /* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE */
  41. /* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN */
  42. /* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  43. /*****************************************************************************/
  44. /* Version: GCC for ARM Embedded Processors */
  45. /*****************************************************************************/
  46. .syntax unified
  47. .arch armv7-m
  48. .section .isr_vector, "a"
  49. .align 2
  50. .globl __isr_vector
  51. __isr_vector:
  52. .long __StackTop /* Top of Stack */
  53. .long Reset_Handler /* Reset Handler */
  54. .long NMI_Handler /* NMI Handler*/
  55. .long HardFault_Handler /* Hard Fault Handler*/
  56. .long MemManage_Handler /* MPU Fault Handler*/
  57. .long BusFault_Handler /* Bus Fault Handler*/
  58. .long UsageFault_Handler /* Usage Fault Handler*/
  59. .long 0 /* Reserved*/
  60. .long 0 /* Reserved*/
  61. .long 0 /* Reserved*/
  62. .long 0 /* Reserved*/
  63. .long SVC_Handler /* SVCall Handler*/
  64. .long DebugMon_Handler /* Debug Monitor Handler*/
  65. .long 0 /* Reserved*/
  66. .long PendSV_Handler /* PendSV Handler*/
  67. .long SysTick_Handler /* SysTick Handler*/
  68. /* External Interrupts*/
  69. .long DMA0_DMA16_IRQHandler /* DMA channel 0,16 transfer complete*/
  70. .long DMA1_DMA17_IRQHandler /* DMA channel 1,17 transfer complete*/
  71. .long DMA2_DMA18_IRQHandler /* DMA channel 2,18 transfer complete*/
  72. .long DMA3_DMA19_IRQHandler /* DMA channel 3,19 transfer complete*/
  73. .long DMA4_DMA20_IRQHandler /* DMA channel 4,20 transfer complete*/
  74. .long DMA5_DMA21_IRQHandler /* DMA channel 5,21 transfer complete*/
  75. .long DMA6_DMA22_IRQHandler /* DMA channel 6,22 transfer complete*/
  76. .long DMA7_DMA23_IRQHandler /* DMA channel 7,23 transfer complete*/
  77. .long DMA8_DMA24_IRQHandler /* DMA channel 8,24 transfer complete*/
  78. .long DMA9_DMA25_IRQHandler /* DMA channel 9,25 transfer complete*/
  79. .long DMA10_DMA26_IRQHandler /* DMA channel 10,26 transfer complete*/
  80. .long DMA11_DMA27_IRQHandler /* DMA channel 11,27 transfer complete*/
  81. .long DMA12_DMA28_IRQHandler /* DMA channel 12,28 transfer complete*/
  82. .long DMA13_DMA29_IRQHandler /* DMA channel 13,29 transfer complete*/
  83. .long DMA14_DMA30_IRQHandler /* DMA channel 14,30 transfer complete*/
  84. .long DMA15_DMA31_IRQHandler /* DMA channel 15,31 transfer complete*/
  85. .long DMA_Error_IRQHandler /* DMA channel 0 - 31 error*/
  86. .long MCM_IRQHandler /* MCM normal interrupt*/
  87. .long FTFA_IRQHandler /* FTFA command complete*/
  88. .long Read_Collision_IRQHandler /* FTFA read collision*/
  89. .long LVD_LVW_IRQHandler /* PMC controller low-voltage detect, low-voltage warning*/
  90. .long LLWU_IRQHandler /* Low leakage wakeup unit*/
  91. .long WDOG_EWM_IRQHandler /* Single interrupt vector for WDOG and EWM*/
  92. .long TRNG0_IRQHandler /* True randon number generator*/
  93. .long I2C0_IRQHandler /* Inter-integrated circuit 0*/
  94. .long I2C1_IRQHandler /* Inter-integrated circuit 1*/
  95. .long SPI0_IRQHandler /* Serial peripheral Interface 0*/
  96. .long SPI1_IRQHandler /* Serial peripheral Interface 1*/
  97. .long I2S0_Tx_IRQHandler /* Integrated interchip sound 0 transmit interrupt*/
  98. .long I2S0_Rx_IRQHandler /* Integrated interchip sound 0 receive interrupt*/
  99. .long LPUART0_IRQHandler /* LPUART0 receive/transmit/error interrupt*/
  100. .long LPUART1_IRQHandler /* LPUART1 receive/transmit/error interrupt*/
  101. .long LPUART2_IRQHandler /* LPUART2 receive/transmit/error interrupt*/
  102. .long LPUART3_IRQHandler /* LPUART3 receive/transmit/error interrupt*/
  103. .long LPUART4_IRQHandler /* LPUART4 receive/transmit/error interrupt*/
  104. .long Reserved51_IRQHandler /* Reserved interrupt*/
  105. .long Reserved52_IRQHandler /* Reserved interrupt*/
  106. .long EMVSIM0_IRQHandler /* EMVSIM0 common interrupt*/
  107. .long EMVSIM1_IRQHandler /* EMVSIM1 common interrupt*/
  108. .long ADC0_IRQHandler /* Analog-to-digital converter 0*/
  109. .long CMP0_IRQHandler /* Comparator 0*/
  110. .long CMP1_IRQHandler /* Comparator 1*/
  111. .long FTM0_IRQHandler /* FlexTimer module 0 fault, overflow and channels interrupt*/
  112. .long FTM1_IRQHandler /* FlexTimer module 1 fault, overflow and channels interrupt*/
  113. .long FTM2_IRQHandler /* FlexTimer module 2 fault, overflow and channels interrupt*/
  114. .long CMT_IRQHandler /* Carrier modulator transmitter*/
  115. .long RTC_IRQHandler /* Real time clock*/
  116. .long RTC_Seconds_IRQHandler /* Real time clock seconds*/
  117. .long PIT0CH0_IRQHandler /* Periodic interrupt timer 0 channel 0*/
  118. .long PIT0CH1_IRQHandler /* Periodic interrupt timer 0 channel 1*/
  119. .long PIT0CH2_IRQHandler /* Periodic interrupt timer 0 channel 2*/
  120. .long PIT0CH3_IRQHandler /* Periodic interrupt timer 0 channel 3*/
  121. .long PDB0_IRQHandler /* Programmable delay block*/
  122. .long USB0_IRQHandler /* USB OTG interrupt*/
  123. .long USBDCD_IRQHandler /* USB charger detect*/
  124. .long Reserved71_IRQHandler /* Reserved interrupt*/
  125. .long DAC0_IRQHandler /* Digital-to-analog converter 0*/
  126. .long MCG_IRQHandler /* Multipurpose clock generator*/
  127. .long LPTMR0_LPTMR1_IRQHandler /* Single interrupt vector for Low Power Timer 0 and 1*/
  128. .long PORTA_IRQHandler /* Port A pin detect interrupt*/
  129. .long PORTB_IRQHandler /* Port B pin detect interrupt*/
  130. .long PORTC_IRQHandler /* Port C pin detect interrupt*/
  131. .long PORTD_IRQHandler /* Port D pin detect interrupt*/
  132. .long PORTE_IRQHandler /* Port E pin detect interrupt*/
  133. .long SWI_IRQHandler /* Software interrupt*/
  134. .long SPI2_IRQHandler /* Serial peripheral Interface 2*/
  135. .long Reserved82_IRQHandler /* Reserved interrupt*/
  136. .long Reserved83_IRQHandler /* Reserved interrupt*/
  137. .long Reserved84_IRQHandler /* Reserved interrupt*/
  138. .long Reserved85_IRQHandler /* Reserved interrupt*/
  139. .long FLEXIO0_IRQHandler /* FLEXIO0*/
  140. .long FTM3_IRQHandler /* FlexTimer module 3 fault, overflow and channels interrupt*/
  141. .long Reserved88_IRQHandler /* Reserved interrupt*/
  142. .long Reserved89_IRQHandler /* Reserved interrupt*/
  143. .long I2C2_IRQHandler /* Inter-integrated circuit 2*/
  144. .long Reserved91_IRQHandler /* Reserved interrupt*/
  145. .long Reserved92_IRQHandler /* Reserved interrupt*/
  146. .long Reserved93_IRQHandler /* Reserved interrupt*/
  147. .long Reserved94_IRQHandler /* Reserved interrupt*/
  148. .long Reserved95_IRQHandler /* Reserved interrupt*/
  149. .long Reserved96_IRQHandler /* Reserved interrupt*/
  150. .long SDHC_IRQHandler /* Secured digital host controller*/
  151. .long Reserved98_IRQHandler /* Reserved interrupt*/
  152. .long Reserved99_IRQHandler /* Reserved interrupt*/
  153. .long Reserved100_IRQHandler /* Reserved interrupt*/
  154. .long Reserved101_IRQHandler /* Reserved interrupt*/
  155. .long Reserved102_IRQHandler /* Reserved interrupt*/
  156. .long TSI0_IRQHandler /* Touch Sensing Input*/
  157. .long TPM1_IRQHandler /* TPM1 single interrupt vector for all sources*/
  158. .long TPM2_IRQHandler /* TPM2 single interrupt vector for all sources*/
  159. .long Reserved106_IRQHandler /* Reserved interrupt*/
  160. .long I2C3_IRQHandler /* Inter-integrated circuit 3*/
  161. .long Reserved108_IRQHandler /* Reserved interrupt*/
  162. .long Reserved109_IRQHandler /* Reserved interrupt*/
  163. .long Reserved110_IRQHandler /* Reserved interrupt*/
  164. .long Reserved111_IRQHandler /* Reserved interrupt*/
  165. .long Reserved112_IRQHandler /* Reserved interrupt*/
  166. .long Reserved113_IRQHandler /* Reserved interrupt*/
  167. .long Reserved114_IRQHandler /* Reserved interrupt*/
  168. .long Reserved115_IRQHandler /* Reserved interrupt*/
  169. .long QuadSPI0_IRQHandler /* qspi*/
  170. .long Reserved117_IRQHandler /* Reserved interrupt*/
  171. .long Reserved118_IRQHandler /* Reserved interrupt*/
  172. .long Reserved119_IRQHandler /* Reserved interrupt*/
  173. .long LTC0_IRQHandler /* LP Trusted Cryptography*/
  174. .long Reserved121_IRQHandler /* Reserved interrupt*/
  175. .long Reserved122_IRQHandler /* Reserved interrupt*/
  176. .long DefaultISR /* 123*/
  177. .long DefaultISR /* 124*/
  178. .long DefaultISR /* 125*/
  179. .long DefaultISR /* 126*/
  180. .long DefaultISR /* 127*/
  181. .long DefaultISR /* 128*/
  182. .long DefaultISR /* 129*/
  183. .long DefaultISR /* 130*/
  184. .long DefaultISR /* 131*/
  185. .long DefaultISR /* 132*/
  186. .long DefaultISR /* 133*/
  187. .long DefaultISR /* 134*/
  188. .long DefaultISR /* 135*/
  189. .long DefaultISR /* 136*/
  190. .long DefaultISR /* 137*/
  191. .long DefaultISR /* 138*/
  192. .long DefaultISR /* 139*/
  193. .long DefaultISR /* 140*/
  194. .long DefaultISR /* 141*/
  195. .long DefaultISR /* 142*/
  196. .long DefaultISR /* 143*/
  197. .long DefaultISR /* 144*/
  198. .long DefaultISR /* 145*/
  199. .long DefaultISR /* 146*/
  200. .long DefaultISR /* 147*/
  201. .long DefaultISR /* 148*/
  202. .long DefaultISR /* 149*/
  203. .long DefaultISR /* 150*/
  204. .long DefaultISR /* 151*/
  205. .long DefaultISR /* 152*/
  206. .long DefaultISR /* 153*/
  207. .long DefaultISR /* 154*/
  208. .long DefaultISR /* 155*/
  209. .long DefaultISR /* 156*/
  210. .long DefaultISR /* 157*/
  211. .long DefaultISR /* 158*/
  212. .long DefaultISR /* 159*/
  213. .long DefaultISR /* 160*/
  214. .long DefaultISR /* 161*/
  215. .long DefaultISR /* 162*/
  216. .long DefaultISR /* 163*/
  217. .long DefaultISR /* 164*/
  218. .long DefaultISR /* 165*/
  219. .long DefaultISR /* 166*/
  220. .long DefaultISR /* 167*/
  221. .long DefaultISR /* 168*/
  222. .long DefaultISR /* 169*/
  223. .long DefaultISR /* 170*/
  224. .long DefaultISR /* 171*/
  225. .long DefaultISR /* 172*/
  226. .long DefaultISR /* 173*/
  227. .long DefaultISR /* 174*/
  228. .long DefaultISR /* 175*/
  229. .long DefaultISR /* 176*/
  230. .long DefaultISR /* 177*/
  231. .long DefaultISR /* 178*/
  232. .long DefaultISR /* 179*/
  233. .long DefaultISR /* 180*/
  234. .long DefaultISR /* 181*/
  235. .long DefaultISR /* 182*/
  236. .long DefaultISR /* 183*/
  237. .long DefaultISR /* 184*/
  238. .long DefaultISR /* 185*/
  239. .long DefaultISR /* 186*/
  240. .long DefaultISR /* 187*/
  241. .long DefaultISR /* 188*/
  242. .long DefaultISR /* 189*/
  243. .long DefaultISR /* 190*/
  244. .long DefaultISR /* 191*/
  245. .long DefaultISR /* 192*/
  246. .long DefaultISR /* 193*/
  247. .long DefaultISR /* 194*/
  248. .long DefaultISR /* 195*/
  249. .long DefaultISR /* 196*/
  250. .long DefaultISR /* 197*/
  251. .long DefaultISR /* 198*/
  252. .long DefaultISR /* 199*/
  253. .long DefaultISR /* 200*/
  254. .long DefaultISR /* 201*/
  255. .long DefaultISR /* 202*/
  256. .long DefaultISR /* 203*/
  257. .long DefaultISR /* 204*/
  258. .long DefaultISR /* 205*/
  259. .long DefaultISR /* 206*/
  260. .long DefaultISR /* 207*/
  261. .long DefaultISR /* 208*/
  262. .long DefaultISR /* 209*/
  263. .long DefaultISR /* 210*/
  264. .long DefaultISR /* 211*/
  265. .long DefaultISR /* 212*/
  266. .long DefaultISR /* 213*/
  267. .long DefaultISR /* 214*/
  268. .long DefaultISR /* 215*/
  269. .long DefaultISR /* 216*/
  270. .long DefaultISR /* 217*/
  271. .long DefaultISR /* 218*/
  272. .long DefaultISR /* 219*/
  273. .long DefaultISR /* 220*/
  274. .long DefaultISR /* 221*/
  275. .long DefaultISR /* 222*/
  276. .long DefaultISR /* 223*/
  277. .long DefaultISR /* 224*/
  278. .long DefaultISR /* 225*/
  279. .long DefaultISR /* 226*/
  280. .long DefaultISR /* 227*/
  281. .long DefaultISR /* 228*/
  282. .long DefaultISR /* 229*/
  283. .long DefaultISR /* 230*/
  284. .long DefaultISR /* 231*/
  285. .long DefaultISR /* 232*/
  286. .long DefaultISR /* 233*/
  287. .long DefaultISR /* 234*/
  288. .long DefaultISR /* 235*/
  289. .long DefaultISR /* 236*/
  290. .long DefaultISR /* 237*/
  291. .long DefaultISR /* 238*/
  292. .long DefaultISR /* 239*/
  293. .size __isr_vector, . - __isr_vector
  294. /* Flash Configuration */
  295. .section .FlashConfig, "a"
  296. .long 0xFFFFFFFF
  297. .long 0xFFFFFFFF
  298. .long 0xFFFFFFFF
  299. .long 0xFFFF3DFE
  300. .text
  301. .thumb
  302. /* Reset Handler */
  303. .thumb_func
  304. .align 2
  305. .globl Reset_Handler
  306. .weak Reset_Handler
  307. .type Reset_Handler, %function
  308. Reset_Handler:
  309. cpsid i /* Mask interrupts */
  310. .equ VTOR, 0xE000ED08
  311. ldr r0, =VTOR
  312. ldr r1, =__isr_vector
  313. str r1, [r0]
  314. ldr r2, [r1]
  315. msr msp, r2
  316. #ifndef __NO_SYSTEM_INIT
  317. ldr r0,=SystemInit
  318. blx r0
  319. #endif
  320. /* Loop to copy data from read only memory to RAM. The ranges
  321. * of copy from/to are specified by following symbols evaluated in
  322. * linker script.
  323. * __etext: End of code section, i.e., begin of data sections to copy from.
  324. * __data_start__/__data_end__: RAM address range that data should be
  325. * __noncachedata_start__/__noncachedata_end__ : none cachable region
  326. * copied to. Both must be aligned to 4 bytes boundary. */
  327. ldr r1, =__etext
  328. ldr r2, =__data_start__
  329. ldr r3, =__data_end__
  330. #if 1
  331. /* Here are two copies of loop implemenations. First one favors code size
  332. * and the second one favors performance. Default uses the first one.
  333. * Change to "#if 0" to use the second one */
  334. .LC0:
  335. cmp r2, r3
  336. ittt lt
  337. ldrlt r0, [r1], #4
  338. strlt r0, [r2], #4
  339. blt .LC0
  340. #else
  341. subs r3, r2
  342. ble .LC1
  343. .LC0:
  344. subs r3, #4
  345. ldr r0, [r1, r3]
  346. str r0, [r2, r3]
  347. bgt .LC0
  348. .LC1:
  349. #endif
  350. #ifdef __STARTUP_INITIALIZE_NONCACHEDATA
  351. ldr r2, =__noncachedata_start__
  352. ldr r3, =__noncachedata_init_end__
  353. #if 1
  354. .LC2:
  355. cmp r2, r3
  356. ittt lt
  357. ldrlt r0, [r1], #4
  358. strlt r0, [r2], #4
  359. blt .LC2
  360. #else
  361. subs r3, r2
  362. ble .LC3
  363. .LC2:
  364. subs r3, #4
  365. ldr r0, [r1, r3]
  366. str r0, [r2, r3]
  367. bgt .LC2
  368. .LC3:
  369. #endif
  370. /* zero inited ncache section initialization */
  371. ldr r3, =__noncachedata_end__
  372. movs r0,0
  373. .LC4:
  374. cmp r2,r3
  375. itt lt
  376. strlt r0,[r2],#4
  377. blt .LC4
  378. #endif /* __STARTUP_INITIALIZE_NONCACHEDATA */
  379. #ifdef __STARTUP_CLEAR_BSS
  380. /* This part of work usually is done in C library startup code. Otherwise,
  381. * define this macro to enable it in this startup.
  382. *
  383. * Loop to zero out BSS section, which uses following symbols
  384. * in linker script:
  385. * __bss_start__: start of BSS section. Must align to 4
  386. * __bss_end__: end of BSS section. Must align to 4
  387. */
  388. ldr r1, =__bss_start__
  389. ldr r2, =__bss_end__
  390. movs r0, 0
  391. .LC5:
  392. cmp r1, r2
  393. itt lt
  394. strlt r0, [r1], #4
  395. blt .LC5
  396. #endif /* __STARTUP_CLEAR_BSS */
  397. cpsie i /* Unmask interrupts */
  398. #ifndef __START
  399. #define __START _start
  400. #endif
  401. #ifndef __ATOLLIC__
  402. ldr r0,=__START
  403. blx r0
  404. #else
  405. ldr r0,=__libc_init_array
  406. blx r0
  407. ldr r0,=main
  408. bx r0
  409. #endif
  410. .pool
  411. .size Reset_Handler, . - Reset_Handler
  412. .align 1
  413. .thumb_func
  414. .weak DefaultISR
  415. .type DefaultISR, %function
  416. DefaultISR:
  417. b DefaultISR
  418. .size DefaultISR, . - DefaultISR
  419. .align 1
  420. .thumb_func
  421. .weak NMI_Handler
  422. .type NMI_Handler, %function
  423. NMI_Handler:
  424. ldr r0,=NMI_Handler
  425. bx r0
  426. .size NMI_Handler, . - NMI_Handler
  427. .align 1
  428. .thumb_func
  429. .weak HardFault_Handler
  430. .type HardFault_Handler, %function
  431. HardFault_Handler:
  432. ldr r0,=HardFault_Handler
  433. bx r0
  434. .size HardFault_Handler, . - HardFault_Handler
  435. .align 1
  436. .thumb_func
  437. .weak SVC_Handler
  438. .type SVC_Handler, %function
  439. SVC_Handler:
  440. ldr r0,=SVC_Handler
  441. bx r0
  442. .size SVC_Handler, . - SVC_Handler
  443. .align 1
  444. .thumb_func
  445. .weak PendSV_Handler
  446. .type PendSV_Handler, %function
  447. PendSV_Handler:
  448. ldr r0,=PendSV_Handler
  449. bx r0
  450. .size PendSV_Handler, . - PendSV_Handler
  451. .align 1
  452. .thumb_func
  453. .weak SysTick_Handler
  454. .type SysTick_Handler, %function
  455. SysTick_Handler:
  456. ldr r0,=SysTick_Handler
  457. bx r0
  458. .size SysTick_Handler, . - SysTick_Handler
  459. .align 1
  460. .thumb_func
  461. .weak DMA0_DMA16_IRQHandler
  462. .type DMA0_DMA16_IRQHandler, %function
  463. DMA0_DMA16_IRQHandler:
  464. ldr r0,=DMA0_DMA16_DriverIRQHandler
  465. bx r0
  466. .size DMA0_DMA16_IRQHandler, . - DMA0_DMA16_IRQHandler
  467. .align 1
  468. .thumb_func
  469. .weak DMA1_DMA17_IRQHandler
  470. .type DMA1_DMA17_IRQHandler, %function
  471. DMA1_DMA17_IRQHandler:
  472. ldr r0,=DMA1_DMA17_DriverIRQHandler
  473. bx r0
  474. .size DMA1_DMA17_IRQHandler, . - DMA1_DMA17_IRQHandler
  475. .align 1
  476. .thumb_func
  477. .weak DMA2_DMA18_IRQHandler
  478. .type DMA2_DMA18_IRQHandler, %function
  479. DMA2_DMA18_IRQHandler:
  480. ldr r0,=DMA2_DMA18_DriverIRQHandler
  481. bx r0
  482. .size DMA2_DMA18_IRQHandler, . - DMA2_DMA18_IRQHandler
  483. .align 1
  484. .thumb_func
  485. .weak DMA3_DMA19_IRQHandler
  486. .type DMA3_DMA19_IRQHandler, %function
  487. DMA3_DMA19_IRQHandler:
  488. ldr r0,=DMA3_DMA19_DriverIRQHandler
  489. bx r0
  490. .size DMA3_DMA19_IRQHandler, . - DMA3_DMA19_IRQHandler
  491. .align 1
  492. .thumb_func
  493. .weak DMA4_DMA20_IRQHandler
  494. .type DMA4_DMA20_IRQHandler, %function
  495. DMA4_DMA20_IRQHandler:
  496. ldr r0,=DMA4_DMA20_DriverIRQHandler
  497. bx r0
  498. .size DMA4_DMA20_IRQHandler, . - DMA4_DMA20_IRQHandler
  499. .align 1
  500. .thumb_func
  501. .weak DMA5_DMA21_IRQHandler
  502. .type DMA5_DMA21_IRQHandler, %function
  503. DMA5_DMA21_IRQHandler:
  504. ldr r0,=DMA5_DMA21_DriverIRQHandler
  505. bx r0
  506. .size DMA5_DMA21_IRQHandler, . - DMA5_DMA21_IRQHandler
  507. .align 1
  508. .thumb_func
  509. .weak DMA6_DMA22_IRQHandler
  510. .type DMA6_DMA22_IRQHandler, %function
  511. DMA6_DMA22_IRQHandler:
  512. ldr r0,=DMA6_DMA22_DriverIRQHandler
  513. bx r0
  514. .size DMA6_DMA22_IRQHandler, . - DMA6_DMA22_IRQHandler
  515. .align 1
  516. .thumb_func
  517. .weak DMA7_DMA23_IRQHandler
  518. .type DMA7_DMA23_IRQHandler, %function
  519. DMA7_DMA23_IRQHandler:
  520. ldr r0,=DMA7_DMA23_DriverIRQHandler
  521. bx r0
  522. .size DMA7_DMA23_IRQHandler, . - DMA7_DMA23_IRQHandler
  523. .align 1
  524. .thumb_func
  525. .weak DMA8_DMA24_IRQHandler
  526. .type DMA8_DMA24_IRQHandler, %function
  527. DMA8_DMA24_IRQHandler:
  528. ldr r0,=DMA8_DMA24_DriverIRQHandler
  529. bx r0
  530. .size DMA8_DMA24_IRQHandler, . - DMA8_DMA24_IRQHandler
  531. .align 1
  532. .thumb_func
  533. .weak DMA9_DMA25_IRQHandler
  534. .type DMA9_DMA25_IRQHandler, %function
  535. DMA9_DMA25_IRQHandler:
  536. ldr r0,=DMA9_DMA25_DriverIRQHandler
  537. bx r0
  538. .size DMA9_DMA25_IRQHandler, . - DMA9_DMA25_IRQHandler
  539. .align 1
  540. .thumb_func
  541. .weak DMA10_DMA26_IRQHandler
  542. .type DMA10_DMA26_IRQHandler, %function
  543. DMA10_DMA26_IRQHandler:
  544. ldr r0,=DMA10_DMA26_DriverIRQHandler
  545. bx r0
  546. .size DMA10_DMA26_IRQHandler, . - DMA10_DMA26_IRQHandler
  547. .align 1
  548. .thumb_func
  549. .weak DMA11_DMA27_IRQHandler
  550. .type DMA11_DMA27_IRQHandler, %function
  551. DMA11_DMA27_IRQHandler:
  552. ldr r0,=DMA11_DMA27_DriverIRQHandler
  553. bx r0
  554. .size DMA11_DMA27_IRQHandler, . - DMA11_DMA27_IRQHandler
  555. .align 1
  556. .thumb_func
  557. .weak DMA12_DMA28_IRQHandler
  558. .type DMA12_DMA28_IRQHandler, %function
  559. DMA12_DMA28_IRQHandler:
  560. ldr r0,=DMA12_DMA28_DriverIRQHandler
  561. bx r0
  562. .size DMA12_DMA28_IRQHandler, . - DMA12_DMA28_IRQHandler
  563. .align 1
  564. .thumb_func
  565. .weak DMA13_DMA29_IRQHandler
  566. .type DMA13_DMA29_IRQHandler, %function
  567. DMA13_DMA29_IRQHandler:
  568. ldr r0,=DMA13_DMA29_DriverIRQHandler
  569. bx r0
  570. .size DMA13_DMA29_IRQHandler, . - DMA13_DMA29_IRQHandler
  571. .align 1
  572. .thumb_func
  573. .weak DMA14_DMA30_IRQHandler
  574. .type DMA14_DMA30_IRQHandler, %function
  575. DMA14_DMA30_IRQHandler:
  576. ldr r0,=DMA14_DMA30_DriverIRQHandler
  577. bx r0
  578. .size DMA14_DMA30_IRQHandler, . - DMA14_DMA30_IRQHandler
  579. .align 1
  580. .thumb_func
  581. .weak DMA15_DMA31_IRQHandler
  582. .type DMA15_DMA31_IRQHandler, %function
  583. DMA15_DMA31_IRQHandler:
  584. ldr r0,=DMA15_DMA31_DriverIRQHandler
  585. bx r0
  586. .size DMA15_DMA31_IRQHandler, . - DMA15_DMA31_IRQHandler
  587. .align 1
  588. .thumb_func
  589. .weak DMA_Error_IRQHandler
  590. .type DMA_Error_IRQHandler, %function
  591. DMA_Error_IRQHandler:
  592. ldr r0,=DMA_Error_DriverIRQHandler
  593. bx r0
  594. .size DMA_Error_IRQHandler, . - DMA_Error_IRQHandler
  595. .align 1
  596. .thumb_func
  597. .weak I2C0_IRQHandler
  598. .type I2C0_IRQHandler, %function
  599. I2C0_IRQHandler:
  600. ldr r0,=I2C0_DriverIRQHandler
  601. bx r0
  602. .size I2C0_IRQHandler, . - I2C0_IRQHandler
  603. .align 1
  604. .thumb_func
  605. .weak I2C1_IRQHandler
  606. .type I2C1_IRQHandler, %function
  607. I2C1_IRQHandler:
  608. ldr r0,=I2C1_DriverIRQHandler
  609. bx r0
  610. .size I2C1_IRQHandler, . - I2C1_IRQHandler
  611. .align 1
  612. .thumb_func
  613. .weak SPI0_IRQHandler
  614. .type SPI0_IRQHandler, %function
  615. SPI0_IRQHandler:
  616. ldr r0,=SPI0_DriverIRQHandler
  617. bx r0
  618. .size SPI0_IRQHandler, . - SPI0_IRQHandler
  619. .align 1
  620. .thumb_func
  621. .weak SPI1_IRQHandler
  622. .type SPI1_IRQHandler, %function
  623. SPI1_IRQHandler:
  624. ldr r0,=SPI1_DriverIRQHandler
  625. bx r0
  626. .size SPI1_IRQHandler, . - SPI1_IRQHandler
  627. .align 1
  628. .thumb_func
  629. .weak I2S0_Tx_IRQHandler
  630. .type I2S0_Tx_IRQHandler, %function
  631. I2S0_Tx_IRQHandler:
  632. ldr r0,=I2S0_Tx_DriverIRQHandler
  633. bx r0
  634. .size I2S0_Tx_IRQHandler, . - I2S0_Tx_IRQHandler
  635. .align 1
  636. .thumb_func
  637. .weak I2S0_Rx_IRQHandler
  638. .type I2S0_Rx_IRQHandler, %function
  639. I2S0_Rx_IRQHandler:
  640. ldr r0,=I2S0_Rx_DriverIRQHandler
  641. bx r0
  642. .size I2S0_Rx_IRQHandler, . - I2S0_Rx_IRQHandler
  643. .align 1
  644. .thumb_func
  645. .weak LPUART0_IRQHandler
  646. .type LPUART0_IRQHandler, %function
  647. LPUART0_IRQHandler:
  648. ldr r0,=LPUART0_DriverIRQHandler
  649. bx r0
  650. .size LPUART0_IRQHandler, . - LPUART0_IRQHandler
  651. .align 1
  652. .thumb_func
  653. .weak LPUART1_IRQHandler
  654. .type LPUART1_IRQHandler, %function
  655. LPUART1_IRQHandler:
  656. ldr r0,=LPUART1_DriverIRQHandler
  657. bx r0
  658. .size LPUART1_IRQHandler, . - LPUART1_IRQHandler
  659. .align 1
  660. .thumb_func
  661. .weak LPUART2_IRQHandler
  662. .type LPUART2_IRQHandler, %function
  663. LPUART2_IRQHandler:
  664. ldr r0,=LPUART2_DriverIRQHandler
  665. bx r0
  666. .size LPUART2_IRQHandler, . - LPUART2_IRQHandler
  667. .align 1
  668. .thumb_func
  669. .weak LPUART3_IRQHandler
  670. .type LPUART3_IRQHandler, %function
  671. LPUART3_IRQHandler:
  672. ldr r0,=LPUART3_DriverIRQHandler
  673. bx r0
  674. .size LPUART3_IRQHandler, . - LPUART3_IRQHandler
  675. .align 1
  676. .thumb_func
  677. .weak LPUART4_IRQHandler
  678. .type LPUART4_IRQHandler, %function
  679. LPUART4_IRQHandler:
  680. ldr r0,=LPUART4_DriverIRQHandler
  681. bx r0
  682. .size LPUART4_IRQHandler, . - LPUART4_IRQHandler
  683. .align 1
  684. .thumb_func
  685. .weak SPI2_IRQHandler
  686. .type SPI2_IRQHandler, %function
  687. SPI2_IRQHandler:
  688. ldr r0,=SPI2_DriverIRQHandler
  689. bx r0
  690. .size SPI2_IRQHandler, . - SPI2_IRQHandler
  691. .align 1
  692. .thumb_func
  693. .weak FLEXIO0_IRQHandler
  694. .type FLEXIO0_IRQHandler, %function
  695. FLEXIO0_IRQHandler:
  696. ldr r0,=FLEXIO0_DriverIRQHandler
  697. bx r0
  698. .size FLEXIO0_IRQHandler, . - FLEXIO0_IRQHandler
  699. .align 1
  700. .thumb_func
  701. .weak I2C2_IRQHandler
  702. .type I2C2_IRQHandler, %function
  703. I2C2_IRQHandler:
  704. ldr r0,=I2C2_DriverIRQHandler
  705. bx r0
  706. .size I2C2_IRQHandler, . - I2C2_IRQHandler
  707. .align 1
  708. .thumb_func
  709. .weak SDHC_IRQHandler
  710. .type SDHC_IRQHandler, %function
  711. SDHC_IRQHandler:
  712. ldr r0,=SDHC_DriverIRQHandler
  713. bx r0
  714. .size SDHC_IRQHandler, . - SDHC_IRQHandler
  715. .align 1
  716. .thumb_func
  717. .weak I2C3_IRQHandler
  718. .type I2C3_IRQHandler, %function
  719. I2C3_IRQHandler:
  720. ldr r0,=I2C3_DriverIRQHandler
  721. bx r0
  722. .size I2C3_IRQHandler, . - I2C3_IRQHandler
  723. .align 1
  724. .thumb_func
  725. .weak QuadSPI0_IRQHandler
  726. .type QuadSPI0_IRQHandler, %function
  727. QuadSPI0_IRQHandler:
  728. ldr r0,=QuadSPI0_DriverIRQHandler
  729. bx r0
  730. .size QuadSPI0_IRQHandler, . - QuadSPI0_IRQHandler
  731. /* Macro to define default handlers. Default handler
  732. * will be weak symbol and just dead loops. They can be
  733. * overwritten by other handlers */
  734. .macro def_irq_handler handler_name
  735. .weak \handler_name
  736. .set \handler_name, DefaultISR
  737. .endm
  738. /* Exception Handlers */
  739. def_irq_handler MemManage_Handler
  740. def_irq_handler BusFault_Handler
  741. def_irq_handler UsageFault_Handler
  742. def_irq_handler DebugMon_Handler
  743. def_irq_handler DMA0_DMA16_DriverIRQHandler
  744. def_irq_handler DMA1_DMA17_DriverIRQHandler
  745. def_irq_handler DMA2_DMA18_DriverIRQHandler
  746. def_irq_handler DMA3_DMA19_DriverIRQHandler
  747. def_irq_handler DMA4_DMA20_DriverIRQHandler
  748. def_irq_handler DMA5_DMA21_DriverIRQHandler
  749. def_irq_handler DMA6_DMA22_DriverIRQHandler
  750. def_irq_handler DMA7_DMA23_DriverIRQHandler
  751. def_irq_handler DMA8_DMA24_DriverIRQHandler
  752. def_irq_handler DMA9_DMA25_DriverIRQHandler
  753. def_irq_handler DMA10_DMA26_DriverIRQHandler
  754. def_irq_handler DMA11_DMA27_DriverIRQHandler
  755. def_irq_handler DMA12_DMA28_DriverIRQHandler
  756. def_irq_handler DMA13_DMA29_DriverIRQHandler
  757. def_irq_handler DMA14_DMA30_DriverIRQHandler
  758. def_irq_handler DMA15_DMA31_DriverIRQHandler
  759. def_irq_handler DMA_Error_DriverIRQHandler
  760. def_irq_handler MCM_IRQHandler
  761. def_irq_handler FTFA_IRQHandler
  762. def_irq_handler Read_Collision_IRQHandler
  763. def_irq_handler LVD_LVW_IRQHandler
  764. def_irq_handler LLWU_IRQHandler
  765. def_irq_handler WDOG_EWM_IRQHandler
  766. def_irq_handler TRNG0_IRQHandler
  767. def_irq_handler I2C0_DriverIRQHandler
  768. def_irq_handler I2C1_DriverIRQHandler
  769. def_irq_handler SPI0_DriverIRQHandler
  770. def_irq_handler SPI1_DriverIRQHandler
  771. def_irq_handler I2S0_Tx_DriverIRQHandler
  772. def_irq_handler I2S0_Rx_DriverIRQHandler
  773. def_irq_handler LPUART0_DriverIRQHandler
  774. def_irq_handler LPUART1_DriverIRQHandler
  775. def_irq_handler LPUART2_DriverIRQHandler
  776. def_irq_handler LPUART3_DriverIRQHandler
  777. def_irq_handler LPUART4_DriverIRQHandler
  778. def_irq_handler Reserved51_IRQHandler
  779. def_irq_handler Reserved52_IRQHandler
  780. def_irq_handler EMVSIM0_IRQHandler
  781. def_irq_handler EMVSIM1_IRQHandler
  782. def_irq_handler ADC0_IRQHandler
  783. def_irq_handler CMP0_IRQHandler
  784. def_irq_handler CMP1_IRQHandler
  785. def_irq_handler FTM0_IRQHandler
  786. def_irq_handler FTM1_IRQHandler
  787. def_irq_handler FTM2_IRQHandler
  788. def_irq_handler CMT_IRQHandler
  789. def_irq_handler RTC_IRQHandler
  790. def_irq_handler RTC_Seconds_IRQHandler
  791. def_irq_handler PIT0CH0_IRQHandler
  792. def_irq_handler PIT0CH1_IRQHandler
  793. def_irq_handler PIT0CH2_IRQHandler
  794. def_irq_handler PIT0CH3_IRQHandler
  795. def_irq_handler PDB0_IRQHandler
  796. def_irq_handler USB0_IRQHandler
  797. def_irq_handler USBDCD_IRQHandler
  798. def_irq_handler Reserved71_IRQHandler
  799. def_irq_handler DAC0_IRQHandler
  800. def_irq_handler MCG_IRQHandler
  801. def_irq_handler LPTMR0_LPTMR1_IRQHandler
  802. def_irq_handler PORTA_IRQHandler
  803. def_irq_handler PORTB_IRQHandler
  804. def_irq_handler PORTC_IRQHandler
  805. def_irq_handler PORTD_IRQHandler
  806. def_irq_handler PORTE_IRQHandler
  807. def_irq_handler SWI_IRQHandler
  808. def_irq_handler SPI2_DriverIRQHandler
  809. def_irq_handler Reserved82_IRQHandler
  810. def_irq_handler Reserved83_IRQHandler
  811. def_irq_handler Reserved84_IRQHandler
  812. def_irq_handler Reserved85_IRQHandler
  813. def_irq_handler FLEXIO0_DriverIRQHandler
  814. def_irq_handler FTM3_IRQHandler
  815. def_irq_handler Reserved88_IRQHandler
  816. def_irq_handler Reserved89_IRQHandler
  817. def_irq_handler I2C2_DriverIRQHandler
  818. def_irq_handler Reserved91_IRQHandler
  819. def_irq_handler Reserved92_IRQHandler
  820. def_irq_handler Reserved93_IRQHandler
  821. def_irq_handler Reserved94_IRQHandler
  822. def_irq_handler Reserved95_IRQHandler
  823. def_irq_handler Reserved96_IRQHandler
  824. def_irq_handler SDHC_DriverIRQHandler
  825. def_irq_handler Reserved98_IRQHandler
  826. def_irq_handler Reserved99_IRQHandler
  827. def_irq_handler Reserved100_IRQHandler
  828. def_irq_handler Reserved101_IRQHandler
  829. def_irq_handler Reserved102_IRQHandler
  830. def_irq_handler TSI0_IRQHandler
  831. def_irq_handler TPM1_IRQHandler
  832. def_irq_handler TPM2_IRQHandler
  833. def_irq_handler Reserved106_IRQHandler
  834. def_irq_handler I2C3_DriverIRQHandler
  835. def_irq_handler Reserved108_IRQHandler
  836. def_irq_handler Reserved109_IRQHandler
  837. def_irq_handler Reserved110_IRQHandler
  838. def_irq_handler Reserved111_IRQHandler
  839. def_irq_handler Reserved112_IRQHandler
  840. def_irq_handler Reserved113_IRQHandler
  841. def_irq_handler Reserved114_IRQHandler
  842. def_irq_handler Reserved115_IRQHandler
  843. def_irq_handler QuadSPI0_DriverIRQHandler
  844. def_irq_handler Reserved117_IRQHandler
  845. def_irq_handler Reserved118_IRQHandler
  846. def_irq_handler Reserved119_IRQHandler
  847. def_irq_handler LTC0_IRQHandler
  848. def_irq_handler Reserved121_IRQHandler
  849. def_irq_handler Reserved122_IRQHandler
  850. .end