|
| 1 | +;/******************************************************************************************************************************************************* |
| 2 | +; * Copyright ¨Ï 2016 <WIZnet Co.,Ltd.> |
| 3 | +; * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ¡°Software¡±), |
| 4 | +; * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 5 | +; * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
| 6 | +; * |
| 7 | +; * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 8 | +; |
| 9 | +; * THE SOFTWARE IS PROVIDED ¡°AS IS¡±, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 10 | +; * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 11 | +; * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 12 | +; * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 13 | +;*********************************************************************************************************************************************************/ |
| 14 | +;/**************************************************************************//** |
| 15 | +; * @file startup_ARMCM0.s |
| 16 | +; * @brief CMSIS Core Device Startup File for |
| 17 | +; * ARMCM0 Device Series |
| 18 | +; * @version V1.08 |
| 19 | +; * @date 23. November 2012 |
| 20 | +; * |
| 21 | +; * @note |
| 22 | +; * |
| 23 | +; ******************************************************************************/ |
| 24 | +;/* Copyright (c) 2011 - 2012 ARM LIMITED |
| 25 | +; |
| 26 | +; All rights reserved. |
| 27 | +; Redistribution and use in source and binary forms, with or without |
| 28 | +; modification, are permitted provided that the following conditions are met: |
| 29 | +; - Redistributions of source code must retain the above copyright |
| 30 | +; notice, this list of conditions and the following disclaimer. |
| 31 | +; - Redistributions in binary form must reproduce the above copyright |
| 32 | +; notice, this list of conditions and the following disclaimer in the |
| 33 | +; documentation and/or other materials provided with the distribution. |
| 34 | +; - Neither the name of ARM nor the names of its contributors may be used |
| 35 | +; to endorse or promote products derived from this software without |
| 36 | +; specific prior written permission. |
| 37 | +; * |
| 38 | +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 39 | +; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 40 | +; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 41 | +; ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE |
| 42 | +; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 43 | +; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 44 | +; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 45 | +; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 46 | +; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 47 | +; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 48 | +; POSSIBILITY OF SUCH DAMAGE. |
| 49 | +; ---------------------------------------------------------------------------*/ |
| 50 | + |
| 51 | + |
| 52 | +; |
| 53 | +; The modules in this file are included in the libraries, and may be replaced |
| 54 | +; by any user-defined modules that define the PUBLIC symbol _program_start or |
| 55 | +; a user defined start symbol. |
| 56 | +; To override the cstartup defined in the library, simply add your modified |
| 57 | +; version to the workbench project. |
| 58 | +; |
| 59 | +; The vector table is normally located at address 0. |
| 60 | +; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
| 61 | +; The name "__vector_table" has special meaning for C-SPY: |
| 62 | +; it is where the SP start value is found, and the NVIC vector |
| 63 | +; table register (VTOR) is initialized to this address if != 0. |
| 64 | +; |
| 65 | +; Cortex-M version |
| 66 | +; |
| 67 | + |
| 68 | + MODULE ?cstartup |
| 69 | + |
| 70 | + ;; Forward declaration of sections. |
| 71 | + SECTION CSTACK:DATA:NOROOT(3) |
| 72 | + |
| 73 | + SECTION .intvec:CODE:NOROOT(2) |
| 74 | + |
| 75 | + EXTERN __iar_program_start |
| 76 | + EXTERN SystemInit |
| 77 | + PUBLIC __vector_table |
| 78 | + PUBLIC __vector_table_0x1c |
| 79 | + PUBLIC __Vectors |
| 80 | + PUBLIC __Vectors_End |
| 81 | + PUBLIC __Vectors_Size |
| 82 | + |
| 83 | + DATA |
| 84 | + |
| 85 | +__vector_table |
| 86 | + DCD sfe(CSTACK) |
| 87 | + DCD Reset_Handler ; Reset Handler |
| 88 | + DCD NMI_Handler ; NMI Handler |
| 89 | + DCD HardFault_Handler ; Hard Fault Handler |
| 90 | + DCD 0 ; Reserved |
| 91 | + DCD 0 ; Reserved |
| 92 | + DCD 0 ; Reserved |
| 93 | +__vector_table_0x1c |
| 94 | + DCD 0 ; Reserved |
| 95 | + DCD 0 ; Reserved |
| 96 | + DCD 0 ; Reserved |
| 97 | + DCD 0 ; Reserved |
| 98 | + DCD SVC_Handler ; SVCall Handler |
| 99 | + DCD 0 ; Reserved |
| 100 | + DCD 0 ; Reserved |
| 101 | + DCD PendSV_Handler ; PendSV Handler |
| 102 | + DCD SysTick_Handler ; SysTick Handler |
| 103 | + |
| 104 | + ; Exterval Interrupts |
| 105 | + DCD SSP0_Handler ; 16+ 0: SSP 0 Handler |
| 106 | + DCD SSP1_Handler ; 16+ 1: SSP 1 Handler |
| 107 | + DCD UART0_Handler ; 16+ 2: UART 0 Handler |
| 108 | + DCD UART1_Handler ; 16+ 3: UART 1 Handler |
| 109 | + DCD UART2_Handler ; 16+ 4: UART 2 Handler |
| 110 | + DCD I2C0_Handler ; 16+ 5: I2C 0 Handler |
| 111 | + DCD I2C1_Handler ; 16+ 6: I2C 1 Handler |
| 112 | + DCD PORT0_Handler ; 16+ 7: GPIO Port 0 Combined Handler |
| 113 | + DCD PORT1_Handler ; 16+ 8: GPIO Port 1 Combined Handler |
| 114 | + DCD PORT2_Handler ; 16+ 9: GPIO Port 2 Combined Handler |
| 115 | + DCD PORT3_Handler ; 16+10: GPIO Port 3 Combined Handler |
| 116 | + DCD DMA_Handler ; 16+11: DMA Combined Handler |
| 117 | + DCD DUALTIMER0_Handler ; 16+12: Dual timer 0 handler |
| 118 | + DCD DUALTIMER1_Handler ; 16+13: Dual timer 1 handler |
| 119 | + DCD PWM0_Handler ; 16+14: PWM0 Handler |
| 120 | + DCD PWM1_Handler ; 16+15: PWM1 Handler |
| 121 | + DCD PWM2_Handler ; 16+16: PWM2 Handler |
| 122 | + DCD PWM3_Handler ; 16+17: PWM3 Handler |
| 123 | + DCD PWM4_Handler ; 16+18: PWM4 Handler |
| 124 | + DCD PWM5_Handler ; 16+19: PWM5 Handler |
| 125 | + DCD PWM6_Handler ; 16+20: PWM6 Handler |
| 126 | + DCD PWM7_Handler ; 16+21: PWM7 Handler |
| 127 | + DCD RTC_Handler ; 16+22: RTC Handler |
| 128 | + DCD ADC_Handler ; 16+23: ADC Handler |
| 129 | + DCD WZTOE_Handler ; 16+24: WZTOE_Handler |
| 130 | + DCD EXTI_Handler ; 16+25: EXTI_Handler |
| 131 | +__Vectors_End |
| 132 | + |
| 133 | +__Vectors EQU __vector_table |
| 134 | +__Vectors_Size EQU __Vectors_End - __Vectors |
| 135 | + |
| 136 | +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 137 | +;; |
| 138 | +;; Default interrupt handlers. |
| 139 | +;; |
| 140 | + THUMB |
| 141 | + |
| 142 | + PUBWEAK Reset_Handler |
| 143 | + SECTION .text:CODE:REORDER:NOROOT(2) |
| 144 | +Reset_Handler |
| 145 | + LDR R0, =SystemInit |
| 146 | + BLX R0 |
| 147 | + LDR R0, =__iar_program_start |
| 148 | + BX R0 |
| 149 | + |
| 150 | + PUBWEAK NMI_Handler |
| 151 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 152 | +NMI_Handler |
| 153 | + B NMI_Handler |
| 154 | + |
| 155 | + PUBWEAK HardFault_Handler |
| 156 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 157 | +HardFault_Handler |
| 158 | + B HardFault_Handler |
| 159 | + |
| 160 | + PUBWEAK SVC_Handler |
| 161 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 162 | +SVC_Handler |
| 163 | + B SVC_Handler |
| 164 | + |
| 165 | + PUBWEAK PendSV_Handler |
| 166 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 167 | +PendSV_Handler |
| 168 | + B PendSV_Handler |
| 169 | + |
| 170 | + PUBWEAK SysTick_Handler |
| 171 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 172 | +SysTick_Handler |
| 173 | + B SysTick_Handler |
| 174 | + |
| 175 | + PUBWEAK SSP0_Handler |
| 176 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 177 | +SSP0_Handler |
| 178 | + B SSP0_Handler |
| 179 | + |
| 180 | + PUBWEAK SSP1_Handler |
| 181 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 182 | +SSP1_Handler |
| 183 | + B SSP1_Handler |
| 184 | + |
| 185 | + PUBWEAK UART0_Handler |
| 186 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 187 | +UART0_Handler |
| 188 | + B UART0_Handler |
| 189 | + |
| 190 | + PUBWEAK UART1_Handler |
| 191 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 192 | +UART1_Handler |
| 193 | + B UART1_Handler |
| 194 | + |
| 195 | + PUBWEAK UART2_Handler |
| 196 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 197 | +UART2_Handler |
| 198 | + B UART2_Handler |
| 199 | + |
| 200 | + PUBWEAK I2C0_Handler |
| 201 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 202 | +I2C0_Handler |
| 203 | + B I2C0_Handler |
| 204 | + |
| 205 | + PUBWEAK I2C1_Handler |
| 206 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 207 | +I2C1_Handler |
| 208 | + B I2C1_Handler |
| 209 | + |
| 210 | + PUBWEAK PORT0_Handler |
| 211 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 212 | +PORT0_Handler |
| 213 | + B PORT0_Handler |
| 214 | + |
| 215 | + PUBWEAK PORT1_Handler |
| 216 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 217 | +PORT1_Handler |
| 218 | + B PORT1_Handler |
| 219 | + |
| 220 | + PUBWEAK PORT2_Handler |
| 221 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 222 | +PORT2_Handler |
| 223 | + B PORT2_Handler |
| 224 | + |
| 225 | + PUBWEAK PORT3_Handler |
| 226 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 227 | +PORT3_Handler |
| 228 | + B PORT3_Handler |
| 229 | + |
| 230 | + PUBWEAK DMA_Handler |
| 231 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 232 | +DMA_Handler |
| 233 | + B DMA_Handler |
| 234 | + |
| 235 | + PUBWEAK DUALTIMER0_Handler |
| 236 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 237 | +DUALTIMER0_Handler |
| 238 | + B DUALTIMER0_Handler |
| 239 | + |
| 240 | + PUBWEAK DUALTIMER1_Handler |
| 241 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 242 | +DUALTIMER1_Handler |
| 243 | + B DUALTIMER1_Handler |
| 244 | + |
| 245 | + PUBWEAK PWM0_Handler |
| 246 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 247 | +PWM0_Handler |
| 248 | + B PWM0_Handler |
| 249 | + |
| 250 | + PUBWEAK PWM1_Handler |
| 251 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 252 | +PWM1_Handler |
| 253 | + B PWM1_Handler |
| 254 | + |
| 255 | + PUBWEAK PWM2_Handler |
| 256 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 257 | +PWM2_Handler |
| 258 | + B PWM2_Handler |
| 259 | + |
| 260 | + PUBWEAK PWM3_Handler |
| 261 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 262 | +PWM3_Handler |
| 263 | + B PWM3_Handler |
| 264 | + |
| 265 | + PUBWEAK PWM4_Handler |
| 266 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 267 | +PWM4_Handler |
| 268 | + B PWM4_Handler |
| 269 | + |
| 270 | + PUBWEAK PWM5_Handler |
| 271 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 272 | +PWM5_Handler |
| 273 | + B PWM5_Handler |
| 274 | + |
| 275 | + PUBWEAK PWM6_Handler |
| 276 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 277 | +PWM6_Handler |
| 278 | + B PWM6_Handler |
| 279 | + |
| 280 | + PUBWEAK PWM7_Handler |
| 281 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 282 | +PWM7_Handler |
| 283 | + B PWM7_Handler |
| 284 | + |
| 285 | + PUBWEAK RTC_Handler |
| 286 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 287 | +RTC_Handler |
| 288 | + B RTC_Handler |
| 289 | + |
| 290 | + PUBWEAK ADC_Handler |
| 291 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 292 | +ADC_Handler |
| 293 | + B ADC_Handler |
| 294 | + |
| 295 | + PUBWEAK WZTOE_Handler |
| 296 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 297 | +WZTOE_Handler |
| 298 | + B WZTOE_Handler |
| 299 | + |
| 300 | + PUBWEAK EXTI_Handler |
| 301 | + SECTION .text:CODE:REORDER:NOROOT(1) |
| 302 | +EXTI_Handler |
| 303 | + B EXTI_Handler |
| 304 | + |
| 305 | + END |
0 commit comments