[Tinyos-help] How to learn nesc complier?

2011-01-06 Thread 邱杰凡
Hi
  Recently, I wanted to learn nesc complier, but I did't know how.Could
you give me some suggestions. I have read the nesC lagnguage reference
manual,  do you have some more deeply stuff. Additionally, in the
reference manual(section 14), it refer the ncc and nescc man page, what
is it, and how to get it?
Thanks beforehand.




___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] How to learn nesc complier?

2011-01-06 Thread 徐瑞涛
To read the manpage, just type
man ncc
man nescc
under your *nix terminal. (Of course, you have installed tinyos in your
computer)

It appears that you haven't install tinyos under *nix. I put the html
version's manpages in attachment.


2011/1/6 邱杰凡 qiujie...@ict.ac.cn

 Hi
  Recently, I wanted to learn nesc complier, but I did't know how.Could
 you give me some suggestions. I have read the nesC lagnguage reference
 manual,  do you have some more deeply stuff. Additionally, in the
 reference manual(section 14), it refer the ncc and nescc man page, what
 is it, and how to get it?
 Thanks beforehand.




 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
Be Your Personal Best!
Title: Manpage of ncc
Content-type: text/html


ncc
Section: User Commands  (1)Updated: April 27, 2004Index
Return to Main Contents



NAME

ncc - nesC compiler for TinyOS

SYNOPSIS


ncc [-target=pc|mica|mica2|mica2dot|...] [-tossim]
[-board=micasb|basicsb|micawb|...]
[-tosdir=dir][-tosscheduler=...][-nostdinc]
[--version][-print-tosdir][-print-platforms][-print-target]
[anynesccoption][anygccoption]files...

DESCRIPTION


ncc is an extension to nescc that knows how to compile nesC
applications for a TinyOS environment. If invoked on regular C files, it
behaves like gcc. When invoked on a nesC component or
interface (.nc extension) file it compiles and links (except if the
usual -c, -S, -E or -fsyntax-only options are used)
that component with the other files specified on the command line.

ncc just invokes nescc with extra options based on the 
selected platform and sensorboard(s). And nescc itself just
invokes gcc. Thus, for a full understanding of possible ncc
options you should read the nescc and gcc man pages.

OPTIONS


ncc accepts all gcc and nescc options, and some additional 
TinyOS specific options:

-target=X 
Specify the target architecture for this compilation. If -tossim is
also specified, the compilation uses the tossim environment and produces a
locally executable file. The default target is specified in the
.default-platform file in your TinyOS directory (see -tosdir
option), and defaults to mica if that file is absent. A platform that 
is not in the TinyOS distribution can be used
if its directory is specified with an explicit -I directive (the platform
name is taken from the directory's name, platform directories are
recognised by the presence of a .platform file).
-tosdir=dir 
Specify the location of TinyOS. This location can also be specified with
the TOSDIR environment variable. If the variable and the option are both
given, ncc uses the value specified with the option. If neither the
environment variable or option are specified, ncc uses its compiled-in
TinyOS directory.
-tosscheduler=component,unique-string,interface-name,interface-definition,run-event,post-command 
By  default,  nesC  compiles uses of task void taskname() ... to void 
taskname(), 
and post taskname() to TOS_post(taskname).

With this option, each task gets  its  own  interface-definition interface, 
the task implementation is transformed into a run-event event and posts becomes a 
call to the post-command  command.  This per-task interface is automatically 
connected to the parameterised interface-name interface of scheduler 
component component.  The parameter id for the connection is chosen with 
unique(unique-string).

If this option is not set explicity, its parameters are assigned by default as follows:

-tosscheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask
-tossim
Compile for the TOSSIM environment rather than a native platform. Every
directory in the search path will be duplicated, with the first copy having
/sim appended to it.
-print-tosdir
Print the TinyOS directory to be used and exit, taking into account the
-tosdir option and TOSDIR environment variable. No compilation
occurs when -print-tosdir is used.
-print-platforms
Print the valid TinyOS platforms, including those made available by
explicit -I directives (see -target option).
-print-target
Print the name of the selected target. Most useful when -target is not
specified.
-nostdinc
Do not automatically include the TinyOS directories in the search path. See
the discussion of search paths below for more details.
-board=Y
Specify one (or more) sensor boards. This effects the search path and
preprocessor symbols. The set of boards is set by the TinyOS distribution
(see the tos/sensorboards directory). As with targets, a sensorboard
directory can be made available via an explicit -I directive
(sensorboard directories are recognised by the presence of a .sensor
file).
--version
Print the version of ncc, nescc and of the gcc compiler
used for the selected target.


EXAMPLES


If you wish to compile a component Bar.nc to a C file, you can do:


ncc -c -o /dev/null -fnesc-cfile=Bar.c Bar.nc


SEARCH 

[Tinyos-help] Suggestion for the python's script in TOSSIM

2011-01-06 Thread Edel A. Rodriguez Sanchez
Hi! 

I'm making a application that sends and receives messages, but I can't see 
these messages because of some problem in TOSSIM. 
What might be happening? 
I need a suggestion for the python's script in TOSSIM. 

Thanks. :) 


Edel Angel Rodríguez Sánchez 
Facultad de Informática 
Universidad de Granma. Cuba 



Universidad de Granma. Bayamo, M.N. Cuba

Participe en el III Congreso Cubano de Desarrollo Local
9 al 11 de marzo de 2011
http://www.udg.co.cu/congreso

Tiempo: http://www.udg.co.cu/mrtg/weather/weather.html
Imagenes desde el satelite: 
http://www.udg.co.cu/mrtg/weather/map/today-Bayamo-CUXX0001.jpg

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] rpm command does not work

2011-01-06 Thread ismail hancı
 hi all;
i am trying to install tinyos2 for 2-3weeks.
there are lots of problems may be because of win7.
most important problem cygwin.
rpm command doesn't work. so installing  breaks down.
can anybody help me?

-- 
İSMAİL HANCI
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] TOSSIM compilation error for Mac OS 10.6.6

2011-01-06 Thread Xiaohui Liu
Hi everyone,

I recently upgraded from Mac 10.5.8 to 10.6.6. Previously, everything works
fine. After the upgrade, I can not compile against tossim anymore. It gives
me the following errors:

Macintosh:RadioCountToLeds xiaohui$ make micaz sim
mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling RadioCountToLedsAppC to object file sim.o
ncc -c -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\)   -Wall -Wshadow -Wnesc-all
-target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb
-DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=10
-DIDENT_APPNAME=\RadioCountToLed\ -DIDENT_USERNAME=\xiaohui\
-DIDENT_HOSTNAME=\Macintosh.local\ -DIDENT_USERHASH=0x6c3d1ffeL
-DIDENT_TIMESTAMP=0x4d2644d4L -DIDENT_UIDHASH=0x5fe40e79L
-Wno-nesc-data-race RadioCountToLedsAppC.nc   -fnesc-dump=components
-fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs
-fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
In file included from /usr/include/string.h:148,
 from /Users/xiaohui/tinyos-2.x/tos/lib/tossim/tos.h:49:
