[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 09:47:54 -0700 |
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