Board index » TinyOS » TinyOS Programming

 


Post new topic Reply to topic
Author Message
 Post subject: Compile problem
PostPosted: 03 Feb 2013, 20:51
  


Joined: 02 Feb 2013, 10:29
Posts: 11
I'm a new beginer for tinyos and i bought some MAXFOR cm5000msp (similar with Telosb) motes.As i undermentioned i had a problem in a simple helloworld application,in terminal.If you can help about this i'll be so pleased.Thank you from now.i look forward to your reply.


HelloworldAppc.nc

Code:
configuration helloworldAppc
{
   //Do nothing
}
implementation
{
   components MainC;
   components LedsC;
   
   components helloworldc as App;
   //Wiring
   AppBoot -> MainC;
   AppLeds -> LedsC;
}




helloworldc.nc

Code:
module helloworldc
{
   uses interface Boot;
   uses interface Leds;
}
implementation
{
   void TurnOnLed()
{
   call Leds.led0On()
}

   event void Boot.booted()
   {
      TurnOnLed()
   }
}



Makefile
Code:
COMPONENT=helloworldAppc
include $(MAKERULES)


Terminal
Code:
Reference  Device           Description
---------- ---------------- ---------------------------------------------
FTVW8IUQ   /dev/ttyUSB0     FTDI MTM-CM5000MSP
baturalp@baturalp:~$ motelist
No devices found.
baturalp@baturalp:~$ motelist
Reference  Device           Description
---------- ---------------- ---------------------------------------------
FTVW8IUQ   /dev/ttyUSB0     FTDI MTM-CM5000MSP
baturalp@baturalp:~$ sudo chmod 666 /dev/ttyUSB0
[sudo] password for baturalp:
baturalp@baturalp:~$ cd workspace
baturalp@baturalp:~/workspace$ ls
BL1  Blip  helloWorld
baturalp@baturalp:~/workspace$ cd hel*
baturalp@baturalp:~/workspace/helloWorld$ ls
src  TinyOS_Plugin_Makefile
baturalp@baturalp:~/workspace/helloWorld$ ls
src  TinyOS_Plugin_Makefile
baturalp@baturalp:~/workspace/helloWorld$ cd src
baturalp@baturalp:~/workspace/helloWorld/src$ ls
helloworldAppc.nc  helloworldc.nc  Makefile
*************************THE PROBLEM IS HERE.................................(can it be related to MAXFOR model name?,etc)
baturalp@baturalp:~/workspace/helloWorld/src$ make telosb
make: *** No rule to make target `telosb'.  Stop.


          Top  
 
 Post subject: Re: problem
PostPosted: 03 Feb 2013, 21:14
  

User avatar
Site Admin

Joined: 25 Jun 2010, 21:23
Posts: 97
Location: Netherlands
It looks like a tinyos installation problem. execute the command below in terminal to check if your tinyos installation is ok:

Code:
tos-check-env


Alternatively go to the tinyos folder and then to the apps folder (the folder that contains sample projects) and try compiling them for telosb or micaz and see if you have same error there.

Also in your code you seem to be forgetting a few semicolons, in the helloworldc.nc file. correct them as well.

_________________
Image


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 07:49
  


Joined: 02 Feb 2013, 10:29
Posts: 11
I wrote that command,i'm sending terminal reply.can it be related to problem?And if it is how can i fix it?Please tolerate me because of my verdancy.
Code:
Setting up for TinyOS 2.1.2
baturalp@baturalp:~$ tos-check-env
Path:
   /opt/msp430-46/bin
   /opt/msp430/bin
   /usr/lib/lightdm/lightdm
   /usr/local/sbin
   /usr/local/bin
   /usr/sbin
   /usr/bin
   /sbin
   /bin
   /usr/games
   /usr/local/games

Classpath:
   /opt/tinyos-2.1.2/support/sdk/java/tinyos.jar
   .
   /opt/tinyos-2.1.2/support/sdk/java



rpms:


nesc:
   /usr/bin/nescc
   Version: nescc: 1.3.4


perl:
   /usr/bin/perl
   Version: v5.14.2) built for x86_64-linux-gnu-thread-multi

flex:

bison:

java:
   /usr/bin/java

--> WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5

graphviz:
   /usr/bin/dot
   dot - graphviz version 2.26.3 (20100126.1600)

--> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.


tos-check-env completed with errors:

--> WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5
--> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you'd like to use the nescdoc documentation generator.

baturalp@baturalp:~$


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 13:31
  

User avatar
Site Admin

Joined: 25 Jun 2010, 21:23
Posts: 97
Location: Netherlands
Ok first check if entering the command below will get you to the TinyOS folder
Code:
cd $TOSROOT


If not, do manually:
Code:
cd /opt/tinyos-2.1.2
cd apps
LS


now you see a list of example projects, go inside any of the exaples and try compiling them. for example:
Code:
cd BaseStation
make
make telosb


If you had the same error you had, try doing the STEP 3 of the guide again. then repeat the commands above again. If it didnt work again, I guess your tinyos installation is broken so reinstall a clean Ubuntu 12.04 and follow the installation guide very carefully again.

Hope it helps.

_________________
Image


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 14:46
  


Joined: 02 Feb 2013, 10:29
Posts: 11
There is another error below,when i did it-during make command,until that command it seems to be no error.Please continue to help in this subject
Code:
Setting up for TinyOS 2.1.2
baturalp@baturalp:~$ cd $TOSROOT
baturalp@baturalp:/opt/tinyos-2.1.2$ cd /opt/tinyos-2.1.2
baturalp@baturalp:/opt/tinyos-2.1.2$ cd apps
baturalp@baturalp:/opt/tinyos-2.1.2/apps$ ls
AntiTheft        Makefile                 Oscilloscope      Sense       UDPEcho
BaseStation      MultihopOscilloscope     Powerup           TCPEcho
BaseStation15.4  MultihopOscilloscopeLqi  PppRouter         tests
Blink            MViz                     RadioCountToLeds  tosthreads
CoapBlip         Null                     RadioSenseToLeds  tutorials
baturalp@baturalp:/opt/tinyos-2.1.2/apps$ cd BaseStation
baturalp@baturalp:/opt/tinyos-2.1.2/apps/BaseStation$ make
/opt/tinyos-2.1.2/support/make/Makerules:180: ***

Usage:  make <target> <extras>
        make <target> help

        Valid targets: all clean epic eyesIFX eyesIFXv1 eyesIFXv2 intelmote2 iris mica2 mica2dot micaz mulle null sam3s_ek sam3u_ek shimmer shimmer2 shimmer2r span telos telosa telosb tinynode tmote ucmini z1
        Valid extras: appdoc blip cc2420x cc2420x_32khz coap cthreads docs dynthreads ident_flags nowiring rst safe savepp sim sim-fast sim-sf stack-check tframe threads tos_buildinfo tos_image tosboot tunit verbose wiring

 Welcome to the TinyOS make system!

 You must specify one of the valid targets and possibly some combination of
 the extra options.  Many targets have custom extras and extended help, so be
 sure to try "make <target> help" to learn of all the available features.

 Global extras:

   docs    : compile additional nescdoc documentation
   tinysec : compile with TinySec secure communication

ERROR, " ident_flags tos_image tosboot" does not specify a valid target.  Stop.
baturalp@baturalp:/opt/tinyos-2.1.2/apps/BaseStation$


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 15:04
  

User avatar
Site Admin

Joined: 25 Jun 2010, 21:23
Posts: 97
Location: Netherlands
While in base station folder, type:
Code:
make telosb

And reply back with output you got.

_________________
Image


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 15:11
  


Joined: 02 Feb 2013, 10:29
Posts: 11
Code:
ERROR, " ident_flags tos_image tosboot" does not specify a valid target.  Stop.
baturalp@baturalp:/opt/tinyos-2.1.2/apps/BaseStation$ make telosb
mkdir -p build/telosb
    compiling BaseStationC to a telosb binary
ncc -o build/telosb/main.exe  -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DCC2420_NO_ACKNOWLEDGEMENTS -DCC2420_NO_ADDRESS_RECOGNITION -DTASKLET_IS_TASK -DIDENT_APPNAME=\"BaseStationC\" -DIDENT_USERNAME=\"baturalp\" -DIDENT_HOSTNAME=\"baturalp\" -DIDENT_USERHASH=0xcaff1e2cL -DIDENT_TIMESTAMP=0x510fc159L -DIDENT_UIDHASH=0x381cb038L  BaseStationC.nc -lm
/opt/tinyos-2.1.2/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning "*** LOW POWER COMMUNICATIONS DISABLED ***"
    compiled BaseStationC to build/telosb/main.exe
           14438 bytes in ROM
            1818 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
    writing TOS image
baturalp@baturalp:/opt/tinyos-2.1.2/apps/BaseStation$


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 16:16
  

User avatar
Site Admin

Joined: 25 Jun 2010, 21:23
Posts: 97
Location: Netherlands
Well that shows the BaseStation has successfuly compiled for TelosB. Now go back to the program you wrote using the third tutrorial, and try compile again, but frist fix those semicolon problems. See if it works this time

_________________
Image


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 16:17
  

User avatar
Site Admin

Joined: 25 Jun 2010, 21:23
Posts: 97
Location: Netherlands
and in your Makefile, use capital H in the frist line, it should match the file name exactly and its case sensitive!

Code:
COMPONENT=HelloworldAppc
include $(MAKERULES)

_________________
Image


          Top  
 
 Post subject: Re: problem
PostPosted: 04 Feb 2013, 16:55
  


Joined: 02 Feb 2013, 10:29
Posts: 11
Thank you Saeid,it's over for red light :)


          Top  
 
 
Post new topic Reply to topic



Who is online

Users browsing this forum: No registered users and 0 guests


Display posts from previous:  Sort by  
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group