startup_ARMv8MML.s 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ;/**************************************************************************//**
  2. ; * @file startup_ARMv8MML.s
  3. ; * @brief CMSIS Core Device Startup File for
  4. ; * ARMv8MML Device
  5. ; * @version V1.0.0
  6. ; * @date 09. July 2018
  7. ; ******************************************************************************/
  8. ;/*
  9. ; * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
  10. ; *
  11. ; * SPDX-License-Identifier: Apache-2.0
  12. ; *
  13. ; * Licensed under the Apache License, Version 2.0 (the License); you may
  14. ; * not use this file except in compliance with the License.
  15. ; * You may obtain a copy of the License at
  16. ; *
  17. ; * www.apache.org/licenses/LICENSE-2.0
  18. ; *
  19. ; * Unless required by applicable law or agreed to in writing, software
  20. ; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  21. ; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. ; * See the License for the specific language governing permissions and
  23. ; * limitations under the License.
  24. ; */
  25. ;
  26. ; The modules in this file are included in the libraries, and may be replaced
  27. ; by any user-defined modules that define the PUBLIC symbol _program_start or
  28. ; a user defined start symbol.
  29. ; To override the cstartup defined in the library, simply add your modified
  30. ; version to the workbench project.
  31. ;
  32. ; The vector table is normally located at address 0.
  33. ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
  34. ; The name "__vector_table" has special meaning for C-SPY:
  35. ; it is where the SP start value is found, and the NVIC vector
  36. ; table register (VTOR) is initialized to this address if != 0.
  37. ;
  38. ; Cortex-M version
  39. ;
  40. MODULE ?cstartup
  41. ;; Forward declaration of sections.
  42. SECTION CSTACK:DATA:NOROOT(3)
  43. SECTION .intvec:CODE:NOROOT(2)
  44. EXTERN __iar_program_start
  45. EXTERN SystemInit
  46. PUBLIC __vector_table
  47. PUBLIC __vector_table_0x1c
  48. PUBLIC __Vectors
  49. PUBLIC __Vectors_End
  50. PUBLIC __Vectors_Size
  51. DATA
  52. __vector_table
  53. DCD sfe(CSTACK) ; Top of Stack
  54. DCD Reset_Handler ; Reset Handler
  55. DCD NMI_Handler ; -14 NMI Handler
  56. DCD HardFault_Handler ; -13 Hard Fault Handler
  57. DCD MemManage_Handler ; -12 MPU Fault Handler
  58. DCD BusFault_Handler ; -11 Bus Fault Handler
  59. DCD UsageFault_Handler ; -10 Usage Fault Handler
  60. __vector_table_0x1c
  61. DCD SecureFault_Handler ; -9 Security Fault Handler
  62. DCD 0 ; Reserved
  63. DCD 0 ; Reserved
  64. DCD 0 ; Reserved
  65. DCD SVC_Handler ; -5 SVC Handler
  66. DCD DebugMon_Handler ; -4 Debug Monitor Handler
  67. DCD 0 ; Reserved
  68. DCD PendSV_Handler ; -2 PendSV Handler
  69. DCD SysTick_Handler ; -1 SysTick Handler
  70. ; Interrupts
  71. DCD Interrupt0_Handler ; 0 Interrupt 0
  72. DCD Interrupt1_Handler ; 1 Interrupt 1
  73. DCD Interrupt2_Handler ; 2 Interrupt 2
  74. DCD Interrupt3_Handler ; 3 Interrupt 3
  75. DCD Interrupt4_Handler ; 4 Interrupt 4
  76. DCD Interrupt5_Handler ; 5 Interrupt 5
  77. DCD Interrupt6_Handler ; 6 Interrupt 6
  78. DCD Interrupt7_Handler ; 7 Interrupt 7
  79. DCD Interrupt8_Handler ; 8 Interrupt 8
  80. DCD Interrupt9_Handler ; 9 Interrupt 9
  81. DS32 (470) ; Interrupts 10 .. 480 are left out
  82. __Vectors_End
  83. __Vectors EQU __vector_table
  84. __Vectors_Size EQU __Vectors_End - __Vectors
  85. THUMB
  86. ; Reset Handler
  87. PUBWEAK Reset_Handler
  88. SECTION .text:CODE:REORDER:NOROOT(2)
  89. Reset_Handler
  90. LDR R0, =SystemInit
  91. BLX R0
  92. LDR R0, =__iar_program_start
  93. BX R0
  94. PUBWEAK NMI_Handler
  95. PUBWEAK HardFault_Handler
  96. PUBWEAK MemManage_Handler
  97. PUBWEAK BusFault_Handler
  98. PUBWEAK UsageFault_Handler
  99. PUBWEAK SecureFault_Handler
  100. PUBWEAK SVC_Handler
  101. PUBWEAK DebugMon_Handler
  102. PUBWEAK PendSV_Handler
  103. PUBWEAK SysTick_Handler
  104. PUBWEAK Interrupt0_Handler
  105. PUBWEAK Interrupt1_Handler
  106. PUBWEAK Interrupt2_Handler
  107. PUBWEAK Interrupt3_Handler
  108. PUBWEAK Interrupt4_Handler
  109. PUBWEAK Interrupt5_Handler
  110. PUBWEAK Interrupt6_Handler
  111. PUBWEAK Interrupt7_Handler
  112. PUBWEAK Interrupt8_Handler
  113. PUBWEAK Interrupt9_Handler
  114. SECTION .text:CODE:REORDER:NOROOT(1)
  115. NMI_Handler
  116. HardFault_Handler
  117. MemManage_Handler
  118. BusFault_Handler
  119. UsageFault_Handler
  120. SecureFault_Handler
  121. SVC_Handler
  122. DebugMon_Handler
  123. PendSV_Handler
  124. SysTick_Handler
  125. Interrupt0_Handler
  126. Interrupt1_Handler
  127. Interrupt2_Handler
  128. Interrupt3_Handler
  129. Interrupt4_Handler
  130. Interrupt5_Handler
  131. Interrupt6_Handler
  132. Interrupt7_Handler
  133. Interrupt8_Handler
  134. Interrupt9_Handler
  135. Default_Handler
  136. B .
  137. END