[Tinyos-help] RAM and ROM variables

Aurélien Francillon aurelien.francillon at inrialpes.fr
Tue Nov 20 04:58:11 PST 2007


Le Tuesday 20 November 2007 12:01:39 Michiel Konstapel, vous avez écrit :
> That depends on your compiler :-)
>
> For avr-gcc, there are special types defined that are put in ROM, like
> const_uint8_t, const_uint16_t, etc. You can access them as regular
> variables (though you can't assign to them, of course). For example,
> 	const_uint8_t settings[4] = { 1, 2, 3, 4 };
> puts an array of 4 bytes into ROM.
>
Hi, 
The avr-libc has a good document about this:
http://www.nongnu.org/avr-libc/user-manual/pgmspace.html
It provides another way to do this.
However, I don't know how does this compares to Michiel's proposal...

cheers
Aurélien



More information about the Tinyos-help mailing list