/usr/include/secure/_string.h: In function `__inline_memcpy_chk':
/usr/include/secure/_string.h:58: warning: return makes pointer from integer
without a cast
/usr/include/secure/_string.h: In function `__inline_memmove_chk':
/usr/include/secure/_string.h:69: warning: return makes pointer from integer
without a cast
/usr/include/secure/_string.h: In function `__inline_memset_chk':
/usr/include/secure/_string.h:80: warning: return makes pointer from integer
without a cast
/usr/include/secure/_string.h: In function `__inline_strcpy_chk':
/usr/include/secure/_string.h:91: warning: return makes pointer from integer
without a cast
/usr/include/secure/_string.h: In function `__inline_stpcpy_chk':
/usr/include/secure/_string.h:103: warning: return makes pointer from
integer without a cast
/usr/include/secure/_string.h: In function `__inline_strncpy_chk':
/usr/include/secure/_string.h:116: warning: return makes pointer from
integer without a cast
/usr/include/secure/_string.h: In function `__inline_strcat_chk':
/usr/include/secure/_string.h:127: warning: return makes pointer from
integer without a cast
/usr/include/secure/_string.h: In function `__inline_strncat_chk':
/usr/include/secure/_string.h:139: warning: return makes pointer from
integer without a cast
In file included from /Users/xiaohui/tinyos-2.x/tos/lib/tossim/tos.h:50:
/usr/include/stdlib.h: At top level:
/usr/include/stdlib.h:272: syntax error before `^'
/usr/include/stdlib.h:272: `type name' declared as function returning a
function
/usr/include/stdlib.h:274: syntax error before `^'
/usr/include/stdlib.h:274: `type name' declared as function returning a
function
/usr/include/stdlib.h:301: syntax error before `^'
/usr/include/stdlib.h:301: `type name' declared as function returning a
function
/usr/include/stdlib.h:307: syntax error before `^'
/usr/include/stdlib.h:307: `type name' declared as function returning a
function
/usr/include/stdlib.h:313: syntax error before `^'
/usr/include/stdlib.h:313: `type name' declared as function returning a
function
/usr/include/stdlib.h:319: syntax error before `^'
/usr/include/stdlib.h:319: `type name' declared as function returning a
function
In file included from /Users/xiaohui/tinyos-2.x/tos/lib/tossim/tos.h:93:
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c: In function
`fillInOutput':
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:81: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:89: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:93: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:119: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:123: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c: In function
`sim_log_add_channel':
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:172: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:180: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:191: warning:
pointer/integer type mismatch in conditional expression
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c: In function
`sim_log_remove_channel':
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/sim_log.c:217: warning:
pointer/integer type mismatch in conditional expression
In file included from /Users/xiaohui/tinyos-2.x/tos/lib/tossim/tos.h:94:
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/heap.c: In function `expand_heap':
/Users/xiaohui/tinyos-2.x/tos/lib/tossim/heap.c:125: warning:

[Tinyos-help] Asking you about implement of RPL, i did not see it

2011-01-06 Thread ngocthanhdinh
Dear TinyOS-member,

 

I heard Mr.Stephen told that RPL is implemented in tinyos in folder
blip/rpl.

But I find it in cvs source of tinyos in google group and sourceforge , but
I did not see it.

Could you let me know where can I find it?

 

Thank you very much,

 

  Ngoc Thanh

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Asking you about implement of RPL, i did not see it

2011-01-06 Thread Omprakash Gnawali
On Thu, Jan 6, 2011 at 5:31 PM,  ngocthanhd...@dcn.ssu.ac.kr wrote:
 Dear TinyOS-member,



 I heard Mr.Stephen told that RPL is implemented in tinyos in folder
 blip/rpl.

 But I find it in cvs source of tinyos in google group and sourceforge , but
 I did not see it.

 Could you let me know where can I find it?

lib/net/rpl.

on google code.

- om_p
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] prob in compiling tossim

2011-01-06 Thread raji rajeswari
Hello to all

Im getting following error when compiling tossim for Blink
application.Please  guide me to solve this problem.

Setting up for TinyOS 2.1.0

r...@raji-laptop:~$ cd /opt/tinyos-2.1.0/apps/Blink

r...@raji-laptop:/opt/tinyos-2.1.0/apps/Blink$ make micaz sim

mkdir -p simbuild/micaz

placing object files in simbuild/micaz

writing XML schema to app.xml

compiling BlinkAppC to object file sim.o

ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\) -Wall -Wshadow -Wnesc-all -target=micaz
-fnesc-cfile=simbuild/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22
--param max-inline-insns-single=10 -DIDENT_APPNAME=\BlinkAppC\
-DIDENT_USERNAME=\raji\ -DIDENT_HOSTNAME=\raji-laptop\
-DIDENT_USERHASH=0x54cd89d6L -DIDENT_TIMESTAMP=0x4d260874L
-DIDENT_UIDHASH=0x532af343L -Wno-nesc-data-race BlinkAppC.nc
-fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants
-fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags
-fnesc-dumpfile=app.xml

