;/*!
; * @file        startup_bmp561.s
; *
; * @brief       CMSIS Cortex-M0 based Core Device Startup File for Device BMP561
; *
; * @version     V1.0.0
; *
; * @date        2025-01-01
; *
; * @attention
; *
; *  Copyright (C) 2025 Geehy Semiconductor
; *
; *  You may not use this file except in compliance with the
; *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
; *
; *  The program is only for reference, which is distributed in the hope
; *  that it will be useful and instructional for customers to develop
; *  their software. Unless required by applicable law or agreed to in
; *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
; *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
; *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
; *  and limitations under the License.
; */

    MODULE  ?cstartup

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

        SECTION .intvec:CODE:NOROOT(2)


        EXTERN  __iar_program_start
        EXTERN  SystemInit
        PUBLIC  __vector_table

        DATA

__vector_table
        DCD     sfe(CSTACK)
                DCD     Reset_Handler                ; Reset Handler
                DCD     NMI_Handler                  ; NMI Handler
                DCD     HardFault_Handler            ; Hard Fault Handler
                DCD     0x5A5A5A5A                 ; Reserved
                DCD     0x4B4B4B4B                 ; Reserved
                DCD     0x3C3C3C3C                 ; Reserved
                DCD     0x2D2D2D2D                 ; Reserved
                DCD     0                          ; Reserved
                DCD     0                          ; Reserved
                DCD     0                          ; Reserved
                DCD     SVC_Handler                ; SVCall Handler
                DCD     0                          ; Reserved
                DCD     0                          ; Reserved
                DCD     PendSV_Handler             ; PendSV Handler
                DCD     SysTick_Handler            ; SysTick Handler

                ; External Interrupts
                DCD     I2C_Handler
                DCD     HSC_Handler
                DCD     UART_Handler
                DCD     0
                DCD     WWDT_Handler
                DCD     TMR0_Handler
                DCD     TMR1_Handler
                DCD     CADC_Handler
                DCD     VADC_Handler
                DCD     FLASH_Handler
                DCD     WUPT_Handler
                DCD     I2C_STA_Handler
                DCD     EINT0_Handler
                DCD     EINT1_Handler
                DCD     EINT2_Handler
                DCD     SHA256_Handler
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Default interrupt handlers.
;;
        THUMB

        PUBWEAK Reset_Handler
        SECTION .text:CODE:REORDER:NOROOT(2)
Reset_Handler
        LDR     R0, =SystemInit
        BLX     R0
        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 I2C_Handler
        SECTION .text:CODE:REORDER:NOROOT(1)
I2C_Handler
        B I2C_Handler

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

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

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

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

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

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

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

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

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

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

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

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

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

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

