;/**
; ******************************************************************************
; * @file startup_gd32f20x_cl.s
; * @author MCU SD
; * @version V1.0.0
; * @date 15-Jul-2015
; * @brief gd32f20x startup code.
; ******************************************************************************
; */
;/* <<< Use Configuration Wizard in Context Menu >>> */
; Amount of memory (in bytes) allocated for Stack and Heap
; Tailor those values to your application needs
;// <h> Stack Configuration
;// <o> Stack Size (in Bytes) <0-8192:8>
;// </h>
Stack_Size EQU 0x400 ;定义栈的大小
;伪指令AREA定义一个段,段名为STACK,NOINIT表示未初始化,READWRITE可读写,按照8(2^3)字节对齐
AREA STACK, NOINIT, READWRITE, ALIGN = 3
Stack_Mem SPACE Stack_Size ;分配连续 Stack_Size 字节的存储单元并初始化为 0
__initial_sp ;栈顶地址
;// <h> Heap Configuration
;// <o> Heap Size (in Bytes) <0-4096:8>
;// </h>
Heap_Size EQU 0x200 ;定义堆的大小
;伪指令AREA定义一个段,段名为HEAP,NOINIT表示未初始化,READWRITE可读写,按照8(2^3)字节对齐
AREA HEAP, NOINIT, READWRITE, ALIGN = 3
__heap_base ;堆首地址
Heap_Mem SPACE Heap_Size ;分配连续 Heap_Size 字节的存储单元并初始化为 0
__heap_limit ;堆末地址
PRESERVE8 ;指示编译器8字节对齐
THUMB ;告诉编译器以后的指令为THUMB指令
; Vector table entries with the exceptions ISR address
AREA RESET, DATA, READONLY ;只读数据段定义
EXPORT __Vectors ;EXPORT定义一个全局标号__Vectors,这个标号可以在其他文件中引用
EXPORT __Vectors_End ;EXPORT定义一个全局标号__Vectors_End,这个标号可以在其他文件中引用
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack //DCD命令分配存储空间,并初始化为栈顶指针__initial_sp
DCD Reset_Handler ; Vector Number 1,Reset Handler
DCD NMI_Handler ; Vector Number 2,NMI Handler
DCD HardFault_Handler ; Vector Number 3,Hard Fault Handler
DCD MemManage_Handler ; Vector Number 4,MPU Fault Handler
DCD BusFault_Handler ; Vector Number 5,Bus Fault Handler
DCD UsageFault_Handler ; Vector Number 6,Usage Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; Vector Number 11,SVCall Handler
DCD DebugMon_Handler ; Vector Number 12,Debug Monitor Handler
DCD 0 ; Reserved
DCD PendSV_Handler ; Vector Number 14,PendSV Handler
DCD SysTick_Handler ; Vector Number 15,SysTick Handler
; External Interrupts
DCD WWDG_IRQHandler ; Vector Number 16,Window Watchdog
DCD LVD_IRQHandler ; Vector Number 17,LVD through EXTI Line detect
DCD TAMPER_IRQHandler ; Vector Number 18,Tamper Interrupt
DCD RTC_IRQHandler ; Vector Number 19,RTC through EXTI Line
DCD FMC_IRQHandler ; Vector Number 20,FMC
DCD RCC_IRQHandler ; Vector Number 21,RCC
DCD EXTI0_IRQHandler ; Vector Number 22,EXTI Line 0
DCD EXTI1_IRQHandler ; Vector Number 23,EXTI Line 1
DCD EXTI2_IRQHandler ; Vector Number 24,EXTI Line 2
DCD EXTI3_IRQHandler ; Vector Number 25,EXTI Line 3
DCD EXTI4_IRQHandler ; Vector Number 26,EXTI Line 4
DCD DMA1_Channel1_IRQHandler ; Vector Number 27,DMA1 Channel 1
DCD DMA1_Channel2_IRQHandler ; Vector Number 28,DMA1 Channel 2
DCD DMA1_Channel3_IRQHandler ; Vector Number 29,DMA1 Channel 3
DCD DMA1_Channel4_IRQHandler ; Vector Number 30,DMA1 Channel 4
DCD DMA1_Channel5_IRQHandler ; Vector Number 31,DMA1 Channel 5
DCD DMA1_Channel6_IRQHandler ; Vector Number 32,DMA1 Channel 6
DCD DMA1_Channel7_IRQHandler ; Vector Number 33,DMA1 Channel 7
DCD ADC1_2_IRQHandler ; Vector Number 34,ADC1 and ADC2
DCD CAN1_TX_IRQHandler ; Vector Number 35,CAN1 TX
DCD CAN1_RX0_IRQHandler ; Vector Number 36,CAN1 RX0
DCD CAN1_RX1_IRQHandler ; Vector Number 37,CAN1 RX1
DCD CAN1_SCE_IRQHandler ; Vector Number 38,CAN1 SCE
DCD EXTI9_5_IRQHandler ; Vector Number 39,EXTI Line 9..5
DCD TIMER1_BRK_TIMER9_IRQHandler ; Vector Number 40,TIMER1 Break and TIMER9 global
DCD TIMER1_UP_TIMER10_IRQHandler ; Vector Number 41,TIMER1 Update and TIMER10 global
DCD TIMER1_TRG_COM_TIMER11_IRQHandler ; Vector Number 42,TIMER1 Break, Update, Trigger and Commutation and TIMER11 global
DCD TIMER1_CC_IRQHandler ; Vector Number 43,TIMER1 Capture Compare
DCD TIMER2_IRQHandler ; Vector Number 44,TIMER2
DCD TIMER3_IRQHandler ; Vector Number 45,TIMER3
DCD TIMER4_IRQHandler ; Vector Number 46,TIMER4
DCD I2C1_EV_IRQHandler ; Vector Number 47,I2C1 Event
DCD I2C1_ER_IRQHandler ; Vector Number 48,I2C1 Error
DCD I2C2_EV_IRQHandler ; Vector Number 49,I2C2 Event
DCD I2C2_ER_IRQHandler ; Vector Number 50,I2C1 Error
DCD SPI1_IRQHandler ; Vector Number 51,SPI1
DCD SPI2_IRQHandler ; Vector Number 52,SPI2
DCD USART1_IRQHandler ; Vector Number 53,USART1
DCD USART2_IRQHandler ; Vector Number 54,USART2
DCD USART3_IRQHandler ; Vector Number 55,USART3
DCD EXTI15_10_IRQHandler ; Vector Number 56,External Line[15:10]
DCD RTCAlarm_IRQHandler ; Vector Number 57,RTC Alarm through EXTI Line
DCD OTG_FS_WKUP_IRQHandler ; Vector Number 58,USB OTG FS WakeUp from suspend through EXTI Line
DCD TIMER8_BRK_TIMER12_IRQHandler ; Vector Number 59,TIMER8 Break Interrupt and TIMER12 global
DCD TIMER8_UP_TIMER13_IRQHandler ; Vector Number 60,TIMER8 Update Interrupt and TIMER13 global
DCD TIMER8_TRG_COM_TIMER14_IRQHandler ; Vector Number 61,TIMER8 Trigger and Commutation Interrupt and TIMER14
DCD TIMER8_CC_IRQHandler ; Vector Number 62,TIMER8 Capture Compare
DCD ADC3_IRQHandler ; Vector Number 63,ADC3
DCD EXMC_IRQHandler ; Vector Number 64,EXMC
DCD SDIO_IRQHandler ; Vector Number 65,SDIO
DCD TIMER5_IRQHandler ; Vector Number 66,TIMER5
DCD SPI3_IRQHandler ; Vector Number 67,SPI3
DCD UART4_IRQHandler ; Vector Number 68,UART4
DCD UART5_IRQHandler ; Vector Number 69,UART5
DCD TIMER6_IRQHandler ; Vector Number 70,TIMER6
DCD TIMER7_IRQHandler ; Vector Number 71,TIMER7
DCD DMA2_Channel1_IRQHandler ; Vector Number 72,DMA2 Channel1
DCD DMA2_Channel2_IRQHandler ; Vector Number 73,DMA2 Channel2
DCD DMA2_Channel3_IRQHandler ; Vector Number 74,DMA2 Channel3
DCD DMA2_Channel4_IRQHandler ; Vector Number 75,DMA2 Channel4
DCD DMA2_Channel5_IRQHandler ; Vector Number 76,DMA2 Channel5
DCD ETH_IRQHandler ; Vector Number 77,Ethernet
DCD ETH_WKUP_IRQHandler ; Vector Number 78,Ethernet Wakeup through EXTI line
DCD CAN2_TX_IRQHandler ; Vector Number 79,CAN2 TX
DCD CAN2_RX0_IRQHandler ; Vector Number 80,CAN2 RX0
DCD CAN2_RX1_IRQHandler ; Vector Number 81,CAN2 RX1
DCD CAN2_SCE_IRQHandler ; Vector Number 82,CAN2 SCE
DCD OTG_FS_IRQHandler ; Vector Number 83,USB OTG FS
DCD 0 ; Vector Number 84,Reserved
DCD DMA2_Channel6_IRQHandler ; Vector Number 85,DMA2 Channel6
DCD DMA2_Channel7_IRQHandler ; Vector Number 86,DMA2 Channel7
DCD USART6_IRQHandler ; Vector Number 87,USART6
DCD I2C3_EV_IRQHandler ; Vector Number 88,I2C3 Event
DCD I2C3_ER_IRQHandler ; Vector Number 89,I2C3 Error
DCD 0 ; Vector Number 90,Reserved
DCD 0 ; Vector Number 91,Reserved
DCD 0 ; Vector Number 92,Reserved
DCD 0 ; Vector Number 93,Reserved
DCD DCI_IRQHandler ; Vector Number 94,DCI
DCD CRYP_IRQHandler ; Vector Number 95,CRYP
DCD HASH_RNG_IRQHandler ; Vector Number 96,Hash and Rng
DCD 0 ; Vector Number 97,Reserved
DCD UART7_IRQHandler ; Vector Number 98,UART7
DCD UART8_IRQHandler ; Vector Number 99,UART8
DCD 0 ; Vector Number 100,Reserved
DCD 0 ; Vector Number 101,Reserved
DCD 0 ; Vector Number 102,Reserved
DCD 0 ; Vector Number 103,Reserved
DCD TLDI_IRQHandler ; Vector Number 104,TLDI
DCD TLDI_ER_IRQHandler ; Vector Number 105,TLDI error
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors |
|