Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
XC8 Command-line Driver
 2012 Microchip Technology Inc.
DS52053B-page 85
4.5.2
Diagnostic Files
Two valuable files produced by the compiler are the assembly list file, produced by the 
assembler, and the map file, produced by the linker.
The compiler options --ASMLIST (Section 4.8.16 “--ADDRQUAL: Set Compiler 
Response to Memory Qualifiers”
)
 generates a list file, and the -M option 
(Section 4.8.8 “-M: Generate Map File”) specifies generation of a map file.
The assembly list file contains the mapping between the original source code and the 
generated assembly code. It is useful for information such as how C source was 
encoded, or how assembly source may have been optimized. It is essential when con-
firming if compiler-produced code that accesses objects is atomic, and shows the 
psects in which all objects and code are placed. For an introductory guide to psects, 
see Section 5.15.1 “Program Sections”. And, see Section 6.5 “Assembly-Level 
Optimizations”
 fo
r more information on the contents of this file.
There is one list file produced for the entire C program, including C library files, and 
which will be assigned the project name and extension .lst. One additional list file is 
produced for each assembly source file compiled in the project.
The map file shows information relating to where objects were positioned in memory. It 
is useful for confirming if user-defined linker options were correctly processed, and for 
determining the exact placement of objects and functions. It also shows all the unused 
memory areas in a device and memory fragmentation. See Section 7.4 “Map Files” 
for complete information on the contents of this file.
There is one map file produced when you build a project, assuming the linker was exe-
cuted and ran to completion. The file will be assigned the project name and .map 
extension.