start_rvds.s 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. ;******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
  2. ;* File Name : stm32f10x_vector.s
  3. ;* Author : MCD Application Team
  4. ;* Version : V1.1.2
  5. ;* Date : 09/22/2008
  6. ;* Description : STM32F10x vector table for RVMDK toolchain.
  7. ;* This module performs:
  8. ;* - Set the initial SP
  9. ;* - Set the initial PC == Reset_Handler
  10. ;* - Set the vector table entries with the exceptions ISR address
  11. ;* - Configure external SRAM mounted on STM3210E-EVAL board
  12. ;* to be used as data memory (optional, to be enabled by user)
  13. ;* - Branches to __main in the C library (which eventually
  14. ;* calls main()).
  15. ;* After Reset the CortexM3 processor is in Thread mode,
  16. ;* priority is Privileged, and the Stack is set to Main.
  17. ;* <<< Use Configuration Wizard in Context Menu >>>
  18. ;*******************************************************************************
  19. ; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  20. ; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  21. ; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  22. ; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  23. ; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  24. ; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  25. ;*******************************************************************************
  26. ; Amount of memory (in bytes) allocated for Stack
  27. ; Tailor this value to your application needs
  28. ;// <h> Stack Configuration
  29. ;// <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
  30. ;// </h>
  31. Stack_Size EQU 0x00000200
  32. AREA STACK, NOINIT, READWRITE, ALIGN=3
  33. Stack_Mem SPACE Stack_Size
  34. __initial_sp
  35. ; If you need to use external SRAM mounted on STM3210E-EVAL board as data memory
  36. ; and internal SRAM for Stack, uncomment the following line and comment the line above
  37. ;__initial_sp EQU 0x20000000 + Stack_Size ; "Use MicroLIB" must be checked in
  38. ; the Project->Options->Target window
  39. ; Amount of memory (in bytes) allocated for Heap
  40. ; Tailor this value to your application needs
  41. ;// <h> Heap Configuration
  42. ;// <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
  43. ;// </h>
  44. Heap_Size EQU 0x00000000
  45. AREA HEAP, NOINIT, READWRITE, ALIGN=3
  46. __heap_base
  47. Heap_Mem SPACE Heap_Size
  48. __heap_limit
  49. THUMB
  50. PRESERVE8
  51. ; Import exceptions handlers
  52. IMPORT NMIException
  53. IMPORT rt_hw_hard_fault
  54. IMPORT MemManageException
  55. IMPORT BusFaultException
  56. IMPORT UsageFaultException
  57. IMPORT SVCHandler
  58. IMPORT DebugMonitor
  59. IMPORT rt_hw_pend_sv
  60. IMPORT SysTickHandler
  61. IMPORT WWDG_IRQHandler
  62. IMPORT PVD_IRQHandler
  63. IMPORT TAMPER_IRQHandler
  64. IMPORT RTC_IRQHandler
  65. IMPORT FLASH_IRQHandler
  66. IMPORT RCC_IRQHandler
  67. IMPORT EXTI0_IRQHandler
  68. IMPORT EXTI1_IRQHandler
  69. IMPORT EXTI2_IRQHandler
  70. IMPORT EXTI3_IRQHandler
  71. IMPORT EXTI4_IRQHandler
  72. IMPORT DMA1_Channel1_IRQHandler
  73. IMPORT DMA1_Channel2_IRQHandler
  74. IMPORT DMA1_Channel3_IRQHandler
  75. IMPORT DMA1_Channel4_IRQHandler
  76. IMPORT DMA1_Channel5_IRQHandler
  77. IMPORT DMA1_Channel6_IRQHandler
  78. IMPORT DMA1_Channel7_IRQHandler
  79. IMPORT ADC1_2_IRQHandler
  80. IMPORT USB_HP_CAN_TX_IRQHandler
  81. IMPORT USB_LP_CAN_RX0_IRQHandler
  82. IMPORT CAN_RX1_IRQHandler
  83. IMPORT CAN_SCE_IRQHandler
  84. IMPORT EXTI9_5_IRQHandler
  85. IMPORT TIM1_BRK_IRQHandler
  86. IMPORT TIM1_UP_IRQHandler
  87. IMPORT TIM1_TRG_COM_IRQHandler
  88. IMPORT TIM1_CC_IRQHandler
  89. IMPORT TIM2_IRQHandler
  90. IMPORT TIM3_IRQHandler
  91. IMPORT TIM4_IRQHandler
  92. IMPORT I2C1_EV_IRQHandler
  93. IMPORT I2C1_ER_IRQHandler
  94. IMPORT I2C2_EV_IRQHandler
  95. IMPORT I2C2_ER_IRQHandler
  96. IMPORT SPI1_IRQHandler
  97. IMPORT SPI2_IRQHandler
  98. IMPORT USART1_IRQHandler
  99. IMPORT USART2_IRQHandler
  100. IMPORT USART3_IRQHandler
  101. IMPORT EXTI15_10_IRQHandler
  102. IMPORT RTCAlarm_IRQHandler
  103. IMPORT USBWakeUp_IRQHandler
  104. IMPORT TIM8_BRK_IRQHandler
  105. IMPORT TIM8_UP_IRQHandler
  106. IMPORT TIM8_TRG_COM_IRQHandler
  107. IMPORT TIM8_CC_IRQHandler
  108. IMPORT ADC3_IRQHandler
  109. IMPORT FSMC_IRQHandler
  110. IMPORT SDIO_IRQHandler
  111. IMPORT TIM5_IRQHandler
  112. IMPORT SPI3_IRQHandler
  113. IMPORT UART4_IRQHandler
  114. IMPORT UART5_IRQHandler
  115. IMPORT TIM6_IRQHandler
  116. IMPORT TIM7_IRQHandler
  117. IMPORT DMA2_Channel1_IRQHandler
  118. IMPORT DMA2_Channel2_IRQHandler
  119. IMPORT DMA2_Channel3_IRQHandler
  120. IMPORT DMA2_Channel4_5_IRQHandler
  121. ;*******************************************************************************
  122. ; Fill-up the Vector Table entries with the exceptions ISR address
  123. ;*******************************************************************************
  124. AREA RESET, DATA, READONLY
  125. EXPORT __Vectors
  126. __Vectors DCD __initial_sp ; Top of Stack
  127. DCD Reset_Handler
  128. DCD NMIException
  129. DCD rt_hw_hard_fault
  130. DCD MemManageException
  131. DCD BusFaultException
  132. DCD UsageFaultException
  133. DCD 0 ; Reserved
  134. DCD 0 ; Reserved
  135. DCD 0 ; Reserved
  136. DCD 0 ; Reserved
  137. DCD SVCHandler
  138. DCD DebugMonitor
  139. DCD 0 ; Reserved
  140. DCD rt_hw_pend_sv
  141. DCD SysTickHandler
  142. DCD WWDG_IRQHandler
  143. DCD PVD_IRQHandler
  144. DCD TAMPER_IRQHandler
  145. DCD RTC_IRQHandler
  146. DCD FLASH_IRQHandler
  147. DCD RCC_IRQHandler
  148. DCD EXTI0_IRQHandler
  149. DCD EXTI1_IRQHandler
  150. DCD EXTI2_IRQHandler
  151. DCD EXTI3_IRQHandler
  152. DCD EXTI4_IRQHandler
  153. DCD DMA1_Channel1_IRQHandler
  154. DCD DMA1_Channel2_IRQHandler
  155. DCD DMA1_Channel3_IRQHandler
  156. DCD DMA1_Channel4_IRQHandler
  157. DCD DMA1_Channel5_IRQHandler
  158. DCD DMA1_Channel6_IRQHandler
  159. DCD DMA1_Channel7_IRQHandler
  160. DCD ADC1_2_IRQHandler
  161. DCD USB_HP_CAN_TX_IRQHandler
  162. DCD USB_LP_CAN_RX0_IRQHandler
  163. DCD CAN_RX1_IRQHandler
  164. DCD CAN_SCE_IRQHandler
  165. DCD EXTI9_5_IRQHandler
  166. DCD TIM1_BRK_IRQHandler
  167. DCD TIM1_UP_IRQHandler
  168. DCD TIM1_TRG_COM_IRQHandler
  169. DCD TIM1_CC_IRQHandler
  170. DCD TIM2_IRQHandler
  171. DCD TIM3_IRQHandler
  172. DCD TIM4_IRQHandler
  173. DCD I2C1_EV_IRQHandler
  174. DCD I2C1_ER_IRQHandler
  175. DCD I2C2_EV_IRQHandler
  176. DCD I2C2_ER_IRQHandler
  177. DCD SPI1_IRQHandler
  178. DCD SPI2_IRQHandler
  179. DCD USART1_IRQHandler
  180. DCD USART2_IRQHandler
  181. DCD USART3_IRQHandler
  182. DCD EXTI15_10_IRQHandler
  183. DCD RTCAlarm_IRQHandler
  184. DCD USBWakeUp_IRQHandler
  185. DCD TIM8_BRK_IRQHandler
  186. DCD TIM8_UP_IRQHandler
  187. DCD TIM8_TRG_COM_IRQHandler
  188. DCD TIM8_CC_IRQHandler
  189. DCD ADC3_IRQHandler
  190. DCD FSMC_IRQHandler
  191. DCD SDIO_IRQHandler
  192. DCD TIM5_IRQHandler
  193. DCD SPI3_IRQHandler
  194. DCD UART4_IRQHandler
  195. DCD UART5_IRQHandler
  196. DCD TIM6_IRQHandler
  197. DCD TIM7_IRQHandler
  198. DCD DMA2_Channel1_IRQHandler
  199. DCD DMA2_Channel2_IRQHandler
  200. DCD DMA2_Channel3_IRQHandler
  201. DCD DMA2_Channel4_5_IRQHandler
  202. AREA |.text|, CODE, READONLY
  203. ; Reset handler routine
  204. Reset_Handler PROC
  205. EXPORT Reset_Handler
  206. IMPORT __main
  207. LDR R0, =__main
  208. BX R0
  209. ENDP
  210. ALIGN
  211. ;*******************************************************************************
  212. ; User Stack and Heap initialization
  213. ;*******************************************************************************
  214. IF :DEF:__MICROLIB
  215. EXPORT __initial_sp
  216. EXPORT __heap_base
  217. EXPORT __heap_limit
  218. ELSE
  219. IMPORT __use_two_region_memory
  220. EXPORT __user_initial_stackheap
  221. __user_initial_stackheap
  222. LDR R0, = Heap_Mem
  223. LDR R1, = (Stack_Mem + Stack_Size)
  224. LDR R2, = (Heap_Mem + Heap_Size)
  225. LDR R3, = Stack_Mem
  226. BX LR
  227. ALIGN
  228. ENDIF
  229. END
  230. ;******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE*****