Re: nc2appsmoml not working

2007-12-26 Thread Wahid
hello Ms Cheong,
Thanks for the reply. opts example files were
very helpful. still, I need more information
regarding this file as there were more than just
-I switches in them. i also saw keywords like
include and some environment variables set(if
i'm not mistaken). is there any reference i can
read on what this file can contain(and what not)
?
i googled opts but didn't get much.
thank you 
wahid

--- Elaine Cheong [EMAIL PROTECTED]
wrote:

 In order for nc2moml to successfully compile
 any given .nc file, there
 must be an opts file in the same directory
 that specifies the
 correct include paths (using the -I flag), so
 that nc2moml can find
 any necessary dependencies (otherwise it uses
 the default paths that
 the nesC compiler uses).  If the opts file does
 not exist, or is not
 fully specified, then the .nc file will not
 compile succesfully.
 Unfortunately, many directories in contrib do
 not follow this standard
 (which is used in many parts of the main tos
 branch), so you will
 probably have to create these by hand.  The
 .tar.gz file that you
 unzip (with unzip-opts.sh) when setting up
 nc2moml contains some opts
 files that were created by hand by David Gay
 for the main branch.  You
 can use that as an example.  You can usually
 extract the correct paths
 from a makefile in the same directory, since
 this is the usual
 alternative way that people use to specify
 paths.
 
 I suggest that you read the following pages for
 more information:
 
 $PTII/ptolemy/domains/ptinyos/util/

$PTII/ptolemy/domains/ptinyos/util/nc2moml/index.htm

$PTII/ptolemy/domains/ptinyos/util/ncapp2moml/index.htm
 
 ncapp2moml is not the same as nc2moml. 
 ncapp2moml compiles whole
 TinyOS applications, rather than individual .nc
 files.  You'll have to
 look at the .java source code for these tools
 to understand how they
 work and/or read the .htm pages above.
 
 You can run both the nc2moml and ncapp2moml
 scripts with a -v option
 in order to get more detailed debugging output.
 
 Elaine
 
 On Dec 23, 2007 10:04 AM, Christopher Brooks
 [EMAIL PROTECTED] wrote:
  Hi Wahid,
  I have no hints for you.  I'm not that
 familiar
  with Viptos.  You would need to apply
 standard debugging
  techniques.  One thing to make sure is that
 you are
  using the version of PtinyOS underwhich
 Viptos was
  developed.
 
  _Christopher
  
 
  Hello Mr.Christopher,
  Thanks for the reply.
  yes it worked fine,
  now i'v gone further to convert a more
 serious
  applications.
  Among the projects in the contrib dir of
 TOS1, i
  picked vigilnet(from UVA)which has over
 15
  sub-directories full of .nc file, most of
 which
  could not be compiled successfully!!! in
 fact,i
  would be less confused if none of the
 project
  files were compiled :) is there anything
 in the
  files that nc2moml cannot compile?
  any sort of hints would be highly
 appreciated.
 
  thanks
 
  wahid
 
  --- Christopher Brooks
 [EMAIL PROTECTED]
  wrote:
 
   Hi Wahid,
  
   Errno 2 usually means File not found
  
   Does /usr/PTII/bin/.ncapp2moml-util
   exist and is it executable?
  
  
   I have:
  
   bash-3.00$ ls -l
 $PTII/bin/.ncapp2moml-util
   lrwxrwxrwx   1 cxh  labstaff  
 8 Dec 15
   02:42
 /home/eecs/cxh/ptII/bin/.ncapp2moml-util
   - ptinvoke
  
  
   If you don't have .ncapp2moml-util,
 then you
   will need to run
   configure and make.
  
   See the installation instructions.
  
   The short form is
 cd $PTII
 ./configure
 cd bin
 make
  
  
  
   To debug this, you could try running
 the
   command by hand.
  
   _Christopher
  
   
  
   Hi,
   I am trying to run apps/Blink in
   viptos.(the demo
   is already there in place but i
 wanna
   experience
   the conversion myself)
   So i run the following command:
  
   ./ncapp2moml apps/Blink
  
   I got an error as the result :
  
   system apps/Blink failed: 2 at
  
  
 

/usr/PTII/ptolemy/domains/ptinyos/util/ncapp2moml/ncapp2moml-main
   line 158
  
   I went to the above mentioned line
 in that
   file
   printed the value of
 $ncapp2momlcmd(in case
   you
   require for debugging):
  
   /usr/PTII/bin/.ncapp2moml-util
  
 /usr/PTII/vendors/ptinyos/tinyos-1.x
   /usr/PTII/vendors/ptinyos/momlapp
 .ncxml
   .opts
   /usr/PTII/vendors/ptinyos/momlapp
  
  
 

