avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Flags to use in Building a Library


From: Erik Christiansen
Subject: Re: [avr-gcc-list] Flags to use in Building a Library
Date: Wed, 27 Jul 2005 12:47:51 +1000
User-agent: Mutt/1.5.6+20040722i

On Tue, Jul 26, 2005 at 12:20:57PM -0700, User Tomdean wrote:
> Looking at the output of avr-objdump -x echo.elf, all appears OK.
> But, when I try it, something is screwed, most likely with the stack.
> There is a jump back to the middle of code.  Strange.  

OK, then avr-objdump -S echo.elf should show the extraneous jump or
push-pop error in the disassembled executable. Going straight to
serial_send(i) may lead to tripping over it immediately.

> I put serial_send(x), where x is 'a', 'b',...'r, statements after
> every line in the source code.  I see 'a',...'i',a',...,'i'

> This does not work.  If I use '-g' it works.

As a gcc option?

> Any ideas?

Yep. When it doesn't work, take a squizz at the assembly code, 'cos
that's what the cpu runs. ;-)

Diffing objdumps, with and without -g, may be more than slightly
instructional.

Regards,
Erik

-- 
 _,-_|\    Erik Christiansen                    Phone: +61 3 9264 3416
/      \   Research & Development Division        Fax: +61 3 9264 3438
\_,-.__/   Voice Products Department
      v    NEC Business Solutions Pty. Ltd.     www.necbs.com.au




reply via email to

[Prev in Thread] Current Thread [Next in Thread]