計算機外文翻譯 --keil c 簡介_第1頁
已閱讀1頁,還剩8頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、<p>  The introduction of keil C</p><p>  The Keil Software 8051 development tools listed below are programs you use to compile your C code, assemble your assembly source files, link and locate object m

2、odules and libraries, create HEX files, and debug your target program.</p><p>  µVision2 for Windows? is an Integrated Development Environment that combines project management, source code editing, and

3、program debugging in one single, powerful environment.</p><p>  The C51 ANSI Optimizing C Cross Compiler creates relocatable object modules from your C source code.</p><p>  The A51 Macro Assemb

4、ler creates relocatable object modules from your 8051 assembly source code.</p><p>  The BL51 Linker/Locator combines relocatable object modules created by the C51 Compiler and the A51 Assembler into absolut

5、e object modules.</p><p>  The LIB51 Library Manager combines object modules into libraries that may be used by the linker.</p><p>  The OH51 Object-HEX Converter creates Intel HEX files from ab

6、solute object modules.</p><p>  The RTX-51 Real-time Operating System simplifies the design of complex, time-critical software projects.</p><p>  Software Development Cycle</p><p> 

7、 When you use the Keil Software tools, the project development cycle is roughly the same as it is for any other software development project. </p><p>  1. Create a project, select the target chip from the de

8、vice database, and configure the tool settings.</p><p>  2. Create source files in C or assembly.</p><p>  3. Build your application with the project manager.</p><p>  4. Correct er

9、rors in source files.</p><p>  5. Test the linked application.</p><p>  µVision2 IDE</p><p>  The µVision2 IDE combines project management, a rich-featured editor with int

10、eractive error correction, option setup, make facility, and on-line help. Use µVision2 to create your source files and organize them into a project that defines your target application. µVision2 automatically c

11、ompiles, assembles, and links your embedded application and provides a single focal point for your development efforts.</p><p>  LIB51 Library Manager</p><p>  The LIB51 library manager allows y

12、ou to create object library from the object files created by the compiler and assembler. Libraries are specially formatted, ordered program collections of object modules that may be used by the linker at a later time. Wh

13、en the linker processes a library, only those object modules in the library that are necessary to create the program are used.</p><p>  BL51 Linker/Locator</p><p>  The BL51 linker creates an ab

14、solute object module using the object modules extracted from libraries and those created by the compiler and assembler. An absolute object file or module contains no relocatable code or data. All code and data reside at

15、fixed memory locations. The absolute object file may be used:</p><p>  To program an EPROM or other memory devices,</p><p>  With the µVision2 Debugger for simulation and target debugging,&

16、lt;/p><p>  With an in-circuit emulator for the program testing.</p><p>  µVision2 Debugger</p><p>  The µVision2 symbolic, source-level debugger is ideally suited for fast,

17、reliable program debugging. The debugger includes a high-speed simulator that let you simulate an entire 8051 system including on-chip peripherals and external hardware. The attributes of the chip you use are automatical

18、ly configured when you select the device from the Device Database.</p><p>  The µVision2 Debugger provides several ways for you to test your programs on</p><p>  real target hardware:</p

19、><p>  Install the MON51 Target Monitor on your target system and download your program using the Monitor-51 interface built-in to the µVision2 Debugger.</p><p>  Use the Advanced GDI interfac

20、e to attach use the µVision2 Debugger front end with your target system.</p><p>  Monitor-51</p><p>  The µVision2 Debugger supports target debugging using Monitor-51. The monitor prog

21、ram resides in the memory of your target hardware and communicates with the µVision2 Debugger using the serial port of the 8051 and a COM port of your PC. With Monitor-51, µVision2 lets you perform source-level

22、, symbolic debugging on your target hardware.</p><p>  RTX51 Real-Time Operating System</p><p>  The RTX51 real-time operating system is a multitasking kernel for the 8051 microcontroller family

23、. The RTX51 real-time kernel simplifies the system design, programming, and debugging of complex applications where fast reaction to time critical events is essential. The kernel is fully integrated into the C51 Compiler

24、 and is easy to use. Task description tables and operating system consistency are automatically controlled by the BL51 linker/locator.</p><p>  C51 Optimizing C Cross Compiler</p><p>  The Keil

25、C51 Cross Compiler is an ANSI C Compiler that was written</p><p>  specifically to generate fast, compact code for the 8051 microcontroller family.</p><p>  The C51 Compiler generates object cod

26、e that matches the efficiency and speed</p><p>  of assembly programming.</p><p>  Using a high-level language like C has many advantages over assembly language</p><p>  programming

27、:</p><p>  Knowledge of the processor instruction set is not required. Rudimentary knowledge of the memory structure of the 8051 CPU is desirable (but not necessary).</p><p>  Details like regis

28、ter allocation and addressing of the various memory types and data types is managed by the compiler.</p><p>  Programs get a formal structure (which is imposed by the C programming language) and can be divid

29、ed into separate functions. This contributes to source code reusability as well as better overall application structure.</p><p>  The ability to combine variable selection with specific operations improves p

30、rogram readability.</p><p>  Keywords and operational functions that more nearly resemble the human thought process may be used.</p><p>  Programming and program test time is drastically reduced

