Reply by Grant Edwards March 24, 20092009-03-24
On 2009-03-24, przemek klosowski <przemek.klosowski@gmail.nospam> wrote:
> On Sun, 22 Mar 2009 22:43:40 -0500, Grant Edwards wrote: > >> 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 > > -Wa,-ahl=filename.lst, actually, because you're passing the switches -ahl
Doh! You're right. I actually tested the command and yet somehow mangage to bungle cutting/pasting it into the posting. -- Grant
Reply by przemek klosowski March 24, 20092009-03-24
On Sun, 22 Mar 2009 22:43:40 -0500, Grant Edwards wrote:
 
> 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
-Wa,-ahl=filename.lst, actually, because you're passing the switches -ahl -- Przemek Klosowski, Ph.D. <przemek.klosowski at gmail>
Reply by Grant Edwards March 23, 20092009-03-23
On 2009-03-23, rvarshney <ruchi20386@gmail.com> wrote:

> I was hoping to know if there is a way to intermix source code > with the output of "avr-gcc -S"
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
Reply by rvarshney March 22, 20092009-03-22
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!