Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Does anybody have a variant of memcpy that uses ELPM?

Does anybody have a variant of memcpy that uses ELPM?

2006-01-18 by Dave Hylands

Hi,

I'm looking for 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.

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/

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.