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

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

RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)


From: Eric Weddington
Subject: RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
Date: Tue, 06 Mar 2007 22:12:54 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Dmitry K.
> Sent: Tuesday, March 06, 2007 9:12 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)
> 
> On Wednesday 07 March 2007 13:18, Eric Weddington wrote:
> [...]
> > Going back to your original code, see the resulting attached files:
> > bug.lst - The assembler listing after compiling and assembling
> > bug.dis - The disassembled output from avr-objdump -d bug.o
> >
> > These files are generated with avr-gcc 4.1.1 and using -Os.
> >
> > I still don't see a bug where it goes into an infinite 
> loop. To me it looks
> > like that it will eventually break out of the outer loop.
> >
> > Eric
> 
> Yes, I do not see an error in yours code.
> But there is a bit of differences:
>   - main() is started with pushing r16,17,28,29 into stack
>   - stack pointer is not loaded to SP ports, it is modifyed
> All of this is absent in my disassembler result.
> 
> Are you use non-pure avr-gcc 4.1.1 ?

I'm using the avr-gcc with the mega256x patch that also changes main() to a
normal function IIRC.

Eric





reply via email to

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