/usr/PTII/vendors/ptinyos/momlapp/.ncapp2moml-tempfile
  
  
 

/usr/PTII/ptolemy/domains/ptinyos/lib/MicaBoard.xml
   
  
  
 

/usr/PTII/vendors/ptinyos/momlapp/ncapp2moml-log.txt
   21
  
   I appreciate your help.
   wahid
  
 

Re: nc2appsmoml not working

2007-12-26 Thread Elaine Cheong
Hi, Wahid.  Sorry, there is no further information on the opts files. 
These files were hand-written by David Gay in order for him to do some 
internal unit testing on the nesC compiler.  They were not widely 
published, and I obtained them from him and included them in the Viptos 
release only so that more of the nesC files would compile automatically 
with nc2moml, without user intervention.


Basically, you should put whatever you need into opts that will allow you 
to compile nesC files separately from the rest of the application (and 
don't put it only in the makefile, even though you might be able to find 
the information you need in the pre-existing makefiles).  The necessary 
flags and environment variables are not Viptos-specific.  You should 
consult the nesC and TinyOS documentation for further information.  If you 
need help on understanding makefiles, the O'Reilly reference on make is a 
good one to read.  Another good reference is to read the man pages for gcc 
or avr-gcc, since some necessary flags may be gcc-specific.


Good luck,
Elaine

On Wed, 26 Dec 2007, Wahid wrote:


hello Ms Cheong,
Thanks for the reply. opts example files were
very helpful. still, I need more information
regarding this file as there were more than just
-I switches in them. i also saw keywords like
include and some environment variables set(if
i'm not mistaken). is there any reference i can
read on what this file can contain(and what not)
?
i googled opts but didn't get much.
thank you
wahid

--- Elaine Cheong [EMAIL PROTECTED]
wrote:


In order for nc2moml to successfully compile
any given .nc file, there
must be an opts file in the same directory
that specifies the
correct include paths (using the -I flag), so
that nc2moml can find
any necessary dependencies (otherwise it uses
the default paths that
the nesC compiler uses).  If the opts file does
not exist, or is not
fully specified, then the .nc file will not
compile succesfully.
Unfortunately, many directories in contrib do
not follow this standard
(which is used in many parts of the main tos
branch), so you will
probably have to create these by hand.  The
.tar.gz file that you
unzip (with unzip-opts.sh) when setting up
nc2moml contains some opts
files that were created by hand by David Gay
for the main branch.  You
can use that as an example.  You can usually
extract the correct paths
from a makefile in the same directory, since
this is the usual
alternative way that people use to specify
paths.

I suggest that you read the following pages for
more information:

$PTII/ptolemy/domains/ptinyos/util/


$PTII/ptolemy/domains/ptinyos/util/nc2moml/index.htm



$PTII/ptolemy/domains/ptinyos/util/ncapp2moml/index.htm


ncapp2moml is not the same as nc2moml.
ncapp2moml compiles whole
TinyOS applications, rather than individual .nc
files.  You'll have to
look at the .java source code for these tools
to understand how they
work and/or read the .htm pages above.

You can run both the nc2moml and ncapp2moml
scripts with a -v option
in order to get more detailed debugging output.

Elaine

On Dec 23, 2007 10:04 AM, Christopher Brooks
[EMAIL PROTECTED] wrote:

Hi Wahid,
I have no hints for you.  I'm not that

familiar

with Viptos.  You would need to apply

standard debugging

techniques.  One thing to make sure is that

you are

using the version of PtinyOS underwhich

Viptos was

developed.

_Christopher


Hello Mr.Christopher,
Thanks for the reply.
yes it worked fine,
now i'v gone further to convert a more

serious

applications.
Among the projects in the contrib dir of

TOS1, i

picked vigilnet(from UVA)which has over

15

sub-directories full of .nc file, most of

which

could not be compiled successfully!!! in

fact,i

would be less confused if none of the

project

files were compiled :) is there anything

in the

files that nc2moml cannot compile?
any sort of hints would be highly

appreciated.


thanks

wahid

--- Christopher Brooks

[EMAIL PROTECTED]

wrote:

Hi Wahid,
   
Errno 2 usually means File not found
   
Does /usr/PTII/bin/.ncapp2moml-util
exist and is it executable?
   
   
I have:
   
bash-3.00$ ls -l

$PTII/bin/.ncapp2moml-util

lrwxrwxrwx   1 cxh  labstaff

8 Dec 15

02:42

/home/eecs/cxh/ptII/bin/.ncapp2moml-util

- ptinvoke
   
   
If you don't have .ncapp2moml-util,

then you

will need to run
configure and make.
   
See the installation instructions.
   
The short form is
  cd $PTII
  ./configure
  cd bin
  make
   
   
   
