PageRenderTime 1981ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f102x6.s

https://gitlab.com/balldir/BMP280_stm32f103
Assembly | 355 lines | 241 code | 50 blank | 64 comment | 0 complexity | e03c5620c341f39b60cac4956c1299b3 MD5 | raw file
  1. ;******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
  2. ;* File Name : startup_stm32f102x6.s
  3. ;* Author : MCD Application Team
  4. ;* Version : V4.0.2
  5. ;* Date : 18-December-2015
  6. ;* Description : STM32F102x6 USB Line Devices vector table for EWARM
  7. ;* toolchain.
  8. ;* This module performs:
  9. ;* - Set the initial SP
  10. ;* - Configure the clock system
  11. ;* - Set the initial PC == __iar_program_start,
  12. ;* - Set the vector table entries with the exceptions ISR
  13. ;* address.
  14. ;* After Reset the Cortex-M3 processor is in Thread mode,
  15. ;* priority is Privileged, and the Stack is set to Main.
  16. ;********************************************************************************
  17. ;*
  18. ;* <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
  19. ;*
  20. ;* Redistribution and use in source and binary forms, with or without modification,
  21. ;* are permitted provided that the following conditions are met:
  22. ;* 1. Redistributions of source code must retain the above copyright notice,
  23. ;* this list of conditions and the following disclaimer.
  24. ;* 2. Redistributions in binary form must reproduce the above copyright notice,
  25. ;* this list of conditions and the following disclaimer in the documentation
  26. ;* and/or other materials provided with the distribution.
  27. ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
  28. ;* may be used to endorse or promote products derived from this software
  29. ;* without specific prior written permission.
  30. ;*
  31. ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  32. ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  33. ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  34. ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  35. ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  36. ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  37. ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  38. ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  39. ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  40. ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  41. ;*
  42. ;*******************************************************************************
  43. ;
  44. ;
  45. ; The modules in this file are included in the libraries, and may be replaced
  46. ; by any user-defined modules that define the PUBLIC symbol _program_start or
  47. ; a user defined start symbol.
  48. ; To override the cstartup defined in the library, simply add your modified
  49. ; version to the workbench project.
  50. ;
  51. ; The vector table is normally located at address 0.
  52. ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
  53. ; The name "__vector_table" has special meaning for C-SPY:
  54. ; it is where the SP start value is found, and the NVIC vector
  55. ; table register (VTOR) is initialized to this address if != 0.
  56. ;
  57. ; Cortex-M version
  58. ;
  59. MODULE ?cstartup
  60. ;; Forward declaration of sections.
  61. SECTION CSTACK:DATA:NOROOT(3)
  62. SECTION .intvec:CODE:NOROOT(2)
  63. EXTERN __iar_program_start
  64. EXTERN SystemInit
  65. PUBLIC __vector_table
  66. DATA
  67. __vector_table
  68. DCD sfe(CSTACK)
  69. DCD Reset_Handler ; Reset Handler
  70. DCD NMI_Handler ; NMI Handler
  71. DCD HardFault_Handler ; Hard Fault Handler
  72. DCD MemManage_Handler ; MPU Fault Handler
  73. DCD BusFault_Handler ; Bus Fault Handler
  74. DCD UsageFault_Handler ; Usage Fault Handler
  75. DCD 0 ; Reserved
  76. DCD 0 ; Reserved
  77. DCD 0 ; Reserved
  78. DCD 0 ; Reserved
  79. DCD SVC_Handler ; SVCall Handler
  80. DCD DebugMon_Handler ; Debug Monitor Handler
  81. DCD 0 ; Reserved
  82. DCD PendSV_Handler ; PendSV Handler
  83. DCD SysTick_Handler ; SysTick Handler
  84. ; External Interrupts
  85. DCD WWDG_IRQHandler ; Window Watchdog
  86. DCD PVD_IRQHandler ; PVD through EXTI Line detect
  87. DCD TAMPER_IRQHandler ; Tamper
  88. DCD RTC_IRQHandler ; RTC
  89. DCD FLASH_IRQHandler ; Flash
  90. DCD RCC_IRQHandler ; RCC
  91. DCD EXTI0_IRQHandler ; EXTI Line 0
  92. DCD EXTI1_IRQHandler ; EXTI Line 1
  93. DCD EXTI2_IRQHandler ; EXTI Line 2
  94. DCD EXTI3_IRQHandler ; EXTI Line 3
  95. DCD EXTI4_IRQHandler ; EXTI Line 4
  96. DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
  97. DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
  98. DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
  99. DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
  100. DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
  101. DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
  102. DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
  103. DCD ADC1_IRQHandler ; ADC1
  104. DCD USB_HP_IRQHandler ; USB High Priority
  105. DCD USB_LP_IRQHandler ; USB Low Priority
  106. DCD 0 ; Reserved
  107. DCD 0 ; Reserved
  108. DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
  109. DCD 0 ; Reserved
  110. DCD 0 ; Reserved
  111. DCD 0 ; Reserved
  112. DCD 0 ; Reserved
  113. DCD TIM2_IRQHandler ; TIM2
  114. DCD TIM3_IRQHandler ; TIM3
  115. DCD 0 ; Reserved
  116. DCD I2C1_EV_IRQHandler ; I2C1 Event
  117. DCD I2C1_ER_IRQHandler ; I2C1 Error
  118. DCD 0 ; Reserved
  119. DCD 0 ; Reserved
  120. DCD SPI1_IRQHandler ; SPI1
  121. DCD 0 ; Reserved
  122. DCD USART1_IRQHandler ; USART1
  123. DCD USART2_IRQHandler ; USART2
  124. DCD 0 ; Reserved
  125. DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
  126. DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line
  127. DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
  128. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  129. ;;
  130. ;; Default interrupt handlers.
  131. ;;
  132. THUMB
  133. PUBWEAK Reset_Handler
  134. SECTION .text:CODE:REORDER:NOROOT(2)
  135. Reset_Handler
  136. LDR R0, =SystemInit
  137. BLX R0
  138. LDR R0, =__iar_program_start
  139. BX R0
  140. PUBWEAK NMI_Handler
  141. SECTION .text:CODE:REORDER:NOROOT(1)
  142. NMI_Handler
  143. B NMI_Handler
  144. PUBWEAK HardFault_Handler
  145. SECTION .text:CODE:REORDER:NOROOT(1)
  146. HardFault_Handler
  147. B HardFault_Handler
  148. PUBWEAK MemManage_Handler
  149. SECTION .text:CODE:REORDER:NOROOT(1)
  150. MemManage_Handler
  151. B MemManage_Handler
  152. PUBWEAK BusFault_Handler
  153. SECTION .text:CODE:REORDER:NOROOT(1)
  154. BusFault_Handler
  155. B BusFault_Handler
  156. PUBWEAK UsageFault_Handler
  157. SECTION .text:CODE:REORDER:NOROOT(1)
  158. UsageFault_Handler
  159. B UsageFault_Handler
  160. PUBWEAK SVC_Handler
  161. SECTION .text:CODE:REORDER:NOROOT(1)
  162. SVC_Handler
  163. B SVC_Handler
  164. PUBWEAK DebugMon_Handler
  165. SECTION .text:CODE:REORDER:NOROOT(1)
  166. DebugMon_Handler
  167. B DebugMon_Handler
  168. PUBWEAK PendSV_Handler
  169. SECTION .text:CODE:REORDER:NOROOT(1)
  170. PendSV_Handler
  171. B PendSV_Handler
  172. PUBWEAK SysTick_Handler
  173. SECTION .text:CODE:REORDER:NOROOT(1)
  174. SysTick_Handler
  175. B SysTick_Handler
  176. PUBWEAK WWDG_IRQHandler
  177. SECTION .text:CODE:REORDER:NOROOT(1)
  178. WWDG_IRQHandler
  179. B WWDG_IRQHandler
  180. PUBWEAK PVD_IRQHandler
  181. SECTION .text:CODE:REORDER:NOROOT(1)
  182. PVD_IRQHandler
  183. B PVD_IRQHandler
  184. PUBWEAK TAMPER_IRQHandler
  185. SECTION .text:CODE:REORDER:NOROOT(1)
  186. TAMPER_IRQHandler
  187. B TAMPER_IRQHandler
  188. PUBWEAK RTC_IRQHandler
  189. SECTION .text:CODE:REORDER:NOROOT(1)
  190. RTC_IRQHandler
  191. B RTC_IRQHandler
  192. PUBWEAK FLASH_IRQHandler
  193. SECTION .text:CODE:REORDER:NOROOT(1)
  194. FLASH_IRQHandler
  195. B FLASH_IRQHandler
  196. PUBWEAK RCC_IRQHandler
  197. SECTION .text:CODE:REORDER:NOROOT(1)
  198. RCC_IRQHandler
  199. B RCC_IRQHandler
  200. PUBWEAK EXTI0_IRQHandler
  201. SECTION .text:CODE:REORDER:NOROOT(1)
  202. EXTI0_IRQHandler
  203. B EXTI0_IRQHandler
  204. PUBWEAK EXTI1_IRQHandler
  205. SECTION .text:CODE:REORDER:NOROOT(1)
  206. EXTI1_IRQHandler
  207. B EXTI1_IRQHandler
  208. PUBWEAK EXTI2_IRQHandler
  209. SECTION .text:CODE:REORDER:NOROOT(1)
  210. EXTI2_IRQHandler
  211. B EXTI2_IRQHandler
  212. PUBWEAK EXTI3_IRQHandler
  213. SECTION .text:CODE:REORDER:NOROOT(1)
  214. EXTI3_IRQHandler
  215. B EXTI3_IRQHandler
  216. PUBWEAK EXTI4_IRQHandler
  217. SECTION .text:CODE:REORDER:NOROOT(1)
  218. EXTI4_IRQHandler
  219. B EXTI4_IRQHandler
  220. PUBWEAK DMA1_Channel1_IRQHandler
  221. SECTION .text:CODE:REORDER:NOROOT(1)
  222. DMA1_Channel1_IRQHandler
  223. B DMA1_Channel1_IRQHandler
  224. PUBWEAK DMA1_Channel2_IRQHandler
  225. SECTION .text:CODE:REORDER:NOROOT(1)
  226. DMA1_Channel2_IRQHandler
  227. B DMA1_Channel2_IRQHandler
  228. PUBWEAK DMA1_Channel3_IRQHandler
  229. SECTION .text:CODE:REORDER:NOROOT(1)
  230. DMA1_Channel3_IRQHandler
  231. B DMA1_Channel3_IRQHandler
  232. PUBWEAK DMA1_Channel4_IRQHandler
  233. SECTION .text:CODE:REORDER:NOROOT(1)
  234. DMA1_Channel4_IRQHandler
  235. B DMA1_Channel4_IRQHandler
  236. PUBWEAK DMA1_Channel5_IRQHandler
  237. SECTION .text:CODE:REORDER:NOROOT(1)
  238. DMA1_Channel5_IRQHandler
  239. B DMA1_Channel5_IRQHandler
  240. PUBWEAK DMA1_Channel6_IRQHandler
  241. SECTION .text:CODE:REORDER:NOROOT(1)
  242. DMA1_Channel6_IRQHandler
  243. B DMA1_Channel6_IRQHandler
  244. PUBWEAK DMA1_Channel7_IRQHandler
  245. SECTION .text:CODE:REORDER:NOROOT(1)
  246. DMA1_Channel7_IRQHandler
  247. B DMA1_Channel7_IRQHandler
  248. PUBWEAK ADC1_IRQHandler
  249. SECTION .text:CODE:REORDER:NOROOT(1)
  250. ADC1_IRQHandler
  251. B ADC1_IRQHandler
  252. PUBWEAK USB_HP_IRQHandler
  253. SECTION .text:CODE:REORDER:NOROOT(1)
  254. USB_HP_IRQHandler
  255. B USB_HP_IRQHandler
  256. PUBWEAK USB_LP_IRQHandler
  257. SECTION .text:CODE:REORDER:NOROOT(1)
  258. USB_LP_IRQHandler
  259. B USB_LP_IRQHandler
  260. PUBWEAK EXTI9_5_IRQHandler
  261. SECTION .text:CODE:REORDER:NOROOT(1)
  262. EXTI9_5_IRQHandler
  263. B EXTI9_5_IRQHandler
  264. PUBWEAK TIM2_IRQHandler
  265. SECTION .text:CODE:REORDER:NOROOT(1)
  266. TIM2_IRQHandler
  267. B TIM2_IRQHandler
  268. PUBWEAK TIM3_IRQHandler
  269. SECTION .text:CODE:REORDER:NOROOT(1)
  270. TIM3_IRQHandler
  271. B TIM3_IRQHandler
  272. PUBWEAK I2C1_EV_IRQHandler
  273. SECTION .text:CODE:REORDER:NOROOT(1)
  274. I2C1_EV_IRQHandler
  275. B I2C1_EV_IRQHandler
  276. PUBWEAK I2C1_ER_IRQHandler
  277. SECTION .text:CODE:REORDER:NOROOT(1)
  278. I2C1_ER_IRQHandler
  279. B I2C1_ER_IRQHandler
  280. PUBWEAK SPI1_IRQHandler
  281. SECTION .text:CODE:REORDER:NOROOT(1)
  282. SPI1_IRQHandler
  283. B SPI1_IRQHandler
  284. PUBWEAK USART1_IRQHandler
  285. SECTION .text:CODE:REORDER:NOROOT(1)
  286. USART1_IRQHandler
  287. B USART1_IRQHandler
  288. PUBWEAK USART2_IRQHandler
  289. SECTION .text:CODE:REORDER:NOROOT(1)
  290. USART2_IRQHandler
  291. B USART2_IRQHandler
  292. PUBWEAK EXTI15_10_IRQHandler
  293. SECTION .text:CODE:REORDER:NOROOT(1)
  294. EXTI15_10_IRQHandler
  295. B EXTI15_10_IRQHandler
  296. PUBWEAK RTC_Alarm_IRQHandler
  297. SECTION .text:CODE:REORDER:NOROOT(1)
  298. RTC_Alarm_IRQHandler
  299. B RTC_Alarm_IRQHandler
  300. PUBWEAK USBWakeUp_IRQHandler
  301. SECTION .text:CODE:REORDER:NOROOT(1)
  302. USBWakeUp_IRQHandler
  303. B USBWakeUp_IRQHandler
  304. END
  305. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/