avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] avr-libc 1.0.2 strncpy_P using lpm instead of elpm on


From: E. Weddington
Subject: Re: [avr-libc-dev] avr-libc 1.0.2 strncpy_P using lpm instead of elpm on mega 128
Date: Thu, 15 Jan 2004 14:01:59 -0700

On 16 Jan 2004 at 9:07, Simon Eatough wrote:

> Hi Eric
>  I'm using avr-libc 1.0.2
 

Would you be willing to fill out a new bug tracker for this? That way it 
doesn't fall through the cracks.

<http://savannah.nongnu.org/bugs/?group=avr-libc&func=additem>

Thanks
Eric


> 
> On Fri, 16 Jan 2004 05:47, you wrote:
> > On 15 Jan 2004 at 13:54, Simon Eatough wrote:
> > > Hi
> > > I've noticed a problem with strncpy_P where the wrong version of lpm is
> > > used. /snip
> > >   1e646:  fb 01           movw    r30, r22
> > >    1e648: dc 01           movw    r26, r24
> > >
> > > 0001e64a <.strncpy_P_loop>:
> > >    1e64a: 41 50           subi    r20, 0x01       ; 1
> > >    1e64c: 50 40           sbci    r21, 0x00       ; 0
> > >    1e64e: 48 f0           brcs    .+18            ; 0x1e662
> > >    1e650: 05 90           lpm     r0, Z+                          <<<< 
> > > should be elpm r0, Z+ on mega
> > > 128 ? 1e652:      0d 92           st      X+, r0 1e654:   00 20           
> > > and     r0, r0
> > > 1e656:    c9 f7 brne      .-14            ; 0x1e64a 1e658:        01 c0   
> > >         rjmp    .+2             ;
> > > 0x1e65c
> > >
> > > It looks like macros.inc is expecting __AVR_ENHANCED__ to be defined
> > > somwhere.
> > >
> > > i'm using avr-gcc v3.3.2, wonder  if this a a fault with my installation.
> >
> > That's the compiler version. strncpy_P comes from avr-libc library; what
> > version of avr-libc are you using?
> >
> > Eric
> 
> 






reply via email to

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