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

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

[avr-gcc-list] Does anybody have a variant of memcpy that uses ELPM?


From: Dave Hylands
Subject: [avr-gcc-list] Does anybody have a variant of memcpy that uses ELPM?
Date: Wed, 18 Jan 2006 15:06:00 -0800

Hi,

I'm using the avr-gcc from WinAVR.

Before I go off and reinvent the wheel, I figured I'd ask if anybody
has a variant of memcpy which uses the ELPM instruction (as I
understand it, memcpy_P uses LPM which doesn't work for me).

I'd also like to find a way of getting the long address of a symbol
located in "high" flash (i.e. above the 64K mark - on an ATMega128).

Doing:

    uint32_t addr = (uint32_t)&flashVar;

seems to give a sign-extended version of the lower 15 bits of the
address. This works for the upper and lower 32K on the ATMega128, but
not for stuff in the middle.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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