- ; The modules in this file are included in the libraries, and may be replaced
- ; by any user-defined modules that define the PUBLIC symbol _program_start or
- ; a user defined start symbol.
- ; To override the cstartup defined in the library, simply add your modified
- ; version to the workbench project.
- ;
- ; The vector table is normally located at address 0.
- ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
- ; The name "__vector_table" has special meaning for C-SPY:
- ; it is where the SP start value is found, and the NVIC vector
- ; table register (VTOR) is initialized to this address if != 0.
- ;
- ; Cortex-M version
- ;
- MODULE ?cstartup
- ;; Forward declaration of sections.
- SECTION CSTACKATA:NOROOT(3)
- SECTION .intvec:CODE:NOROOT(2)
- EXTERN __iar_program_start
- EXTERN SystemInit
- EXTERN init_data_bss
- PUBLIC __vector_table
- PUBLIC __vector_table_0x1c
- PUBLIC __Vectors
- PUBLIC __Vectors_End
- PUBLIC __Vectors_Size
- DATA
- __vector_table
- DCD sfe(CSTACK)
- DCD Reset_Handler
- DCD NMI_Handler ;NMI Handler
- DCD HardFault_Handler ;Hard Fault Handler
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- __vector_table_0x1c
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- DCD SVC_Handler ;SVCall Handler
- DCD 0 ;Reserved
- DCD 0 ;Reserved
- DCD PendSV_Handler endSV Handler
- DCD SysTick_Handler ;SysTick Handler
- ;External Interrupts
- DCD DMA0_IRQHandler ;DMA channel 0 transfer complete
- DCD DMA1_IRQHandler ;DMA channel 1 transfer complete
- DCD DMA2_IRQHandler ;DMA channel 2 transfer complete
- DCD DMA3_IRQHandler ;DMA channel 3 transfer complete
- DCD Reserved20_IRQHandler ;Reserved interrupt
- DCD FTFA_IRQHandler ;Command complete and read collision
- DCD PMC_IRQHandler ;Low-voltage detect, low-voltage warning
- DCD LLWU_IRQHandler ;Low leakage wakeup
- DCD I2C0_IRQHandler ;I2C0 interrupt
- DCD I2C1_IRQHandler ;I2C1 interrupt
- DCD SPI0_IRQHandler ;SPI0 single interrupt vector for all sources
- DCD SPI1_IRQHandler ;SPI1 single interrupt vector for all sources
- DCD LPUART0_IRQHandler ;LPUART0 status and error
- DCD LPUART1_IRQHandler ;LPUART1 status and error
- DCD UART2_FLEXIO_IRQHandler ;UART2 or FLEXIO
- DCD ADC0_IRQHandler ;ADC0 interrupt
- DCD CMP0_IRQHandler ;CMP0 interrupt
- DCD TPM0_IRQHandler ;TPM0 single interrupt vector for all sources
- DCD TPM1_IRQHandler ;TPM1 single interrupt vector for all sources
- DCD TPM2_IRQHandler ;TPM2 single interrupt vector for all sources
- DCD RTC_IRQHandler ;RTC alarm
- DCD RTC_Seconds_IRQHandler ;RTC seconds
- DCD PIT_IRQHandler IT interrupt
- DCD Reserved39_IRQHandler ;Reserved interrupt
- DCD Reserved40_IRQHandler ;Reserved interrupt
- DCD Reserved41_IRQHandler ;Reserved interrupt
- DCD Reserved42_IRQHandler ;Reserved interrupt
- DCD Reserved43_IRQHandler ;Reserved interrupt
- DCD LPTMR0_IRQHandler ;LPTMR0 interrupt
- DCD Reserved45_IRQHandler ;Reserved interrupt
- DCD PORTA_IRQHandler ORTA Pin detect
- DCD PORTBCDE_IRQHandler ;Single interrupt vector for PORTB,PORTC,PORTD,PORTE
- __Vectors_End
- SECTION FlashConfig:CODE
- __FlashConfig
- DCD 0xFFFFFFFF
- DCD 0xFFFFFFFF
- DCD 0xFFFFFFFF
- DCD 0xFFFF3DFE
- __FlashConfig_End
- __Vectors EQU __vector_table
- __Vectors_Size EQU __Vectors_End - __Vectors
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Default interrupt handlers.
- ;;
- THUMB
- PUBWEAK Reset_Handler
- SECTION .text:CODE:REORDER:NOROOT(2)
- Reset_Handler
- CPSID I ; Mask interrupts
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =init_data_bss
- BLX R0
- CPSIE I ; Unmask interrupts
- LDR R0, =__iar_program_start
- BX R0
- PUBWEAK NMI_Handler
- SECTION .text:CODE:REORDER:NOROOT(1)
- NMI_Handler
- B .
- PUBWEAK HardFault_Handler
- SECTION .text:CODE:REORDER:NOROOT(1)
- HardFault_Handler
- B .
- PUBWEAK SVC_Handler
- SECTION .text:CODE:REORDER:NOROOT(1)
- SVC_Handler
- B .
|