;******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
;* File Name: startup_stm32f10x_hd_vl.s
;* Author: MCD Application Team
;* Version: V3.4.0
;* Date: 10/15/2010
;* Description: STM32F10x High Density Value Line Devices vector table
;*for MDK-ARM toolchain.
;*This module performs:
;*- Set the initial SP
;*- Set the initial PC == Reset_Handler
;*- Set the vector table entries with the exceptions ISR address
;*- Configure the clock system and also configure the external
;*SRAM mounted on STM32100E-EVAL board to be used as data
;*memory (optional, to be enabled by user)
;*- Branches to __main in the C library (which eventually
;*calls main()).
;*After Reset the CortexM3 processor is in Thread mode,
;*priority is Privileged, and the Stack is set to Main.
;* <<< Use Configuration Wizard in Context Menu >>>
;*******************************************************************************
; 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, STMICROELECTRONICS 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 CONNECTION WITH THEIR PRODUCTS.
;*******************************************************************************
; Amount of memory (in bytes) allocated for Stack
; Tailor this value to your application needs
;
Stack_SizeEQU0x00000400;棧大小
AREASTACK, NOINIT, READWRITE, ALIGN=3
;用AREA 標(biāo)記 STACK段的開始,未初始化,可讀寫,8字節(jié)對齊
Stack_MemSPACEStack_Size;為Stack_Mem 分配Stack_Size個字大小的連續(xù)空間,初始化為0
__initial_sp;STACK 地址分配結(jié)束標(biāo)記(結(jié)束地址)
;
Heap_SizeEQU0x00000200;堆大小
AREAHEAP, NOINIT, READWRITE, ALIGN=3
;用AREA 標(biāo)記 HEAP段的開始,未初始化,可讀寫,8字節(jié)對齊
__heap_base;堆的基地址標(biāo)識(開始地址),(匯編過程中實(shí)際分配具體地址)
Heap_MemSPACEHeap_Size;為Heap_Mem 分配Heap_Size個字大小的連續(xù)空間,初始化為0
__heap_limit;堆的末地址標(biāo)記(結(jié)束地址)
PRESERVE8;要求堆棧保持8字節(jié)對齊
THUMB;說明下面的代碼是Thumb 匯編
; Vector Table Mapped to Address 0 at Reset;
AREARESET, DATA, READONLY;標(biāo)記 RESET 段的開始,數(shù)據(jù)段,只讀
EXPORT__Vectors;聲明一個全局可引用的標(biāo)號“__Vectors”
EXPORT__Vectors_End;聲明一個全局可引用的標(biāo)號“__Vectors_End”
EXPORT__Vectors_Size;聲明一個全局可引用的標(biāo)號“__Vectors_Size”
__VectorsDCD__initial_sp;Top of Stack
;該處物理地址值即為 __Vetors 標(biāo)號所表示的值,
;該地址中存儲__initial_sp所表示的地址值,
;大小為一個字(32bit)
DCDReset_Handler;Reset Handler;這個地址填充 Reset_Handler 入口地址
DCDNMI_Handler; NMI Handler
DCDHardFault_Handler; Hard Fault Handler
DCDMemManage_Handler; MPU Fault Handler
DCDBusFault_Handler; Bus Fault Handler
DCDUsageFault_Handler; Usage Fault Handler
DCD0; Reserved;保留一個字大小的空間(32bit)
DCD0; Reserved
DCD0; Reserved
DCD0; Reserved
DCDSVC_Handler; SVCall Handler
DCDDebugMon_Handler; Debug Monitor Handler
DCD0; Reserved
DCDPendSV_Handler; PendSV Handler
DCDSysTick_Handler; SysTick Handler