You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

316 lines
11 KiB

  1. ;******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
  2. ;* File Name : startup_stm32f091xc.s
  3. ;* Author : MCD Application Team
  4. ;* Description : STM32F091xc/STM32F098xc devices vector table for EWARM toolchain.
  5. ;* This module performs:
  6. ;* - Set the initial SP
  7. ;* - Set the initial PC == __iar_program_start,
  8. ;* - Set the vector table entries with the exceptions ISR
  9. ;* address,
  10. ;* - Branches to main in the C library (which eventually
  11. ;* calls main()).
  12. ;* After Reset the Cortex-M0 processor is in Thread mode,
  13. ;* priority is Privileged, and the Stack is set to Main.
  14. ;*******************************************************************************
  15. ;*
  16. ;* Redistribution and use in source and binary forms, with or without modification,
  17. ;* are permitted provided that the following conditions are met:
  18. ;* 1. Redistributions of source code must retain the above copyright notice,
  19. ;* this list of conditions and the following disclaimer.
  20. ;* 2. Redistributions in binary form must reproduce the above copyright notice,
  21. ;* this list of conditions and the following disclaimer in the documentation
  22. ;* and/or other materials provided with the distribution.
  23. ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
  24. ;* may be used to endorse or promote products derived from this software
  25. ;* without specific prior written permission.
  26. ;*
  27. ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  28. ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  30. ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  31. ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  32. ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  33. ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  34. ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  35. ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. ;*
  38. ;*******************************************************************************
  39. ;
  40. ;
  41. ; The modules in this file are included in the libraries, and may be replaced
  42. ; by any user-defined modules that define the PUBLIC symbol _program_start or
  43. ; a user defined start symbol.
  44. ; To override the cstartup defined in the library, simply add your modified
  45. ; version to the workbench project.
  46. ;
  47. ; The vector table is normally located at address 0.
  48. ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
  49. ; The name "__vector_table" has special meaning for C-SPY:
  50. ; it is where the SP start value is found, and the NVIC vector
  51. ; table register (VTOR) is initialized to this address if != 0.
  52. ;
  53. ; Cortex-M version
  54. ;
  55. MODULE ?cstartup
  56. ;; Forward declaration of sections.
  57. SECTION CSTACK:DATA:NOROOT(3)
  58. SECTION .intvec:CODE:NOROOT(2)
  59. EXTERN __iar_program_start
  60. EXTERN SystemInit
  61. PUBLIC __vector_table
  62. DATA
  63. __vector_table
  64. DCD sfe(CSTACK)
  65. DCD Reset_Handler ; Reset Handler
  66. DCD NMI_Handler ; NMI Handler
  67. DCD HardFault_Handler ; Hard Fault Handler
  68. DCD 0 ; Reserved
  69. DCD 0 ; Reserved
  70. DCD 0 ; Reserved
  71. DCD 0 ; Reserved
  72. DCD 0 ; Reserved
  73. DCD 0 ; Reserved
  74. DCD 0 ; Reserved
  75. DCD SVC_Handler ; SVCall Handler
  76. DCD 0 ; Reserved
  77. DCD 0 ; Reserved
  78. DCD PendSV_Handler ; PendSV Handler
  79. DCD SysTick_Handler ; SysTick Handler
  80. ; External Interrupts
  81. DCD WWDG_IRQHandler ; Window Watchdog
  82. DCD PVD_VDDIO2_IRQHandler ; PVD and VDDIO2 through EXTI Line detect
  83. DCD RTC_IRQHandler ; RTC through EXTI Line
  84. DCD FLASH_IRQHandler ; FLASH
  85. DCD RCC_CRS_IRQHandler ; RCC and CRS
  86. DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
  87. DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
  88. DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
  89. DCD TSC_IRQHandler ; TS
  90. DCD DMA1_Ch1_IRQHandler ; DMA1 Channel 1
  91. DCD DMA1_Ch2_3_DMA2_Ch1_2_IRQHandler ; DMA1 Channel 2 and 3 & DMA2 Channel 1 and 2
  92. DCD DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler ; DMA1 Channel 4 to 7 & DMA2 Channel 3 to 5
  93. DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2
  94. DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
  95. DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
  96. DCD TIM2_IRQHandler ; TIM2
  97. DCD TIM3_IRQHandler ; TIM3
  98. DCD TIM6_DAC_IRQHandler ; TIM6 and DAC
  99. DCD TIM7_IRQHandler ; TIM7
  100. DCD TIM14_IRQHandler ; TIM14
  101. DCD TIM15_IRQHandler ; TIM15
  102. DCD TIM16_IRQHandler ; TIM16
  103. DCD TIM17_IRQHandler ; TIM17
  104. DCD I2C1_IRQHandler ; I2C1
  105. DCD I2C2_IRQHandler ; I2C2
  106. DCD SPI1_IRQHandler ; SPI1
  107. DCD SPI2_IRQHandler ; SPI2
  108. DCD USART1_IRQHandler ; USART1
  109. DCD USART2_IRQHandler ; USART2
  110. DCD USART3_8_IRQHandler ; USART3, USART4, USART5, USART6, USART7, USART8
  111. DCD CEC_CAN_IRQHandler ; CEC and CAN
  112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  113. ;;
  114. ;; Default interrupt handlers.
  115. ;;
  116. THUMB
  117. PUBWEAK Reset_Handler
  118. SECTION .text:CODE:NOROOT:REORDER(2)
  119. Reset_Handler
  120. LDR R0, =SystemInit
  121. BLX R0
  122. LDR R0, =__iar_program_start
  123. BX R0
  124. PUBWEAK NMI_Handler
  125. SECTION .text:CODE:NOROOT:REORDER(1)
  126. NMI_Handler
  127. B NMI_Handler
  128. PUBWEAK HardFault_Handler
  129. SECTION .text:CODE:NOROOT:REORDER(1)
  130. HardFault_Handler
  131. B HardFault_Handler
  132. PUBWEAK SVC_Handler
  133. SECTION .text:CODE:NOROOT:REORDER(1)
  134. SVC_Handler
  135. B SVC_Handler
  136. PUBWEAK PendSV_Handler
  137. SECTION .text:CODE:NOROOT:REORDER(1)
  138. PendSV_Handler
  139. B PendSV_Handler
  140. PUBWEAK SysTick_Handler
  141. SECTION .text:CODE:NOROOT:REORDER(1)
  142. SysTick_Handler
  143. B SysTick_Handler
  144. PUBWEAK WWDG_IRQHandler
  145. SECTION .text:CODE:NOROOT:REORDER(1)
  146. WWDG_IRQHandler
  147. B WWDG_IRQHandler
  148. PUBWEAK PVD_VDDIO2_IRQHandler
  149. SECTION .text:CODE:NOROOT:REORDER(1)
  150. PVD_VDDIO2_IRQHandler
  151. B PVD_VDDIO2_IRQHandler
  152. PUBWEAK RTC_IRQHandler
  153. SECTION .text:CODE:NOROOT:REORDER(1)
  154. RTC_IRQHandler
  155. B RTC_IRQHandler
  156. PUBWEAK FLASH_IRQHandler
  157. SECTION .text:CODE:NOROOT:REORDER(1)
  158. FLASH_IRQHandler
  159. B FLASH_IRQHandler
  160. PUBWEAK RCC_CRS_IRQHandler
  161. SECTION .text:CODE:NOROOT:REORDER(1)
  162. RCC_CRS_IRQHandler
  163. B RCC_CRS_IRQHandler
  164. PUBWEAK EXTI0_1_IRQHandler
  165. SECTION .text:CODE:NOROOT:REORDER(1)
  166. EXTI0_1_IRQHandler
  167. B EXTI0_1_IRQHandler
  168. PUBWEAK EXTI2_3_IRQHandler
  169. SECTION .text:CODE:NOROOT:REORDER(1)
  170. EXTI2_3_IRQHandler
  171. B EXTI2_3_IRQHandler
  172. PUBWEAK EXTI4_15_IRQHandler
  173. SECTION .text:CODE:NOROOT:REORDER(1)
  174. EXTI4_15_IRQHandler
  175. B EXTI4_15_IRQHandler
  176. PUBWEAK TSC_IRQHandler
  177. SECTION .text:CODE:NOROOT:REORDER(1)
  178. TSC_IRQHandler
  179. B TSC_IRQHandler
  180. PUBWEAK DMA1_Ch1_IRQHandler
  181. SECTION .text:CODE:NOROOT:REORDER(1)
  182. DMA1_Ch1_IRQHandler
  183. B DMA1_Ch1_IRQHandler
  184. PUBWEAK DMA1_Ch2_3_DMA2_Ch1_2_IRQHandler
  185. SECTION .text:CODE:NOROOT:REORDER(1)
  186. DMA1_Ch2_3_DMA2_Ch1_2_IRQHandler
  187. B DMA1_Ch2_3_DMA2_Ch1_2_IRQHandler
  188. PUBWEAK DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler
  189. SECTION .text:CODE:NOROOT:REORDER(1)
  190. DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler
  191. B DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler
  192. PUBWEAK ADC1_COMP_IRQHandler
  193. SECTION .text:CODE:NOROOT:REORDER(1)
  194. ADC1_COMP_IRQHandler
  195. B ADC1_COMP_IRQHandler
  196. PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler
  197. SECTION .text:CODE:NOROOT:REORDER(1)
  198. TIM1_BRK_UP_TRG_COM_IRQHandler
  199. B TIM1_BRK_UP_TRG_COM_IRQHandler
  200. PUBWEAK TIM1_CC_IRQHandler
  201. SECTION .text:CODE:NOROOT:REORDER(1)
  202. TIM1_CC_IRQHandler
  203. B TIM1_CC_IRQHandler
  204. PUBWEAK TIM2_IRQHandler
  205. SECTION .text:CODE:NOROOT:REORDER(1)
  206. TIM2_IRQHandler
  207. B TIM2_IRQHandler
  208. PUBWEAK TIM3_IRQHandler
  209. SECTION .text:CODE:NOROOT:REORDER(1)
  210. TIM3_IRQHandler
  211. B TIM3_IRQHandler
  212. PUBWEAK TIM6_DAC_IRQHandler
  213. SECTION .text:CODE:NOROOT:REORDER(1)
  214. TIM6_DAC_IRQHandler
  215. B TIM6_DAC_IRQHandler
  216. PUBWEAK TIM7_IRQHandler
  217. SECTION .text:CODE:NOROOT:REORDER(1)
  218. TIM7_IRQHandler
  219. B TIM7_IRQHandler
  220. PUBWEAK TIM14_IRQHandler
  221. SECTION .text:CODE:NOROOT:REORDER(1)
  222. TIM14_IRQHandler
  223. B TIM14_IRQHandler
  224. PUBWEAK TIM15_IRQHandler
  225. SECTION .text:CODE:NOROOT:REORDER(1)
  226. TIM15_IRQHandler
  227. B TIM15_IRQHandler
  228. PUBWEAK TIM16_IRQHandler
  229. SECTION .text:CODE:NOROOT:REORDER(1)
  230. TIM16_IRQHandler
  231. B TIM16_IRQHandler
  232. PUBWEAK TIM17_IRQHandler
  233. SECTION .text:CODE:NOROOT:REORDER(1)
  234. TIM17_IRQHandler
  235. B TIM17_IRQHandler
  236. PUBWEAK I2C1_IRQHandler
  237. SECTION .text:CODE:NOROOT:REORDER(1)
  238. I2C1_IRQHandler
  239. B I2C1_IRQHandler
  240. PUBWEAK I2C2_IRQHandler
  241. SECTION .text:CODE:NOROOT:REORDER(1)
  242. I2C2_IRQHandler
  243. B I2C2_IRQHandler
  244. PUBWEAK SPI1_IRQHandler
  245. SECTION .text:CODE:NOROOT:REORDER(1)
  246. SPI1_IRQHandler
  247. B SPI1_IRQHandler
  248. PUBWEAK SPI2_IRQHandler
  249. SECTION .text:CODE:NOROOT:REORDER(1)
  250. SPI2_IRQHandler
  251. B SPI2_IRQHandler
  252. PUBWEAK USART1_IRQHandler
  253. SECTION .text:CODE:NOROOT:REORDER(1)
  254. USART1_IRQHandler
  255. B USART1_IRQHandler
  256. PUBWEAK USART2_IRQHandler
  257. SECTION .text:CODE:NOROOT:REORDER(1)
  258. USART2_IRQHandler
  259. B USART2_IRQHandler
  260. PUBWEAK USART3_8_IRQHandler
  261. SECTION .text:CODE:NOROOT:REORDER(1)
  262. USART3_8_IRQHandler
  263. B USART3_8_IRQHandler
  264. PUBWEAK CEC_CAN_IRQHandler
  265. SECTION .text:CODE:NOROOT:REORDER(1)
  266. CEC_CAN_IRQHandler
  267. B CEC_CAN_IRQHandler
  268. END
  269. ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****