compiling Python support and C libraries into pytossim.o, tossim.o, and
c-support.o

g++ -c -shared -fPIC -o simbuild/micaz/pytossim.o -g -O0
-DIDENT_APPNAME=\BlinkAppC\ -DIDENT_USERNAME=\raji\
-DIDENT_HOSTNAME=\raji-laptop\ -DIDENT_USERHASH=0x54cd89d6L
-DIDENT_TIMESTAMP=0x4d260874L -DIDENT_UIDHASH=0x532af343L
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx -I/usr/include/python2.5
-I/opt/tinyos-2.1.0/tos/lib/tossim -DHAVE_CONFIG_H

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:26:20: error: Python.h: No
such file or directory

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:296: error: ISO C++ forbids
declaration of ‘PyObject’ with no type

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:296: error: expected ‘;’
before ‘*’ token

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:297: error: ‘PyObject’ has
not been declared

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:302: error: ‘PyObject_HEAD’
does not name a type

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:306: error: expected
initializer before ‘*’ token

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:313: error: ‘FILE’ has not
been declared

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘int
swig_varlink_print(swig_varlinkobject*, int*, int)’:

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:316: error: ‘fprintf’ was
not declared in this scope

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:317: error: ‘struct
swig_varlinkobject’ has no member named ‘vars’

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: At global scope:

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:325: error: expected
initializer before ‘*’ token

/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:3496: error: expected ‘}’
at end of input

make: *** [sim-exe] Error 1

r...@raji-laptop:/opt/tinyos-2.1.0/apps/Blink$
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Asking you about implement of RPL, i did not see it

2011-01-06 Thread Eric Decker
searching for stuff is easy.

Trying to find RPL can easily be done with...

find . -iname *rpl*(from the top level tinyos tree)


zot (53): pd ~/mm/t2_cur/tinyos-2.x/
~/mm/t2_cur/tinyos-2.x ~/mm/osian/osian/tinyos/apps/examples/OIP/UdpEcho
~/mm/osian/osian
zot (54): find . -iname *rpl*
./apps/tests/TestRPL
./apps/tests/TestRPL/TestRPL.h
./apps/tests/TestRPL/TestRPLC.nc
./apps/tests/TestRPL/TestRPLAppC.nc
./tos/lib/net/rpl
./tos/lib/net/rpl/RPLForwardingEngineP.nc
./tos/lib/net/rpl/RPLRank.nc
./tos/lib/net/rpl/RPLRankP.nc
./tos/lib/net/rpl/RPLDAORoutingEngineP.nc~
./tos/lib/net/rpl/RPLDAORoutingEngine.nc
./tos/lib/net/rpl/RPL.h
./tos/lib/net/rpl/RPLForwardingSend.nc
./tos/lib/net/rpl/RPLRoutingEngineC.nc
./tos/lib/net/rpl/RPLRoutingEngine.nc
./tos/lib/net/rpl/RPLDAORoutingEngineP.nc
./tos/lib/net/rpl/RPLDAORoutingEngineC.nc
./tos/lib/net/rpl/RPLRankC.nc
./tos/lib/net/rpl/RPLForwardingEngine.nc
./tos/lib/net/rpl/RPLForwardingEngineC.nc
./tos/lib/net/rpl/RPLRoutingEngineP.nc
./tos/platforms/mulle/chips/m16c62p/M16c62pUartCounterPlatformC.nc


On Thu, Jan 6, 2011 at 5:58 PM, Omprakash Gnawali
gnaw...@cs.stanford.eduwrote:

 On Thu, Jan 6, 2011 at 5:31 PM,  ngocthanhd...@dcn.ssu.ac.kr wrote:
  Dear TinyOS-member,
 
 
 
  I heard Mr.Stephen told that RPL is implemented in tinyos in folder
  blip/rpl.
 
  But I find it in cvs source of tinyos in google group and sourceforge ,
 but
  I did not see it.
 
  Could you let me know where can I find it?

 lib/net/rpl.

 on google code.

 - om_p
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




-- 
Eric B. Decker
Senior (over 50 :-) Researcher
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help