Hi,
How can I invoke "#define TOS_LOCAL_ADDRESS" when  TOS_LOCAL_ADDRESS is itself 
a uint_16 variable in tos.h ? still, i added that to Blink.nc(for example) that 
and didn't get a good answer .
As with the second solution, I added the following line into the makefile:
PFLAGS := $(PFLAGS) -DTOS_LOCAL_ADDRESS
which obviously conflicted again.
can you help me please?
 wahid

--- On Mon, 10/5/09, Guillermo De Cesco <[email protected]> wrote:

From: Guillermo De Cesco <[email protected]>
Subject: Re: [Tinyos-help] How to combine base and non base codes
To: "Wahid" <[email protected]>
Date: Monday, October 5, 2009, 7:52 PM

Hi,
 
You cant use macros with a variable that is defined after compilation, unless 
you define explicity 
#define TOS_LOCAL_ADDRESS 
 
in source code or when compiling
-DTOS_LOCAL_ADDRESS=xx
as an extra argument
 
-Bill
 
On 10/5/09, Wahid <[email protected]> wrote:




Hi
I am using tos1 and I'd like to use the same code image on base and non-base 
nodes with slightly different functionality.
So I'm trying to use "#define BASE " whenever TOS_LOCAL_ADDRESS=0 :


#if (TOS_LOCAL_ADDRESS!=0)
           #undef BASE
 #else
           #define BASE
 #endif
when i try to simulate(make pc) the application, all nodes define BASE 
irrespective of their TOS_LOCAL_ADDRESS.


How can i solve this issue?

thank you in advance
wahid






_______________________________________________
Tinyos-help mailing list
[email protected]

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
Ing. Guillermo De Cesco
Invenio Ingenieria srl.
tel: (54)2944 442119
web: www.invenioing.com
Av. Pioneros 4163 Dpto 6. CP(R8402AMH)

San Carlos de Bariloche.
Rio Negro, Argentina. 



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

Reply via email to