嵌入式系统设计.pdf
《嵌入式系统设计.pdf》由会员分享,可在线阅读,更多相关《嵌入式系统设计.pdf(120页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2嵌入式系统设计嵌入式系统设计嵌入式系统设计嵌入式系统设计第三章第三章第三章第三章 ARM ARM 汇编语言汇编语言汇编语言汇编语言北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言?ADS1.2ADS1.2?AssemblerAssembler?ARM Assembly LanguageARM Assembly Language?ARM Instruction SetARM Instruction Set?Thumb Instruction SetThumb Instr
2、uction Set?ExamplesExamples?SummarySummary北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(1)ADS(1)1.What is ADS1.What is ADS?ARM Developer SuiteARM Developer Suite?Can be used to develop,build,and debug C,Can be used to develop,build,and debug C,C+,or ARM assembly language programs.C+,or AR
3、M assembly language programs.?RVDS RVDS(RealViewRealView Developer SuiteDeveloper Suite)2.Components of ADS2.Components of ADS?CommandCommand-line development toolsline development tools?GUI development toolsGUI development tools?UtilitiesUtilities?Supporting software.Supporting software.北京大学软件与微电子学
4、院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(2)ADS(2)3.Command3.Command-line development toolsline development tools?armccarmccThe ARM C compiler.It compiles ANSI source into The ARM C compiler.It compiles ANSI source into 3232-bit ARM code.bit ARM code.?armcpparmcppThis is the ARM C+compiler.It co
5、mpiles ISO C+This is the ARM C+compiler.It compiles ISO C+or EC+source into 32or EC+source into 32-bit ARM code.bit ARM code.?tcctccThe Thumb C compiler.It compiles ANSI source into The Thumb C compiler.It compiles ANSI source into 1616-bit Thumb code.bit Thumb code.?tcpptcppThis is the Thumb C+comp
6、iler.It compiles ISO This is the Thumb C+compiler.It compiles ISO C+or EC+source into 16C+or EC+source into 16-bit Thumb code.bit Thumb code.北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(3)ADS(3)3.Command3.Command-line development tools line development tools(cont.)(cont.)?armasmarmasmThe
7、 ARM and Thumb assembler.The ARM and Thumb assembler.For both ARM and Thumb assembly language source.For both ARM and Thumb assembly language source.?armlinkarmlinkThe ARM linker.The ARM linker.It Combines object files and libraries to produce an It Combines object files and libraries to produce an
8、ELF executable images.ELF executable images.?armsdarmsdThe ARM and Thumb symbolic debugger.This The ARM and Thumb symbolic debugger.This enables source level debugging of programs.enables source level debugging of programs.为什么为什么ARM和和Thumb编译工具不同,而汇编工具可以是同一个?编译工具不同,而汇编工具可以是同一个?北京大学软件与微电子学院北京大学软件与微电子学
9、院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(4)ADS(4)4.GUI development tools4.GUI development tools?AXDAXDThe ARM Debugger for Windows and UNIX.The ARM Debugger for Windows and UNIX.?IDEIDEThe project management tool for Windows.The project management tool for Windows.5.Supporting software.5.Supporting softwar
10、e.?ARMulatorARMulator,The ARM core simulator.,The ARM core simulator.?This provides instructionThis provides instruction-accurate simulation of accurate simulation of ARM processorsARM processors?Enables ARM and Thumb executable programs to Enables ARM and Thumb executable programs to be run on nonb
11、e run on non-native hardwarenative hardware北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(5)ADS(5)6.Utilities 6.Utilities?fromELFfromELFThe ARM image conversion utility.The ARM image conversion utility.?armprofarmprofThe ARM profiler displays an execution profile of a simple The ARM profil
12、er displays an execution profile of a simple program from a profile data file generated by an ARM program from a profile data file generated by an ARM debugger.debugger.?armararmarThe ARM librarian enables sets of ELF format object files to The ARM librarian enables sets of ELF format object files t
13、o be collected together and maintained in librariesbe collected together and maintained in libraries?Flash downloaderFlash downloaderUtility for downloading binary images to Flash memory on Utility for downloading binary images to Flash memory on an ARM Integrator board or an ARM Development boardan
14、 ARM Integrator board or an ARM Development board.北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(9)ADS(9)8.AXD 8.AXD?What is AXDWhat is AXD?ARM ARM eXtendedeXtended DebuggerDebugger?Debug targetDebug target?Simulator on the same computerSimulator on the same computer?Hardware on a printed
15、circuit boardHardware on a printed circuit board?debugger issuesdebugger issues?Load software into memory on the targetLoad software into memory on the target?Start and stop execution of that softwareStart and stop execution of that software?Display the contents of memory,registers,and Display the c
16、ontents of memory,registers,and variablesvariables?Enable you to change stored values.Enable you to change stored values.北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(10)ADS(10)8.AXD(cont.)8.AXD(cont.)?What is AXD(cont.)What is AXD(cont.)?Debug agentDebug agent?FunctionsFunctions?Setting
17、breakpointsSetting breakpoints?Reading from memoryReading from memory?Writing to memoryWriting to memory北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-ADS(11)ADS(11)8.AXD(cont.)8.AXD(cont.)?What is AXD(cont.)What is AXD(cont.)?Debug agentDebug agent?ExamplesExamples?ARMulatorARMulatorProvides
18、an environment for the development of Provides an environment for the development of ARMARM-targeted software on the supported host targeted software on the supported host systemssystemsEnables benchmarking of ARMEnables benchmarking of ARM-targeted software.targeted software.?AngelAngelDevelopment
19、and debugging of applications Development and debugging of applications running on ARMrunning on ARM-based hardwarebased hardware?MultiMulti-ICEICEProvide the interface between a debugger and Provide the interface between a debugger and an ARM corean ARM core北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇
20、编语言汇编语言汇编语言?ADS1.2ADS1.2?AssemblerAssembler?ARM Assembly LanguageARM Assembly Language?ARM Instruction SetARM Instruction Set?Thumb Instruction SetThumb Instruction Set?ExamplesExamples?SummarySummary北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇编语言汇编语言汇编语言-Assembler(1)Assembler(1)1.Format of source line
21、s1.Format of source lines?lines in an ARM assembly language module lines in an ARM assembly language module is:is:symbol instruction|directive|pseudosymbol instruction|directive|pseudo-instruction;instruction;commencommen?ExamplesExampleslable1lable1ADD r1ADD r1,r2 ;r2 ;”+”北京大学软件与微电子学院北京大学软件与微电子学院20
22、06.22006.2汇编语言汇编语言汇编语言汇编语言-Assembler(2)Assembler(2)2.Predefined register and coprocessor names2.Predefined register and coprocessor names?PredeclaredPredeclared register namesregister names?r0r0-r15 and R0r15 and R0-R15R15?a1a1-a4(argument,result,or scratch registers,a4(argument,result,or scratch re
23、gisters,synonyms for r0 to r3)synonyms for r0 to r3)?v1v1-v8(variable registers,r4 to r11)v8(variable registers,r4 to r11)?sbsb and SB(static base,r9)and SB(static base,r9)?slsl and SL(stack limit,r10)and SL(stack limit,r10)?fpfp and FP(frame pointer,r11)and FP(frame pointer,r11)?ipip and IP(intraan
24、d IP(intra-procedureprocedure-call scratch register,call scratch register,r12)r12)?sp and SP(stack pointer,r13)sp and SP(stack pointer,r13)?lr lr and LR(link register,r14)and LR(link register,r14)?pc and PC(program counter,r15).pc and PC(program counter,r15).北京大学软件与微电子学院北京大学软件与微电子学院2006.22006.2汇编语言汇
25、编语言汇编语言汇编语言-Assembler(3)Assembler(3)2.Predefined register and coprocessor 2.Predefined register and coprocessor names(cont.)names(cont.)?PredeclaredPredeclared program status register namesprogram status register names?cpsrcpsr and CPSR(current program status register)and CPSR(current program status
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 嵌入式 系统 设计
限制150内