[Tinyos-help] program memory v data memory

Vlasios Tsiatsis tsiatsis at ee.ucla.edu
Mon Mar 28 14:53:43 PST 2005


Take a look ato tinyos-1.x/tos/platform/mica2/CC1000Const.h to see exactly
how constants on the flash memory are declared in the context of TinyOS
code. Search for "CC1K_LPL_PreambleLength".


I hope this helps,
vlassis

On Mon, 28 Mar 2005, Neil Hancock wrote:

>
> Hi
>
> I'm having a bit of an issue with the separated data and program space of
> the ATmega128.
> The issues is how to get constants/tables and const strings in program
> memory and not in data memory.
>
> Having 128K flash, and 4K ram in an ATMega128 does mean that the ANSI 'C'
> concept of consts in data memory is a tiny bit of a problem.
>
> 'C' doesn't overload to figure out what it should do between a const program
> memory and data memory, I'm trying to use some of the concepts/hacks from
> AVR-Lib, which uses macros.
>   *( http://savannah.nongnu.org/download/avr-libc/ )->
> (avr-libc-1.2.3.tar.gz)-> pgmspace.h
>
> nesC isn't very happy with (const char PROG_MEM *) but only warns and
> doesn't reject it. However compiling with "make pc" does cause it to break
> the simulator which isn't very useful.
>
> Anybody coming up with an easier solution in nesC for the ATmega128.
>
>   thanks
>
>      Neil
>
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-help
>
>


More information about the Tinyos-help mailing list