Cortex-M3 (NXP LPC1788)之启动代码分析
时间:11-19
来源:互联网
点击:
在Keil uVision4中新建一个基于NXP1788的工程后,会提示添加启动汇编代码startup_LPC177x_8x.S。该文件进行从汇编到C语言运行环境的初始化工作。
- ;/*****************************************************************************
- ;*@file:startup_LPC177x_8x.s
- ;*@purpose:CMSISCortex-M3CoreDeviceStartupFile
- ;*fortheNXPLPC177x_8xDeviceSeries
- ;*@version:V1.20
- ;*@date:07.October2010
- ;*-------
>>------------------ - ;*
- ;*Copyright(C)2010ARMLimited.Allrightsreserved.
- ;*ARMLimited(ARM)issupplyingthissoftwareforusewithCortex-M3
- ;*processorbasedmicrocontrollers.Thisfilecanbefreelydistributed
- ;*withindevelopmenttoolsthataresupportingsuchARMbasedprocessors.
- ;*
- ;*THISSOFTWAREISPROVIDED"ASIS".NOWARRANTIES,WHETHEREXPRESS,IMPLIED
- ;*ORSTATUTORY,INCLUDING,BUTNOTLIMITEDTO,IMPLIEDWARRANTIESOF
- ;*MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAPPLYTOTHISSOFTWARE.
- ;*ARMSHALLNOT,INANYCIRCUMSTANCES,BELIABLEFORSPECIAL,INCIDENTAL,OR
- ;*CONSEQUENTIALDAMAGES,FORANYREASONWHATSOEVER.
- ;*
- ;*****************************************************************************/
- ;
StackConfiguration - ;
StackSize(inBytes)<0x0-0xFFFFFFFF:8> - ;
- Stack_SizeEQU0x00000200
- AREASTACK,NOINIT,READWRITE,ALIGN=3
- Stack_MemSPACEStack_Size
- __initial_sp
- ;
HeapConfiguration - ;
HeapSize(inBytes)<0x0-0xFFFFFFFF:8> - ;
- Heap_SizeEQU0x00000400
- AREAHEAP,NOINIT,READWRITE,ALIGN=3
- __heap_base
- Heap_MemSPACEHeap_Size
- __heap_limit
- PRESERVE8
- THUMB
- ;VectorTableMappedtoAddress0atReset
- AREARESET,DATA,READONLY
- EXPORT__Vectors
- __VectorsDCD__initial_sp;TopofStack
- DCDReset_Handler;ResetHandler
- DCDNMI_Handler;NMIHandler
- DCDHardFault_Handler;HardFaultHandler
- DCDMemManage_Handler;MPUFaultHandler
- DCDBusFault_Handler;BusFaultHandler
- DCDUsageFault_Handler;UsageFaultHandler
- DCD0;Reserved
- DCD0;Reserved
- DCD0;Reserved
- DCD0;Reserved
- DCDSVC_Handler;SVCallHandler
- DCDDebugMon_Handler;DebugMonitorHandler
- DCD0;Reserved
- DCDPendSV_Handler;PendSVHandler
- DCDSysTick_Handler;SysTickHandler
- ;ExternalInterrupts
- DCDWDT_IRQHandler;16:WatchdogTimer
- DCDTIMER0_IRQHandler;17:Timer0
- DCDTIMER1_IRQHandler;18:Timer1
- DCDTIMER2_IRQHandler;19:Timer2
- DCDTIMER3_IRQHandler;20:Timer3
- DCDUART0_IRQHandler;21:UART0
- DCDUART1_IRQHandler;22:UART1
- DCDUART2_IRQHandler;23:UART2
- DCDUART3_IRQHandler;24:UART3
- DCDPWM1_IRQHandler;25:PWM1
- DCDI2C0_IRQHandler;26:I2C0
- DCDI2C1_IRQHandler;27:I2C1
- DCDI2C2_IRQHandler;28:I2C2
- DCDSPIFI_IRQHandler;29:SPIFI
- DCDSSP0_IRQHandler;30:SSP0
- DCDSSP1_IRQHandler;31:SSP1
- DCDPLL0_IRQHandler;32:PLL0Lock(MainPLL)
- DCDRTC_IRQHandler;33:RealTimeClock
- DCDEINT0_IRQHandler;34:ExternalInterrupt0
- DCDEINT1_IRQHandler;35:ExternalInterrupt1
- DCDEINT2_IRQHandler;36:ExternalInterrupt2
- DCDEINT3_IRQHandler;37:ExternalInterrupt3
- DCDADC_IRQHandler;38:A/DConverter
- DCDBOD_IRQHandler;39:Brown-OutDetect
- DCDUSB_IRQHandler;40:USB
- DCDCAN_IRQHandler;41:CAN
- DCDDMA_IRQHandler;42:GeneralPurposeDMA
- DCDI2S_IRQHandler;43:I2S
- DCDENET_IRQHandler;44:Ethernet
- DCDMCI_IRQHandler;45:SD/MMCcardI/F
- DCDMCPWM_IRQHandler;46:MotorControlPWM
- DCDQEI_IRQHandler;47:QuadratureEncoderInterface
- DCDPLL1_IRQHandler;48:PLL1Lock(USBPLL)
- DCDUSBActivity_IRQHandler;49:USBActivityinterrupttowakeup
- DCDCANActivity_IRQHandler;50:CANActivityinterrupttowakeup
- DCDUART4_IRQHandler;51:UART4
- DCDSSP2_IRQHandler;52:SSP2
- DCDLCD_IRQHandler;53:LCD
- DCDGPIO_IRQHandler;54:GPIO
- DCDPWM0_IRQHandler;55:PWM0
- DCDEEPROM_IRQHandler;56:EEPROM
- IF:LNOT::DEF:NO_CRP
- AREA|.ARM.__at_0x02FC|,CODE,READONLY
- CRP_KeyDCD0xFFFFFFFF
- ENDIF
- AREA|.text|,CODE,READONLY
- ;ResetHandler
- Reset_HandlerPROC
- EXPORTReset_Handler[WEAK]
- IMPORTSystemInit
- IMPORT__main
- LDRR0,=SystemInit
- BLXR0
- LDRR0,=__main
- BXR0
- ENDP
- ;DummyExceptionHandlers(infiniteloopswhichcanbemodified)
- NMI_HandlerPROC
- EXPORTNMI_Handler[WEAK]
- B.
- ENDP
- HardFault_Handler\
- PROC
- EXPORTHardFault_Handler[WEAK]
- B.
- ENDP
- MemManage_Handler\
- PROC
- EXPORTMemManage_Handler[WEAK]
- B.
- ENDP
Cortex-M3NXPLPC1788启动代 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)