31、.</p><p>  The C run-time library contains many standard routines such as: formatted output, numeric conversions, and floating-point arithmetic.</p><p>  Existing program parts can be more easil

32、y included into new programs because of modular program construction techniques.</p><p>  The language C is a very portable language (based on the ANSI standard) that enjoys wide popular support and is easil

33、y obtained for most systems.</p><p>  Existing program investments can be quickly adapted to other processors as needed.</p><p>  Code Optimizations</p><p>  The C51 Compiler is an

34、aggressive optimizing compiler that takes numerous steps to ensure that the code generated and output to the object file is the most efficient (smallest and/or fastest) code possible. The compiler analyzes the generated

35、code to produce the most efficient instruction sequences. This ensures that your C program runs as quickly and effectively as possible in the least amount of code space. </p><p>  The C51 Compiler provides n

36、ine different levels of optimizing. Each increasing level includes the optimizations of levels below it. The following is a list of all optimizations currently performed by the C51 Compiler.</p><p>  General

37、 Optimizations</p><p>  Constant Folding: Constant values occurring in an expression or address calculation are combined as a single constant.</p><p>  Jump Optimizing: Jumps are inverted or ext

38、ended to the final target address when the program efficiency is thereby increased.</p><p>  Dead Code Elimination: Code that cannot be reached (dead code) is removed from the program.</p><p>  

39、Register Variables: Automatic variables and function arguments are located in registers whenever possible. No data memory space is reserved for these variables.</p><p>  Parameter Passing Via Registers: A ma

40、ximum of three function arguments</p><p>  may be passed in registers.</p><p>  Global Common Subexpression Elimination: Identical subexpressions or address calculations that occur multiple time

41、s in a function are recognized and calculated only once whenever possible.</p><p>  Common Tail Merging: Common instruction blocks are merged together using jump instructions.</p><p>  Re-use Co

42、mmon Entry Code: Common instruction sequences are moved in front of a function to reduce code size.</p><p>  Common Block Subroutines: Multiple instruction sequences are packed into subroutines. Instructions

43、 are rearranged to maximize the block size.</p><p><b>  中文譯文</b></p><p><b>  Keil C 簡介</b></p><p>  Keil Software 的8051開發(fā)工具提供以下程序,你可以用它們來編譯你的C源碼,匯編你的匯編源程序,連接

44、和重定位你的目標文件和庫文件,創(chuàng)建HEX文件,調試你的目標程序。</p><p>  Windows應用程序uVision2是一個集成開發(fā)環(huán)境,它把項目管理,源代碼編輯,程序調試等集成到一個功能強大的環(huán)境中。</p><p>  C51美國標準優(yōu)化C交叉編譯器從你的C源代碼產生可重定位的目標文件。</p><p>  A51宏匯編器從你的8051匯編源代碼產生可重定

45、位的目標文件。</p><p>  BL51連接/重定位器組合你的由C51和A51產生的可重定位的目標文件,生成絕對目標文件。</p><p>  LIB51庫管理器組合你的目標文件,生成可以被連接器使用的庫文件。</p><p>  OH51目標文件到HEX格式的轉換器從絕對目標文件創(chuàng)建Intel HEX 格式的文件。</p><p>  

46、RTX-51實時操作系統(tǒng)簡化了復雜和對時間要求敏感的軟件項目。</p><p><b>  軟件開發(fā)流程</b></p><p>  當你使用Keil Software工具時,你的項目開發(fā)流程和其它軟件開發(fā)項目的流程極其相似。</p><p>  1. 創(chuàng)建一個項目,從器件庫中選擇目標器件,配置工具設置。</p><p>

47、;  2. 用C語言或匯編語言創(chuàng)建源程序。</p><p>  3. 用項目管理器實現(xiàn)你的應用。</p><p>  4. 修改源程序中的錯誤。</p><p>  5. 測試,連接應用。</p><p>  uVision2 IDE</p><p>  uVision2 集成開發(fā)環(huán)境集成了一個項目管理器,一個功能豐富

48、、有錯誤提示的編輯器,以及設置選項,生成工具,在線幫助。利用uVision2創(chuàng)建你的源代碼并把它們組織到一個能確定你的目標應用的項目中去。uVision2自動編譯,匯編,連接你的嵌入式應用,并為你的開發(fā)提供一個單一的焦點。</p><p>  C51編譯器和A51匯編器</p><p>  源代碼由uVision2 IDE創(chuàng)建,并被C51編譯或A51匯編。編譯器和匯編器從源代碼生成可重定位

49、的目標文件。Keil C51編譯器完全遵照ANSI C語言標準,支持C語言的所有標準特性。另外,直接支持8051結構的幾個特性被添加到里面。Keil A51宏匯編器支持8051及其派生系列的全部指令集。</p><p>  LIB51 庫管理器</p><p>  LIB51庫管理器允許你從由編譯器或匯編器生成的目標文件創(chuàng)建目標庫。庫是一種被特別地組織過并在以后可以被連接重用的對象模塊。當

