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

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

RE: [avr-gcc-list] Howto put constants on fixed address


From: Stu Bell
Subject: RE: [avr-gcc-list] Howto put constants on fixed address
Date: Thu, 20 Dec 2007 08:08:57 -0700

> Yes, that will place the .length segment between .vectors and .progmem. But 
> you
> are unable to place it to some exact address. That will place it to address 
> that is
> offset_of(.vectors)+length_of(.vectors). That can be different for some cpus.

So what?  You are able to reference the location directly by the variable name 
in the code. Even so, it will always be placed immediately after the interrupt 
vectors, so you always know where it is for a particular CPU.  Since you will 
need to recompile the code for any new CPU (trust me), your argument is a 
non-issue.

BTW, offset_of(.vectors) is 0 for all AVRs. 

For example, for my ATmega2560, I know that the variable is *always* at 0xE4.


Best regards, 

Stu Bell 
DataPlay (DPHI, Inc.) 




reply via email to

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