3.5.10 How Do I Know What Code the Compiler Is Producing?
The assembly list file may be set up, using assembler listing file options, to contain a great deal of information about the code, such as the assembly output for almost the entire program, including library routines linked in to your program, section information, symbol listings, and more.
The list file may be produced as follows:
- On the command line, create a basic list file using the
option:
-Wa, -a=projectname.lst. - For MPLAB X IDE, right click on your project and select Properties. In the Project Properties window, click on xc32-as under Categories. From Option categories, select Listing file options and ensure List to file is checked.
-
For projects containing multiple source files, add the following command to the MPLAB X Post-Build Step or run it on the command line.
xc32-objdump -SD code.elf > code.lst
By default, the assembly list file will have a .lst
extension.
For information on the list file and utility applications, see the MPLAB® XC32 Assembler, Linker and Utilities User’s Guide (DS50002186).
