一、STM32发动文件具体解析
STM32发动文件具体解析(V3.5.0) 以:startup_stm32f10x_hd.s为例
;********************(C)COPYRIGHT2011STMicroelectronics********************
;*FileName:startup_stm32f10x_hd.s
;*Author:MCDApplicaTIonTeam
;*Version:V3.5.0
;*Date:11-March-2011
;*DescripTIon:STM32F10xHighDensityDevicesvectortableforMDK-ARM
;*toolchain.
;*Thismoduleperforms:
;*-SettheiniTIalSP
;*-SettheiniTIalPC==Reset_Handler
;*-SetthevectortableentrieswiththeexceptionsISRaddress
;*-Configuretheclocksystemandalsoconfiguretheexternal
;*SRAMmountedonSTM3210E-EVALboardtobeusedasdata
;*memory(optional,tobeenabledbyuser)
;*-Branchesto__mainintheClibrary(whicheventually
;*callsmain())。
;*AfterResettheCortexM3processorisinThreadmode,
;*priorityisPrivileged,andtheStackissettoMain.
;*《《》》
;*******************************************************************************
;THEPRESENTFIRMWAREWHICHISFORGUIDANCEONLYAIMSATPROVIDINGCUSTOMERS
;WITHCODINGINFORMATIONREGARDINGTHEIRPRODUCTSINORDERFORTHEMTOSAVETIME.
;ASARESULT,STMICROELECTRONICSSHALLNOTBEHELDLIABLEFORANYDIRECT,
;INDIRECTORCONSEQUENTIALDAMAGESWITHRESPECTTOANYCLAIMSARISINGFROMTHE
;CONTENTOFSUCHFIRMWAREAND/ORTHEUSEMADEBYCUSTOMERSOFTHECODING
;INFORMATIONCONTAINEDHEREININCONNECTIONWITHTHEIRPRODUCTS.
;*******************************************************************************
;Amountofmemory(inbytes)allocatedforStack
;Tailorthisvaluetoyourapplicationneeds
;StackConfiguration;栈界说
;StackSize(inBytes)《0x0-0xFFFFFFFF:8》
;
Stack_SizeEQU0x00000400;EQU伪指令,作用是左面的符号名代表右边的表达式
AREASTACK,NOINIT,READWRITE,ALIGN=3;界说栈段:名称为STACK,未初始化,可读写,ELF的栈段按2^3=8对齐
Stack_MemSPACEStack_Size;分配一片接连的存储区域并初始化为0,栈空间:0x400个字节
__initial_sp;栈空间顶地址
;HeapConfiguration;堆界说
;HeapSize(inBytes)《0x0-0xFFFFFFFF:8》
;
Heap_SizeEQU0x00000200
AREAHEAP,NOINIT,READWRITE,ALIGN=3
__heap_base;堆空间开始地址
Heap_MemSPACEHeap_Size;堆空间:0x200个字节
__heap_limit;堆空间完毕地址
PRESERVE8;PRESERVE8指令指定当时文件坚持仓库八字节对齐
THUMB;告知汇编器下面是32位的Thumb指令,假如需求汇编器将刺进位以确保对齐
;VectorTableMappedtoAddress0atReset;中断向量表界说
;实际上是在CODE区(假定STM32从FLASH发动,则此中断向量表开始地址即为0x8000000)
AREARESET,DATA,READONLY;界说一块数据段,只可读,段姓名是RESET
EXPORT__Vectors;EXPORT:在程序中声明一个大局的标号__Vectors,该标号可在其他的文件中引证