Hi Eric,
Basically, after we type something like "make telosb safe", the
safe-related process works as:
(1) execute support/make/safe.extra, and set MAKE_DEPUTY_FLAG to 1
(2) execute support/make/msp430.rules, where deputy-related stuff is set
up if MAKE_DEPUTY_FLAG is 1. NCC_SAFE_TINYOS_FLAGS makes key role there.
NCC_SAFE_TINYOS_FLAGS = -DSAFE_TINYOS -I$(TOSDIR)/lib/safe
-fnesc-deputy -fnesc-deputy-args='-I$(TOSDIR)/lib/safe/include
--FLIDs=build/$(PLATFORM)/flids.txt --envmachine -DSAFE_TINYOS --nolib '
It tells ncc we are going to compile safe code by defining SAFE_TINYOS,
, includes related header files, and pass some arguements to make
deputy happy.
-fnesc-deputy tells nesc-compile to include deputy_stage1 and
deputy_stage2, otherwise nesc-compile will use deputy_nodeputy, as shown
in your verbose output.
Then we can invoke ncc by the command below.
$(NCC) -o $(MAIN_EXE) $(NCC_SAFE_TINYOS_FLAGS) $(OPTFLAGS) $(PFLAGS)
$(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS) $(LDFLAGS)
ifdef WIRING_CHECK_FILE
Or you can send me your platform make rules. Then I can see what's the
problem there. Thank you.
- Yang
Eric Decker wrote:
> I using standard make rules.
>
> If I make from $TOSROOT/apps/Blink , make verbose telosb safe things
> work fine.
>
> But if I build from within my new platform tree, then the build doesn't
> pull in the
> right deputy stuff.
>
> Is there a way to see what is getting pulled in. That is I'd like to
> see what path
> is being used to pull in msp.rules.
>
> eric
>
>
> On Tue, Sep 23, 2008 at 12:20 PM, <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Hi Eric,
>
> I am not sure which makerules you are using. For telosb, is it the
> standard msp/msp.rules? If not, you could check msp.rules, which has
> the following lines invoking safe tinyOS:
>
> ifdef MAKE_DEPUTY_FLAG
> NCC_SAFE_TINYOS_FLAGS = -DSAFE_TINYOS -I$(TOSDIR)/lib/safe
> -fnesc-deputy -fnesc-deputy-args='-I$(TOSDIR)/lib/safe/include
> --FLIDs=build/$(PLATFORM)/flids.txt --envmachine -DSAFE_TINYOS --nolib '
> else
> NCC_SAFE_TINYOS_FLAGS =
> endif
>
> $(NCC) -o $(MAIN_EXE) $(NCC_SAFE_TINYOS_FLAGS) $(OPTFLAGS)
> $(PFLAGS) $(CFLAGS) $(WIRING_CHECK_FLAGS) $(COMPONENT).nc $(LIBS)
> $(LDFLAGS)
>
> - Yang
>
> Quoting Eric Decker <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
>
> > Hi,
> >
> > I have a custom platform that is similar to the telosb and would
> like to
> > start using
> > safe TinyOS/Deputy. When I do a build normally I type "make
> debugopt mm3
> > threads"
> > and it builds fine. I try to build safe using
> >
> > "make debugopt mm3 threads safe"
> >
> > and it does the same thing as the former. I've
> > looked at what is getting included and there isn't any change.
> >
> > When I've built other applications for the telosb using safe I
> notice that
> > "/usr/lib/ncc/deputy_stage1.h"
> > gets pulled in. While when I try to build my stuff it is always
> using
> > "/usr/lib/ncc/deputy_nodeputy.h"
> > even if I have "safe" included on the command line.
> >
> > I notice that the nesc1 command line is: (seen via verbose)
> >
> > This is from a "make verbose mm3 threads safe"
> >
> > Note in particular the "-fnesc-include=deputy_nodeputy"
> >
> > nesc1 -fnesc-include=deputy_nodeputy -_fnesc-gcc=msp430-gcc
> > -_fnesc-include=nesc_nx -_fnesc-include=tos
> > -_fnesc-scheduler=TinyTaskSchedulerC,TinyTaskSched\
> > ulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask -_Wnesc-all
> > -_fnesc-target=msp430 -_fnesc-no-debug -mdisable-hwmul
> -mmcu=msp430x1611
> > -DPLATFORM_MM3 -\
> > DBOARD_ -DTEST_GPS -DENABLE_ERASE -DFAKE_SURFACE -DTRACE
> > -DDEFINED_TOS_AM_GROUP=0x22 -DTHREADS -DIDENT_APPNAME="mm3AppC"
> > -DIDENT_USERNAME="cire" -DIDENT_H\
> > OSTNAME="zot" -DIDENT_USERHASH=0x11dce1bdL
> -DIDENT_TIMESTAMP=0x48d935d7L
> > -DIDENT_UIDHASH=0x822daf31L -DNESC=130 -I/usr/lib/ncc
> > -I/home/cire/mm_t2/t2_mm3/t\
> > os/platforms/mm3 -I/home/cire/mm_t2/t2_mm3/tos/system
> > -I/home/cire/mm_t2/t2_mm3/tos/interfaces
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/lib/tosthreads/chi\
> > ps/msp430
> -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/lib/tosthreads/system
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/lib/tosthreads/interfaces
> > -I/home/cire/m\
> > m_t2/t2_cur/tinyos-2.x/tos/lib/tosthreads/types
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/sensorboards/
> > -I/home/cire/mm_t2/t2_mm3/tos/platforms/mm3 -I/home\
> > /cire/mm_t2/t2_mm3/tos/platforms/mm3/misc
> > -I/home/cire/mm_t2/t2_mm3/tos/platforms/mm3/sensors
> > -I/home/cire/mm_t2/t2_mm3/tos/platforms/mm3/../../chips/msp4\
> > 30/timer
> >
> -I/home/cire/mm_t2/t2_mm3/tos/platforms/mm3/../../../support/utils/include
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/chips/cc2420
> -I/home/cire/mm_\
> > t2/t2_cur/tinyos-2.x/tos/chips/msp430
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/chips/msp430/pins
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/chips/msp430/tim\
> > er -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/chips/msp430/usart
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/chips/msp430/dma
> > -I/home/cire/mm_t2/t2_cur/tinyos-\
> > 2.x/tos/lib/timer -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/lib/serial
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/lib/power
> > -I/home/cire/mm_t2/t2_cur/tinyos-\
> > 2.x/tos/interfaces -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/types
> > -I/home/cire/mm_t2/t2_cur/tinyos-2.x/tos/system -Wall -Wshadow -v
> mm3AppC.nc
> > -o build/mm\
> > 3/app.c
> >
> >
> > Could some one help me figure out what needs to tweaked?
> >
> > eric
> >
> > --
> > Eric B. Decker
> > Senior (over 50 :-) Researcher
> > Autonomous Systems Lab
> > Jack Baskin School of Engineering
> > UCSC
> >
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> <mailto:[email protected]>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
> Autonomous Systems Lab
> Jack Baskin School of Engineering
> UCSC
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help