Forum Discussion
Altera_Forum
Honored Contributor
16 years agoMixed source/assembly list file from NIOS compiler?
Hi-
Does anyone know the compiler command line option to produce a mixed C source/assembly list file? I'd like to compare the asm output for various NIOS custom HDL usages (memory mapped vs. custom instructions) and having the mixed output list file would help greatly. Thanks, John Speth5 Replies
- Altera_Forum
Honored Contributor
google "gcc lst file"
- Altera_Forum
Honored Contributor
The option you are looking for is "-S" for the nios2-elf-objdump utility.
$ nios2-elf-objdump.exe Usage: nios2-elf-objdump <option(s)> <file(s)> Display information from object <file(s)>. At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -h, --headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -e, --debugging-tags Display debug information using ctags style -G, --stabs Display (in raw form) any STABS info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this information - Altera_Forum
Honored Contributor
Try -Wa,-ahlms=aaa.lst
- Altera_Forum
Honored Contributor
Thanks everyone for the clues and help (except for the not-so-helpful response). As with everything GCC, the answer is never in the most obvious place.
Here's how to get what I want: Go to the IDE menu Window / Preferences / NIOS II dialog. Make sure "Generate objdump file" is checked. The mixed C/ASM file for the **entire** project can be found in the "<project>\Debug" directory under the file name "<project>.elf.objdump". FWIW, I zeroed in on this solution because similar forum responses are searched and displayed at the bottom of thread page as each new response comes in. It's quite a nice feature! Even tangential responses seem to help. Thanks again, John Speth. - Altera_Forum
Honored Contributor
--- Quote Start --- As with everything GCC, the answer is never in the most obvious place. --- Quote End --- It's not at all a GCC thing, but rather a Nios II IDE thing. Cheers, --slacker