Le Wednesday 16 April 2008 09:48:18 Michiel Konstapel, vous avez écrit :
> You can, with some help from the linker (avr-ld). First, you tell the
> compiler to put the constant in a special linker section: static const
> prog_uchar <name> __attribute__ ((section (".mysection")));
>
> Then, tell the linker to place that section at the desired address. It's
> definitely possible (I've used the technique on our ATmega128 mote a couple
> years ago), but I can't remember the details, so you'll have figure that
> out yourself. http://sourceware.org/binutils/docs/ld/index.html might be a
> good starting point.

avr-libc has a good documentation too :
http://www.nongnu.org/avr-libc/user-manual/pgmspace.html
http://www.nongnu.org/avr-libc/user-manual/mem_sections.html
probably adding to the address where to locate your section like :
-Wl,--section-start=.mysection=0x2000
would store it into the desired place...
the alternative is to create your own liker script (possibly modifying the 
avr5.x script from binutils ) 

cheers 
Aurélien

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to