50、連接器處理一個庫時,僅僅那些被使用的目標模塊才被真正使用。</p><p>  BL51 連接器/定位器</p><p>  BL51 連接器/定位器利用從庫中提取的目標模塊和由編譯器或匯編器生成的目標模塊創(chuàng)建一個絕對地址的目標模塊。一個絕對地址目標模塊或文件包含不可重定位的代碼和數(shù)據。所有的代碼和數(shù)據被安置在固定的存儲器單元中。此絕對地址目標文件可以用來:</p><

51、p>  寫入EPROM或其它存儲器件。</p><p>  由uVision2調試器使用來模擬和調試。</p><p>  由仿真器用來測試程序。</p><p>  uVision2 調試器</p><p>  uVision2源代碼級調試器是一個理想地快速,可靠的程序調試器。此調試器包含一個高速模擬器,能夠讓你模擬整個8051系統(tǒng),

52、包括片上外圍器件和外部硬件。當你從器件庫中選擇器件時,這個器件的特性將自動配置。</p><p>  uVision2調試器為你在實際目標板上測試你的程序提供了幾種方法:</p><p>  安裝MON51目標監(jiān)控器到你的目標系統(tǒng)并且通過Monitor-51接口下載你的程序。</p><p>  利用高級的GDI(AGDI)接口,把uVision2調試器綁定到你的目

53、標系統(tǒng)。</p><p>  Monitor-51</p><p>  uVision2調試器支持用Monitor-51進行目標板調試。此監(jiān)控程序駐留在你的目標板的 存儲器里,它利用串口和uVision2調試器進行通信。利用Monitor-51,uVision2調試器 可以對你的目標硬件實行源代碼級的調試。</p><p>  RTX51實時操作系統(tǒng)</p&g

54、t;<p>  RTX51實時操作系統(tǒng)是一個針對8051系列的多任務核。RTX51實時內核從本質上簡化了對實時事件反應速度要求高的復雜應用系統(tǒng)的設計,編程和調試。RTX51實時內核是完全集成到C51編譯器中的,從而方便使用。任務描述表和操作系統(tǒng)的連接由BL51連接器/定位器自動控制。</p><p>  C51優(yōu)化的C語言交叉編譯器</p><p>  Keil C51交叉編

55、譯器是一個基于ANSI C標準的針對8051系列MCU的C編譯器,生成的可執(zhí)行代碼快速、緊湊,在運行效率和速度上可以和匯編程序得到的代碼相媲美。 </p><p>  和匯編語言相比,用C語言這樣的高級語言有很多優(yōu)勢,比如:</p><p>  對處理器的指令集不必了解,8051 CPU的基本結構可以了解,但不是必須的。</p><p>  寄存器的分配以及各種變量

56、和數(shù)據的尋址都由編譯器完成。</p><p>  程序擁有了正式的結構(由C語言帶來的),并且能被分成多個單獨的子函數(shù)。這使整個應用系統(tǒng)的結構變得清晰,同時讓源代碼變得可重復使用。</p><p>  選擇特定的操作符來操作變量的能力提高了源代碼的可讀性。</p><p>  可以運用和人的思維很接近的詞匯和算法表達式。</p><p>  

57、編寫程序和調試程序的時間得到很大程度的縮短。</p><p>  C運行連接庫包含一些標準的子程序,如:格式化輸出,數(shù)字轉換,浮點運算。</p><p>  由于程序的模塊結構技術,使得現(xiàn)有的程序段可以很容易的包含到新的程序中去。</p><p>  ANSI 標準的C語言是一種豐常方便的,獲得廣泛應用的,在絕大部分系統(tǒng)中都能夠很容易得到的語言。</p>

58、<p>  因此,如果需要,現(xiàn)有的程序可以很快地移植到其他的處理器上,節(jié)省投資。</p><p><b>  代碼優(yōu)化 </b></p><p>  C51是一個杰出的優(yōu)化編譯器,它通過很多步驟以確保產生的代碼是最有效率的(最小和/或最快)。編譯器通過分析初步的代碼 產生最終的最有效率的代碼序列,以此來保證你的C語言程序占用最少空間的同時運行的快而有效。

59、</p><p>  C51編譯器提供9個優(yōu)化級別。每個高一級的優(yōu)化級別都包括比它低的所有優(yōu)化級別的優(yōu)化內容。以下列出的是目前C51編譯器提供的所有優(yōu)化級別的內容:</p><p>  常量折疊:在表達式及尋址過程中出現(xiàn)的常量被綜合為一個單個的常量。</p><p>  跳轉優(yōu)化:采用反轉跳轉或直接指向最終目的的跳轉,從而提升了程序的效率。</p>&

60、lt;p>  啞碼消除:永遠不可能執(zhí)行到的代碼將自動從程序中剔除。</p><p>  寄存器變量:只要可能,局部變量和函數(shù)參數(shù)被放在CPU寄存器中,不需要為這些變量再分配存儲器空間。</p><p>  通過寄存器傳遞參數(shù):最多三個參數(shù)通過寄存器傳遞。</p><p>  消除全局公用的子表達式:只要可能,程序中多次出現(xiàn)的相同的子表達式或地址計算表達式將只計

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論