avr-chat
[Top][All Lists]
Advanced

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

[avr-chat] far addresses


From: Bob von Knobloch
Subject: [avr-chat] far addresses
Date: Fri, 25 Aug 2017 11:02:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

Hi,
I'm rewriting a project I originally had running on a ATMega 644.
Now I need more space, so an ATMega 1284 is my choice.
I need to have a very large amount of constant data in flash (more than fits 
under the 64k address range).
My problem is that I must get the address of some constants in high (above 
0x10000) memory and here the 'address of' a char[] does not return the right 
value.

Example:
I have string constant 'mystring' at address  0x11808 (can see it in the .map 
and .lst files). Using 'print_func(mystring);', which should print this 
address, albeit truncated to 16bits, returns '0x1e57'. I cannot see a 
connection here.
Anyone tried to do similar things?

Regards,

Bob von Knobloch
--
The Sun is out, the sky is blue, it's time to drive the MR2.



reply via email to

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