So TOS_NODE_ID is actually declared as a "uint16_t" and gets changed
via a call to 'tos-set-symbols' .  This happens everytime you run
somthing like 'make telosb install.25'

If you actually call  'make telosb install.25' you can see the output
below being printed just before the image is burned to the node

tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump
--target ihex build/telosb/main.ihex build/telosb/main.ihex.out-25
TOS_NODE_ID=25 ActiveMessageAddressC$addr=25

In this example, two variables get set TOS_NODE_ID and
ActiveMessageAddressC$addr.
You can call this directly to set constants you want in your program.

Now if you don't need to actually allocate space for your constant,
and can rely on a simple #define for preprocessor replacement of all
instances of your constant, then you can do something similar to what
'jpaek' suggests.



On 10/24/07, SANG Junjun <[EMAIL PROTECTED]> wrote:
> Is it possible to set some value at the install time? just like TOS_NODE_ID
>
> for example, when we install a program, we type "make platform install,1
> ..."
> then  TOS_NODE_ID is set 1.
>
> --
> Best Regards,
> SANG JUNJUN
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


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

Reply via email to