;****************************************************************************************************************************************** 
; 文件名称:    system_SWM050.c
; 功能说明:    SWM050单片机的启动文件
; 技术支持:    http://www.synwit.com.cn/e/tool/gbook/?bid=1
; 注意事项:
; 版本日期: V1.0.0        2012年10月30日
; 升级记录: 
;
;
;******************************************************************************************************************************************
; @attention
;
; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION 
; REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE 
; FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT 
; OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN-
; -ECTION WITH THEIR PRODUCTS.
;
; COPYRIGHT 2012 Synwit Technology
;******************************************************************************************************************************************



        MODULE  ?cstartup

        ;; Forward declaration of sections.
        SECTION CSTACK:DATA:NOROOT(3)

        SECTION .intvec:CODE:NOROOT(2)

        EXTERN  __iar_program_start
        PUBLIC  __vector_table

        DATA
__vector_table
        DCD     sfe(CSTACK)
        DCD     Reset_Handler
        DCD     NMI_Handler
        DCD     HardFault_Handler
        DCD     0
        DCD     0
        DCD     0
        DCD     0
        DCD     0
        DCD     0
        DCD     0
        DCD     SVC_Handler
        DCD     0
        DCD     0
        DCD     PendSV_Handler
        DCD     SysTick_Handler

        ; External Interrupts
        DCD     TMRSE0_Handler
        DCD     TMRSE1_Handler
        DCD     WDT_Handler   
        DCD     ACMP_Handler  
        DCD     GPIO0_Handler 
        DCD     GPIO1_Handler 
        DCD     GPIO2_Handler 
        DCD     GPIO3_Handler 
        DCD     GPIO4_Handler 
        DCD     GPIO5_Handler 
        DCD     GPIO6_Handler 
        DCD     GPIO7_Handler 
        DCD     GPIO8_Handler 
        DCD     GPIO9_Handler 
        

        THUMB

        PUBWEAK Reset_Handler
        SECTION .text:CODE:REORDER:NOROOT(2)
Reset_Handler
        LDR     R0, =__iar_program_start
        BX      R0
        
        PUBWEAK NMI_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
NMI_Handler
        B NMI_Handler

        PUBWEAK HardFault_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
HardFault_Handler
        B HardFault_Handler

        PUBWEAK SVC_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
SVC_Handler
        B SVC_Handler

        PUBWEAK PendSV_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
PendSV_Handler
        B PendSV_Handler

        PUBWEAK SysTick_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
SysTick_Handler
        B SysTick_Handler


        PUBWEAK TMRSE0_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
TMRSE0_Handler
        B TMRSE0_Handler

        PUBWEAK TMRSE1_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
TMRSE1_Handler
        B TMRSE1_Handler

        PUBWEAK WDT_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
WDT_Handler
        B WDT_Handler

        PUBWEAK ACMP_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
ACMP_Handler
        B ACMP_Handler

        PUBWEAK GPIO0_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO0_Handler
        B GPIO0_Handler

        PUBWEAK GPIO1_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO1_Handler
        B GPIO1_Handler

        PUBWEAK GPIO2_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO2_Handler
        B GPIO2_Handler

        PUBWEAK GPIO3_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO3_Handler
        B GPIO3_Handler

        PUBWEAK GPIO4_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO4_Handler
        B GPIO4_Handler

        PUBWEAK GPIO5_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO5_Handler
        B GPIO5_Handler

        PUBWEAK GPIO6_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO6_Handler
        B GPIO6_Handler

        PUBWEAK GPIO7_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO7_Handler
        B GPIO7_Handler

        PUBWEAK GPIO8_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO8_Handler
        B GPIO8_Handler

        PUBWEAK GPIO9_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
GPIO9_Handler
        B GPIO9_Handler


        END
