Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Mixed source/assembly list file from NIOS compiler?

Altera_Forum
Honored Contributor II
2,444 Views

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 Speth
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,361 Views

google "gcc lst file"

0 Kudos
Altera_Forum
Honored Contributor II
1,361 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
1,361 Views

Try -Wa,-ahlms=aaa.lst

0 Kudos
Altera_Forum
Honored Contributor II
1,361 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
1,361 Views

 

--- 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
0 Kudos
Reply