Keil 是 ARM 推出(收購(gòu))的針對(duì) Cortex-M 系列等低功耗芯片芯片的集成開(kāi)發(fā)環(huán)境的品牌名稱(chēng)。目前 Keil 的最新版本為 μVision5。舊版本的 Keil 目前使用的已經(jīng)非常少了,當(dāng)前使用主要以 μVision4 和 μVision5 這兩個(gè)版本為主。??在使用 Keil 時(shí),Keil 構(gòu)建項(xiàng)目時(shí)會(huì)產(chǎn)生很多擴(kuò)展名的文件,了解各文件的作用對(duì)于深入研究編譯有很大幫助(主要是各種編譯輸出文件)。例如,.map文件
就是個(gè)非常有必要在項(xiàng)目開(kāi)發(fā)階段實(shí)時(shí)查看,并且深入研究的文檔。同樣,其他文件將是深入研究時(shí)有效的參考。??隨著 Keil 的升級(jí),各種文件在不同版本可能有區(qū)別。部分文件在高版本中已經(jīng)棄用,或者被新的文件代替。具體見(jiàn)下文的說(shuō)明。適用范圍包括 Keil 全部產(chǎn)品:MDK-ARM、C51、C166、C251。
嚴(yán)格來(lái)說(shuō),以下部分文件不應(yīng)該算是 Keil 的文件,因?yàn)樗麄兪怯删幾g器產(chǎn)生的,而 Keil 就是個(gè) IDE,ARM 公司除了提供了各種方便的 IDE 之外,還提供獨(dú)立版的編譯套件,可以方便的在命令行中使用。
Project Files
項(xiàng)目文件主要是通過(guò) Keil 創(chuàng)建項(xiàng)目(工程)時(shí)生成的各種文件,這些文件記錄項(xiàng)目(工程)的各種信息。在使用 Keil 打開(kāi)項(xiàng)目時(shí),Keil 會(huì)使用這些文件。
-
.OPT:
Keil 早期版本使用的項(xiàng)目配置選項(xiàng)文件,已經(jīng)被新的文件替代(具體見(jiàn)下面的說(shuō)明)。 -
.
UVGUI[.user-name]:
μVision4 窗口布局文件。即:使用者在調(diào)整了Keil 中各窗口布局后,再次打開(kāi) Keil 會(huì)保持之前的修改,修改就是記錄在該文件中。 -
.UVGUIX[.user-name]:
μVision5 窗口布局文件,XML格式,記錄了 MDK 軟件的 GUI 布局,如代碼編輯區(qū)窗口的大小、編譯輸出提示窗口的位置等等。 -
.UVMPW:
用于多個(gè)項(xiàng)目的 μVision4 項(xiàng)目文件(工作空間項(xiàng)目文件)。包含對(duì)其他項(xiàng)目文件的引用,并將它們綁定到一個(gè)項(xiàng)目中。當(dāng)多個(gè)項(xiàng)目分組到一個(gè)項(xiàng)目中時(shí),該文件是必需的。具有 XML 結(jié)構(gòu),可以在工作組中共享。 -
.UVPROJ:
Keil μVision4 的項(xiàng)目文件,它使用了 XML 格式記錄了工程的結(jié)構(gòu),雙擊它可以打開(kāi)整個(gè)工程。 -
.UVPROJX:
Keil μVision5 的項(xiàng)目文件,它使用了 XML 格式記錄了工程的結(jié)構(gòu),就是我們平時(shí)雙擊打開(kāi)的工程文件,它記錄了整個(gè)工程的結(jié)構(gòu),如芯片類(lèi)型、工程包含了哪些源文件等內(nèi)容。 -
.UVOPT:
Keil μVision4 項(xiàng)目配置文件,XML 格式,包括調(diào)試配置、跟蹤信息配置、斷點(diǎn)等。 -
.UVOPTX:
Keil μVision5 項(xiàng)目配置文件,記錄了工程的配置選項(xiàng),如下載器的類(lèi)型、變量跟蹤配置、斷點(diǎn)位置以及當(dāng)前已打開(kāi)的文件等等。 -
.UV2:
μVision3 項(xiàng)目文件。使用更高版本的 μVision 打開(kāi)文件,將文件轉(zhuǎn)換為新的項(xiàng)目類(lèi)型。
具體見(jiàn)下圖:
Source Files
源碼文件應(yīng)該沒(méi)啥可說(shuō)的。表示了Keil 所支持的源碼文件類(lèi)型(支持代碼高亮、錯(cuò)誤提示等)。
-
.A51:
匯編源碼文件 -
.A66:
匯編源碼文件 -
.C:
C 語(yǔ)言源碼文件 -
.CPP:
C++ 語(yǔ)言源碼文件 -
.H:
C/C++ 語(yǔ)言的頭文件 -
.INC:
匯編語(yǔ)言的頭文件(使用"$include"來(lái)包含) -
.S:
Assembler source file (typical used for ARM source files).
Listing Files
這部分主要是一些由編譯器和連接器輸出的中間文件,對(duì)于研究編譯過(guò)程非常有幫助。
-
.COD:
Complete program listing file. Includes mixed C and Assembly code. All references are resolved and addresses are fixed-up. -
.HTM:
鏈接器的列表文件。 -
.I:
C Preprocessor Output File. 預(yù)處理后的文件 -
.LST:
Listing file generated by the C Compiler or Assembler. C及匯編編譯器產(chǎn)生的列表文件。 -
.MAP:
Listing file (or Map file) generated by the Linker. 這個(gè)文件還是非常有用的。我們查看編譯信息利器。 -
.M51:
Listing file (or Map file) generated by the Linker. -
.M66:
Listing file (or Map file) generated by the Linker. -
.SCR:
Linker scatter loader file. Generated by the Linker. Can be altered manually.鏈接器產(chǎn)生的分散加載文件。通常會(huì)使用手動(dòng)指定的.sct
文件.
Keil 中可以通過(guò)如下配置,來(lái)輸出其中的某些文件用戶在選擇了這些條目之后,其實(shí)就是在命令行工具中增加對(duì)應(yīng)的參數(shù)。例如連接器參數(shù)
Object and HEX Files
這部分主要是編譯器輸出(連接器輸出)的各種編譯后的文件,包括可執(zhí)行文件、庫(kù)文件、對(duì)象文件等。
-
.(no extension):
Absolute Object File (executable programs generated by the Linker). -
.AXF:
Absolute and executable object file generated by the Linker. (連接器產(chǎn)生)可執(zhí)行文件(ELF文件格式),該格式文件包含大量調(diào)試信息。 -
.Bxx:
Absolute object file generated by OC51 for individual code banks (xx may be from 00 to 31). -
.D:
Dependency file generated by the ARMCC or GCC compiler.描述了對(duì)應(yīng).o的依賴(lài)的文件 -
.CRF:
Cross-Reference file containing browse information (definitions, references for identifiers). 交叉引用文件,它主要包含了瀏覽信息(browse information),即源代碼中的宏定義、變量及函數(shù)的定義和聲明的位置。,可由上圖中的Listing標(biāo)簽配置產(chǎn)生。??我們?cè)诖a編輯器中右鍵菜單"Go To Definition Of ‘xxxx’"的時(shí)候,,MDK就是通過(guò)*.crf
文件查找出跳轉(zhuǎn)位置的。該文件使用了特定的格式,具體如下 -
.ELF:
ELF/DWARF files generated by the Linker/Locater. -
.HEX:
Intel Hex file, generated by the Object-Hex Conversion Utility. 在單片機(jī)中常用,MDK中很少用。 -
.H86:
Intel Hex file, generated by the Object-Hex Conversion Utility. -
.LIB:
Library object file. (靜態(tài))連接庫(kù)文件。 -
.OBJ:
Relocatable object file. -
.O:
Relocatable object files.編譯器輸出的各種重定位文件,供連接器使用產(chǎn)生可執(zhí)行文件。 -
.SBR:
Source Browser Information file generated by the Linker/Locater.
關(guān)于該部分的.ELF
、.AXF
、.HEX
、文件,詳細(xì)可見(jiàn)博文 ELF文件、鏡像(Image)文件、可執(zhí)行文件、對(duì)象文件 詳解。
Build Files
-
.BAT:
batch file that re-creates a project from the command prompt. μVision may create a batch file when Project - Output - Create Batch File is enabled. 構(gòu)建項(xiàng)目的批處理文件。在 Keil 中可以選擇產(chǎn)生這個(gè)文件,主要是在命令行中使用。 -
._IA, *.__I, *._II, *.SCR:
tool invocation files.
Debugger Files
調(diào)試文件沒(méi)啥可說(shuō)的。
-
.INI:
Source code file used typically for initializing the debugger. 這個(gè)文件在使用在線調(diào)試和Trace時(shí)經(jīng)常用到。可以通過(guò) Keil 的如下界面使用常用的功能如下:
// 在線調(diào)試時(shí)使用 LOAD %L INCREMENTAL // 在使用Keil的Trace功能時(shí)使用 ///*------------------------------------------------------------------- //** Define the function to enable the trace port //**-----------------------------------------------------------------*/ //FUNC void EnableTPIU(void) { // _WDWORD(0xE0042004, 0x000000E0); // Set 4-pin tracing via DBGMCU_CR //} ///*------------------------------------------------------------------- //** Invoke the function at debugger startup //**-----------------------------------------------------------------*/ //EnableTPIU(); 12345678910111213141516
-
.dbgconf:
Pack options (available for some devices) define default configuration settings for debugging, tracing, or Flash programming and are applied to the options in the dialogs Debug, Trace, and Flash Download. Possibly, not all options have been set. Hence, verify the settings and adapt the configuration when needed.關(guān)于這部分,詳細(xì)參見(jiàn) Keil 官網(wǎng)文章http://www.keil.com/support/man/docs/ulinkpro/ulinkpro_ctx_pack.htm。
Other Files
在部分文件有的是編譯器輸出,有的是Keil輸出的。
-
.BUILD_LOG.HTM:
Build Log file of the latest project build. -
.CDB:
μVision Device Database file. -
.DEP:
Dependency file for a target build. 整個(gè)工程的依賴(lài)文件 -
.IC:
Intermediate C source file created by the EC++ Compiler. -
.LIN:
Linker control file. -
.LNP:
Linker Input file generated by μVision to be passed to the command line. -
.ORC:
Global Register Coloring file for optimization. -
.PACK:
Software Pack file. Zip-file containing the software and one *.PDSC description file. Mechanism file to distribute device support, Software Components, APIs, and example projects. 存在于 Keil-MDK 5 中 -
.PDSC:
Pack Description file. Describes the content of a Software Pack and dependencies to devices, processors, tool chains, or other software components. -
.PLG:
Protocol file that summarizes the last build process. -
PROJECT_GUI.XSD:
XML schema file describing the *.UVGUI file structure. Located in the UV4 folder. -
PROJECT_MPW.XSD:
XML schema file describing the *.UVMPW file structure. Located in the UV4 folder. -
PROJECT_OPT.XSD:
XML schema file describing the *.UVOPT file structure. Located in the UV4 folder. -
PROJECT_PROJ.XSD:
XML schema file describing the *.UVPROJ file structure. Located in the UV4 folder. -
.SCT:
Linker control file (scatter loading). 分散加載文件,這個(gè)文件非常有用,也非常值得研究研究。下面是個(gè)相對(duì)來(lái)說(shuō)復(fù)雜點(diǎn)的分散加載文件:
LR_IROM1 0x08003000 0x00005000 { ; load region size_region ER_IROM1 0x08003000 0x00005000 { ; load address = execution address *.o (RESET, +First) ; 中斷向量表 } ER_IROM2 + 0 { ; 應(yīng)用程序信息 *.o (SECTION_APP_INFO, +First) } ER_IROM3 + 0 { ; 初始化相關(guān)代碼+其他代碼 *(InRoot$$Sections) ; 初始化相關(guān) .ANY (+RO) ; 其他所有代碼 } RW_IRAM1 0x20000000 0x00001800 { ; 內(nèi)存 *.o (SECTION_APP_VECTOR, +First) /* APP的中斷向量表 */ .ANY (+RW +ZI) } } 12345678910111213141516171819
-
.SCVD:
XML schema file for the Component Viewer (System Component Viewer Description file). The file is provided by the vendor or can be build by the user. -
.UVL:
Signal definition file. Saves the signals that have been defined in the Logic Analyzer. -
.UVLA:
File to store signals that have been recorded with the Logic Analyzer. -
.UVTSK:
Event Viewer file. Saves the recorded task-switching events. -
.SFD:
Intermediary pseudo-XML file used to create an .SFR file (.SVD.XML files are used as input). -
.SFR:
Binary file that stores information which is read by the System Viewer. -
.SVD.XML, *.SVD, *.XML:
CMSIS-XML file formats describing the device (CMSIS System View Description file). The file is provided by the vendor. -
.XSD:
XML schema description file.
審核編輯 :李倩
-
芯片
+關(guān)注
關(guān)注
456文章
51273瀏覽量
427761 -
XML
+關(guān)注
關(guān)注
0文章
188瀏覽量
33150 -
keil
+關(guān)注
關(guān)注
69文章
1214瀏覽量
167361
原文標(biāo)題:Keil 項(xiàng)目/生成的各種文件類(lèi)型(.AXF、.D、.crf、.exf)說(shuō)明
文章出處:【微信號(hào):技術(shù)讓夢(mèng)想更偉大,微信公眾號(hào):技術(shù)讓夢(mèng)想更偉大】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
使用stm32cubeMX無(wú)法生成mdk工程文件?
labview程序生成exe文件怎么還原
labview怎么生成可執(zhí)行文件
Efinity編譯生成文件使用指導(dǎo)-v1
![Efinity編譯<b class='flag-5'>生成文件</b>使用指導(dǎo)-v1](https://file1.elecfans.com/web2/M00/02/51/wKgZoma6-4iAHnXuAABuYLRstYU823.jpg)
評(píng)論