AVR-GCC options

Mar 23, 2009 3 Replies

Hello, I was hoping to know if there is a way to intermix source code with the output of "avr-gcc -S" I know that it is possible to do so with "avr-objdump -S", but I was wondering if there is a way to get the same functionality with "avr-gcc



-S"



Thanks!


No.

However, if your real question is how to get a mixed C/assembly language listing when compiling a file, you can use the -Wa to pass the listing option to the assembler:

-Wa,ahl=filename.lst

I think you'll also need to add the "-g" option:

gcc -c -g -Wa,ahl=filename.lst -o filename.o filename.c

Grant

-Wa,-ahl=filename.lst, actually, because you're passing the switches -ahl

Przemek Klosowski, Ph.D.

Doh! You're right. I actually tested the command and yet somehow mangage to bungle cutting/pasting it into the posting.

Grant

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required