LM3s8962体验之七……关于Startup.s解析
[复制链接]
关于Startup.s解析 ; <<< Use Configuration Wizard in Context Menu >>> ;****************************************************************************** ; ; Startup.s - Startup code for Stellaris. ; ; Copyright (c) 2006-2007 Luminary Micro, Inc. All rights reserved. ; ; Software License Agreement ; ; Luminary Micro, Inc. (LMI) is supplying this software for use solely and ; exclusively on LMI's microcontroller products. ; ; The software is owned by LMI and/or its suppliers, and is protected under ; applicable copyright laws. All rights are reserved. Any use in violation ; of the foregoing restrictions may subject the user to criminal sanctions ; under applicable laws, as well as to civil liability for the breach of the ; terms and conditions of this license. ; ; THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED ; OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF ; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. ; LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR ; CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. ; ; This is part of revision 1463 of the Stellaris Peripheral Driver Library. ; ;****************************************************************************** extern GPIO_Port_E_ISR ;****************************************************************************** ; ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> 栈尺寸 ; ;****************************************************************************** Stack EQU 0x00000100 ;为数字常量0x00000100定义一个字符名称Stack
;****************************************************************************** ; ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> 堆尺寸 ; ;****************************************************************************** Heap EQU 0x00000000 ;定义Heap为0x00000000
;****************************************************************************** ; ; Allocate space for the stack. 为栈分配空间 ; ;****************************************************************************** AREA STACK, NOINIT, READWRITE, ALIGN=3 ;定义一个数据段,名为STACK,NOINIT 仅仅保留内存单元,还没有写入值,可读写,ALIGN=3 按8字节对齐
StackMem ; 分配内存,用户模式栈名为StackMem SPACE Stack ;分配0x100个连续字节,并初始化为0 __initial_sp ;Stack地址分配结束标记(就是一个地址标记) 栈顶地址
;****************************************************************************** ; ; Allocate space for the heap. 为堆分配空间 ; 堆空间,其中__heap_base 与__heap_limit 这两个符号是给采用了MICROLIB的程序准备的 ;****************************************************************************** AREA HEAP, NOINIT, READWRITE, ALIGN=3 ;定义栈STACK,未初始化为0,可读写 ,8字节对齐 __heap_base ;指定堆的开头 HeapMem ; 分配内存,用户模式堆名为HeapMem SPACE Heap ;分配0个连续字节 __heap_limit; 指定堆的结尾
;****************************************************************************** ; ; Indicate that the code in this file preserves 8-byte alignment of the stack. ; ;****************************************************************************** PRESERVE8 ;当前文件保持堆栈为8 字节对齐
;****************************************************************************** ; ; Place code into the reset code section. ; ;****************************************************************************** AREA RESET, CODE, READONLY ;定义reset只读代码段, THUMB ;告诉汇编器下面是32为的Thumb指令,如果需要汇编器将插入位以保证对齐
;****************************************************************************** ; ; The vector table. 中断向量表 ; ;****************************************************************************** EXPORT __Vectors ;在程序中声明一个全局的标号__Vectors,该标号可在其他的文件中引用 __Vectors DCD StackMem + Stack ; Top of Stack 栈顶 分配4字节32位的地址0x0 DCD Reset_Handler ; Reset Handler 复位处理函数 DCD NmiSR ; NMI Handler 不可屏蔽 DCD FaultISR ; Hard Fault Handler 硬件出错 DCD IntDefaultHandler ; MPU Fault Handler MEM MANAGE 存储器管理失败 DCD IntDefaultHandler ; Bus Fault Handler 总线出错 DCD IntDefaultHandler ; Usage Fault Handler 使用故障 无效指令 非法状态转换 DCD 0 ; Reserved 保留 DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD IntDefaultHandler ; SVCall Handler 软件中断,使用SVC 指令触发 执行系统服务调用指令引发中断 DCD IntDefaultHandler ; Debug Monitor Handler 调试监控 DCD 0 ; Reserved DCD IntDefaultHandler ; PendSV Handler 响应请求 DCD IntDefaultHandler ; SysTick Handler DCD IntDefaultHandler ; GPIO Port A A外部中断 DCD IntDefaultHandler ; GPIO Port B DCD IntDefaultHandler ; GPIO Port C DCD IntDefaultHandler ; GPIO Port D DCD GPIO_Port_E_ISR ; GPIO Port E ; DCD IntDefaultHandler ; GPIO Port E DCD IntDefaultHandler ; UART0 DCD IntDefaultHandler ; UART1 DCD IntDefaultHandler ; SSI DCD IntDefaultHandler ; I2C DCD IntDefaultHandler ; PWM Fault DCD IntDefaultHandler ; PWM Generator 0 DCD IntDefaultHandler ; PWM Generator 1 DCD IntDefaultHandler ; PWM Generator 2 DCD IntDefaultHandler ; Quadrature Encoder DCD IntDefaultHandler ; ADC Sequence 0 DCD IntDefaultHandler ; ADC Sequence 1 DCD IntDefaultHandler ; ADC Sequence 2 DCD IntDefaultHandler ; ADC Sequence 3 DCD IntDefaultHandler ; Watchdog DCD IntDefaultHandler ; Timer 0A DCD IntDefaultHandler ; Timer 0B DCD IntDefaultHandler ; Timer 1A DCD IntDefaultHandler ; Timer 1B DCD IntDefaultHandler ; Timer 2A DCD IntDefaultHandler ; Timer 2B DCD IntDefaultHandler ; Comp 0 DCD IntDefaultHandler ; Comp 1 DCD IntDefaultHandler ; Comp 2 DCD IntDefaultHandler ; System Control DCD IntDefaultHandler ; Flash Control DCD IntDefaultHandler ; GPIO Port F DCD IntDefaultHandler ; GPIO Port G DCD IntDefaultHandler ; GPIO Port H DCD IntDefaultHandler ; UART2 Rx and Tx DCD IntDefaultHandler ; SSI1 Rx and Tx DCD IntDefaultHandler ; Timer 3 subtimer A DCD IntDefaultHandler ; Timer 3 subtimer B DCD IntDefaultHandler ; I2C1 Master and Slave DCD IntDefaultHandler ; Quadrature Encoder 1 DCD IntDefaultHandler ; CAN0 DCD IntDefaultHandler ; CAN1 DCD 0 ; Reserved DCD IntDefaultHandler ; Ethernet DCD IntDefaultHandler ; Hibernate
|