[Top][All Lists]

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

Re: [avr-gcc-list] Getting all 17bits of an objects address ?

From: E. Weddington
Subject: Re: [avr-gcc-list] Getting all 17bits of an objects address ?
Date: Tue, 26 Nov 2002 10:28:06 -0700

On 26 Nov 2002 at 8:01, Roland Zitzke wrote:

> Sent: Monday, November 25, 2002 6:21 PM
> Subject: [avr-gcc-list] Getting all 17bits of an objects address ?
> getting the full 17bits
> > of a array defined in program memory ?
> I have exactly the same problem.
> It would be handy to have a macro to store a 17 bit full pointer into
> a long variable and another macro PRG_RDB_EX which takes such a
> pointer and returns the FLASH byte at that position. This would allow
> users of atmega103 and 128 to use more than 64k as data memory. This
> macro would need to use the ELPM instruction and use more cyles and
> therefore this should only be an option - not the general case.
> /Roland

I have a solution to half of the problem. I have a macro that will 
read a byte anywhere in the Flash in an ATmega128, i.e. 17 bits and 
uses the ELPM instruction. But you have to know the byte's address 

This doesn't solve the issue of taking the address of an object and 
getting 17-bits.

avr-gcc-list at http://avr1.org

reply via email to

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