To debug this, you could try running

the

command by hand.
   
_Christopher
   

   
Hi,
I am trying to run apps/Blink in
viptos.(the demo
is already there in place but i

wanna

experience
the conversion myself)
So i run the following command:
   
./ncapp2moml apps/Blink
   
I got an error as 

Re: nc2appsmoml not working

2007-12-24 Thread Elaine Cheong
In order for nc2moml to successfully compile any given .nc file, there
must be an opts file in the same directory that specifies the
correct include paths (using the -I flag), so that nc2moml can find
any necessary dependencies (otherwise it uses the default paths that
the nesC compiler uses).  If the opts file does not exist, or is not
fully specified, then the .nc file will not compile succesfully.
Unfortunately, many directories in contrib do not follow this standard
(which is used in many parts of the main tos branch), so you will
probably have to create these by hand.  The .tar.gz file that you
unzip (with unzip-opts.sh) when setting up nc2moml contains some opts
files that were created by hand by David Gay for the main branch.  You
can use that as an example.  You can usually extract the correct paths
from a makefile in the same directory, since this is the usual
alternative way that people use to specify paths.

I suggest that you read the following pages for more information:

$PTII/ptolemy/domains/ptinyos/util/
$PTII/ptolemy/domains/ptinyos/util/nc2moml/index.htm
$PTII/ptolemy/domains/ptinyos/util/ncapp2moml/index.htm

ncapp2moml is not the same as nc2moml.  ncapp2moml compiles whole
TinyOS applications, rather than individual .nc files.  You'll have to
look at the .java source code for these tools to understand how they
work and/or read the .htm pages above.

You can run both the nc2moml and ncapp2moml scripts with a -v option
in order to get more detailed debugging output.

Elaine

On Dec 23, 2007 10:04 AM, Christopher Brooks [EMAIL PROTECTED] wrote:
 Hi Wahid,
 I have no hints for you.  I'm not that familiar
 with Viptos.  You would need to apply standard debugging
 techniques.  One thing to make sure is that you are
 using the version of PtinyOS underwhich Viptos was
 developed.

 _Christopher
 

 Hello Mr.Christopher,
 Thanks for the reply.
 yes it worked fine,
 now i'v gone further to convert a more serious
 applications.
 Among the projects in the contrib dir of TOS1, i
 picked vigilnet(from UVA)which has over 15
 sub-directories full of .nc file, most of which
 could not be compiled successfully!!! in fact,i
 would be less confused if none of the project
 files were compiled :) is there anything in the
 files that nc2moml cannot compile?
 any sort of hints would be highly appreciated.

 thanks

 wahid

 --- Christopher Brooks [EMAIL PROTECTED]
 wrote:

  Hi Wahid,
 
  Errno 2 usually means File not found
 
  Does /usr/PTII/bin/.ncapp2moml-util
  exist and is it executable?
 
 
  I have:
 
  bash-3.00$ ls -l $PTII/bin/.ncapp2moml-util
  lrwxrwxrwx   1 cxh  labstaff   8 Dec 15
  02:42 /home/eecs/cxh/ptII/bin/.ncapp2moml-util
  - ptinvoke
 
 
  If you don't have .ncapp2moml-util, then you
  will need to run
  configure and make.
 
  See the installation instructions.
 
  The short form is
cd $PTII
./configure
cd bin
make
 
 
 
  To debug this, you could try running the
  command by hand.
 
  _Christopher
 
  
 
  Hi,
  I am trying to run apps/Blink in
  viptos.(the demo
  is already there in place but i wanna
  experience
  the conversion myself)
  So i run the following command:
 
  ./ncapp2moml apps/Blink
 
  I got an error as the result :
 
  system apps/Blink failed: 2 at
 
 
 /usr/PTII/ptolemy/domains/ptinyos/util/ncapp2moml/ncapp2moml-main
  line 158
 
  I went to the above mentioned line in that
  file
  printed the value of $ncapp2momlcmd(in case
  you
  require for debugging):
 
  /usr/PTII/bin/.ncapp2moml-util
  /usr/PTII/vendors/ptinyos/tinyos-1.x
  /usr/PTII/vendors/ptinyos/momlapp .ncxml
  .opts
  /usr/PTII/vendors/ptinyos/momlapp
 
 
 /usr/PTII/vendors/ptinyos/momlapp/.ncapp2moml-tempfile
 
 
 /usr/PTII/ptolemy/domains/ptinyos/lib/MicaBoard.xml
  
 
 
 /usr/PTII/vendors/ptinyos/momlapp/ncapp2moml-log.txt
  21
 
  I appreciate your help.
  wahid
 
  
 



   
 _
___
 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs
 




Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]