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.

HTH,
Michiel

-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Jos� Moyano
Sent: Tue 4/15/2008 10:13 PM
To: [email protected]
Subject: [Tinyos-help] Store data in a specific program memory place
 
My question is: Can I store a constant in a specific program memory address? I 
can declare a constant resident on program memory as "static const prog_uchar", 
but I need to specify the memory address. I'm using TinyOS 1.1 and AT90CAN128 
mmcu (ATMega128 compatible).

Thanks in advance.



      Yahoo! Encuentros.

Ahora encontrar pareja es mucho m�s f�cil, prob� el nuevo Yahoo! 
Encuentros http://yahoo.cupidovirtual.com/servlet/NewRegistration

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

Reply via email to