Installation of TinyOS in Ubuntu

TinyOS is becoming the defacto standard OS for sensor network platforms and Ubuntu is most popular distro in Linux flavours. The follwing steps helps to install the TinyOS environment and compile and run the programs.

After everything is done, download this skelton code and verify the installation

UPDATED FOR TINYOS 2.1.1
Assumptions

Distribution is Ubuntu Hardy Heron

TinyOS version is TinyOS 2.1.0/ 2.1.1

Username is "test"

If this is not, update information is given at each step with your version

Installation

  1. Go to System -> Administration-> Synaptic Package Manager ( from the Top Panel )
  2. In Synaptic Package Manager go to settings ->repositories.
  3. Take 3rd party Software . Click on Add and copy the following. Assuming that your distribution is Hardy.
                deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main
    or for a different distribution of Ubuntu
    (deb http://tinyos.stanford.edu/tinyos/dists/ubuntu * main)
  4. Click OK and then reload repositories
  5. After reload is done, Search for TinyOS and set install and apply changes.
  6. Once the installation is finished, set the shell environment. Take a shell and type
    gedit ~/.bashrc and add follwing lines at bottom
     source /opt/tinyos-2.1.0/tinyos.sh   
    OR
       source /opt/tinyos-2.1.1/tinyos.sh 
Checking the Installation
  1. Close the previous shell. Take a new Shell
  2. Type echo $MAKERULES. If everything is ok, it will display the path.

First Program in TinyOS
Follwing is the simplest program which can be written for TinyOS
Take gedit, copy paste following code.
/* */
configuration SkelAppC {
}
implementation
{
components MainC, SkelC;
SkelC -> MainC.Boot;
}
Save as SkelAppC.nc
Take new file in gedit. Type follwing code
/* The SKEL application */
module SkelC

{
uses interface Boot;

}
implementation
{

event void Boot.booted()
{
1;
}
}
Save the file as SkelC.nc
Take new file in gedit
Type following

COMPONENT=SkelAppC
include $(MAKERULES)
Save as Makefile

Verification

Assuming that username is "test" and your files "SkelC.nc, SkelAppC.nc and Makefile" are in /home/test/tinyos/apps
Take a shell. Type following
cd /home/test/tinyos/apps make telosb

If everything is fine, your output should look similar to above one.

(Same code is provided for download)

Links you may be interested
Running TinyOS Programs using Avrora
Running multiple node simulation using Avrora: Example BlinkToRadio

131 comments:

Anonymous said...

I failed to compile the simple example. It seems that the name of a source file was taken apart.
bob@bob-desktop:~/tinyos/apps$ make telosb
mkdir -p build/telosb
compiling SkelAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"SkelAppC \" -DIDENT_USERNAME=\"bob\" -DIDENT_HOSTNAME=\"bob-desktop\" -DIDENT_USERHASH=0xc706018fL -DIDENT_TIMESTAMP=0x48c58fb4L -DIDENT_UIDHASH=0xbdb40d19L SkelAppC .nc -lm
msp430-gcc: ": No such file or directory
msp430-gcc: SkelAppC: No such file or directory
msp430-gcc: .nc: No such file or directory
make: *** [exe0] Error 1

Gireesh said...

Seems like you forgot to install MSP-GCC please check the synaptic and install MSP-GCC and let me know if it does not work

Kristian Stokes said...

Outstanding tutorial.

I'm attempting to build TinyViz on TinyOS 1.1.15 (per this tutorial: http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson5.html). When attempting to compile Blink (or any other app for that matter), it fails with the following output:

xubuntos@xubuntos-tinyos:/opt/tinyos-1.x/apps/Blink$ make pc
mkdir -p build/pc
compiling Blink to a pc binary
ncc -o build/pc/main.exe -g -O0 -pthread -fnesc-nido-tosnodes=1000 -fnesc-simulate -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=pc -fnesc-cfile=build/pc/app.c -board=micasb -DIDENT_PROGRAM_NAME="Blink" -DIDENT_PROGRAM_NAME_BYTES="66,108,105,110,107,0" -DIDENT_USER_ID="xubuntos" -DIDENT_USER_ID_BYTES="120,117,98,117,110,116,111,115,0" -DIDENT_HOSTNAME="xubuntos-tinyos" -DIDENT_HOSTNAME_BYTES="120,117,98,117,110,116,111,115,45,116,105,110,121,111,115,0" -DIDENT_USER_HASH=0x00f95284L -DIDENT_UNIX_TIME=0x48cc901dL Blink.nc -lm
In file included from /opt/tinyos-1.x/tos/platform/pc/hardware.h:43,
from /opt/tinyos-1.x/tos/system/tos.h:144:
/opt/tinyos-1.x/tos/platform/pc/nido.h:63: `TOSH_NUM_NODES' undeclared here (not in a function)
/opt/tinyos-1.x/tos/platform/pc/nido.h:63: enumerator value for `TOSNODES' not integer constant
make: *** [exe0] Error 1

When compiling for "make mica2", it builds successfully.

Any suggestions would be appreciated.

Gireesh said...

I have n't worked on tinyos1.x platform, nor with tossim
Guess it's not taking the "make pc" environment.
"http://ubuntuforums.org/showthread.php?t=866248&highlight=tinyos"
This may help you

Vijaya Ragavan said...

the tutorial was reaaaaly cool.. I would never have installed tiny os if not for this tutorial.... but when i try to run the cmd there is no output and there is no error reported... :-(

Gireesh said...

" Just the html codes made the instructions a little tricky!
while setting the .bashrc each line starts with an "export" and no space after each line!!!
2- Then you have to install the standard c development library
(many thanks to Phil )
the command is:
sudo apt‐get 
install 
build‐essential"
These are suggestions from ubuntuforums.
http://ubuntuforums.org/showthread.php?p=5726169

"farahijahromi"'s suggestions. Please try this and if it's not working please leave comment here

Anonymous said...

Thanks a lot for writing this article.
I had two problems
1. My setup is compiling perfectly for telos and mica , but I actually want to compile for the intelmote and intelmote2 platform.
When i type make intelmote2 it gives this
deecee@deecee-laptop:/opt/tinyos-2.1.0/apps/Blink$ make intelmote2
mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.1.0/tos/platforms/intelmote2/toscrt0.s /opt/tinyos-2.1.0/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
make: xscale-elf-gcc: Command not found
make: *** [asms] Error 127



Secondly once the ihex file is made can you tell me what utility can be used to download...my motes have a miniusb port..

Gireesh said...

Answers
1)Install xscale-elf-gcc from
http://sing.stanford.edu/intelmote2/tools/linux/xscale-elf-gcc-3.4.3-2.i386.deb
Then close the currently opened shells. Take a new shell and compile program. It will work
2) Probably you may need to use jtag interface.Or you need to purchase the interface from corresponding vendors

Hope it will help you
Regards

Naresh said...

HI
Firstly cheers this blog looks to have a lot of info abt TINYOS, and further looks active.
i'm working on imote2 while compling i.e make mica2 or make micaz all are working and it is creating
main.srec
main.ihex
i want to what actually these files mean?
and i'm not able to execute this command
make intelmote2
it is given error, why this is happening?
lastly is there any GUI for tinyos?

Plzz help me guys, there's no one to help me, even my Prof. not helping me.

thanks in advance

Gireesh said...

Hehe, Prof s not supposed2help u!!! he/she s just a guide.
For imote, please read the comment above your query

And GUI, I am not sure what u meant by that.

ihex stands for Intel Hex format basically for MSP430 chipset
srec as far as I believe is a binary format for instructions
If I find proper explanation, I will reply
Keep visiting

Naresh said...

thank u gireesh.
GUI: i mean for simulation of programs is there any GUI?

Naresh said...

as u posted i followed the steps in installing tinyos in ubuntu.
now it is giving error as shown below:


naresh@naresh-desktop:/opt/tinyos-2.0.2/apps$ echo $MAKERULES
/opt/tinyos-2.1.0/support/make/Makerules
naresh@naresh-desktop:/opt/tinyos-2.0.2/apps$


naresh@naresh-desktop:/opt/tinyos-2.0.2/apps$ make telosb
Makefile:3: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: *** No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.
naresh@naresh-desktop:/opt/tinyos-2.0.2/apps$


naresh@naresh-desktop:/opt/tinyos-2.0.2/apps/Blink$ make micaz
Makefile:2: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: *** No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.
naresh@naresh-desktop:/opt/tinyos-2.0.2/apps/Blink$ make telosb
Makefile:2: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: *** No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.
naresh@naresh-desktop:/opt/tinyos-2.0.2/apps/Blink$

Anonymous said...

installed "xscale-elf-gcc" but still this error.but its working fine with micaz, mica2 and telosb.

vnrvjiet@vnrvjiet-desktop:/opt/tinyos-2.x/apps/Blink$ make intelmote2
mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.x/tos/platforms/intelmote2/toscrt0.s /opt/tinyos-2.x/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
as: unrecognized option `-mcpu=xscale'
make: *** [asms] Error 1

Gireesh said...

@ anonims
u need 2 make a similar entry like
"export PATH=/opt/msp430/bin:$PATH"
in .bashrc. Close all shells and it will work

@naresh
seems yu forgot "export MAKERULES=$TOSROOT/support/make/Makerules "
in .bashrc

try "echo $MAKERULES" in shell. If it is blank, go back and read installation steps where it says updation of .bashrc

Anonymous said...

thx for this tutorial!
everything seems to work fine (i can install Blink app etc.), i still have one problem dough:
when i try to use the apps/tests/TestSerial application i keep getting te same error:

The toscomm JNI library was not found.
Check that your tinyos-tools package is installed and try
rerunning tos-install-jni.
Aborting.

tos-install-jni results in
Installing 32-bit Java JNI code in /usr/lib/jvm/java-6-sun/jre/lib/i386 ...
done.


tos-locate-jre --jni returns /usr/lib/jvm/java-6-sun/jre/lib/i386

what also looks fine to me

you know a solution?

thx!

Gireesh said...

Open the project in Eclipse
Then run it from there.
It will work

Anonymous said...

it does, thx a lot

Anonymous said...

I installed tinyos 2.1.0 on ubuntu 8.10.
Everything works fine, except generating class files from messages (with mig in the makefile), a lot of ncc_nesC errors appear. I had the same problem before on ubuntu 8.04 and then apt-get build-essential did the job. Now it doesn't. Do i miss something?
thx in advance

Gireesh said...

If you can post the error message, then I can suggest something.
Possibly you messed up in the environment variable set using .bashrc

Anonymous said...

I can't see the whole error message in the terminal, but it has a lot of lines like this:
/usr/lib/ncc/nesc_nx.h:258: `offset' undeclared here (not in a function)
/usr/lib/ncc/nesc_nx.h:258: redefinition of `bit_offset'
/usr/lib/ncc/nesc_nx.h:258: previous declaration of `bit_offset'
/usr/lib/ncc/nesc_nx.h:258: `offset' undeclared here (not in a function)
/usr/lib/ncc/nesc_nx.h:258: syntax error before `if'
/usr/lib/ncc/nesc_nx.h:258: syntax error before `+='
/usr/lib/ncc/nesc_nx.h:258: syntax error before `+='
/usr/lib/ncc/nesc_nx.h:258: syntax error before `*'

thx for helping

Gireesh said...

I think it's update problem
I remember reading the same error somewhere and solution was to completely remove nesc installation and reinstall
( there is a complete remove option in the synaptic)
This normally happens with version conflict

I am currently in ubuntu 8.10... The installation steps i used for 8.04 worked fine for me.....

Anonymous said...

I removed tinyos, nesc, avr-gcc, ...
The same errors stay.

It was the first installation of tinyos on that system (it's a new pc).

Gireesh said...

Check if it's problem with all compilation or a java class file problem
First you should make sure that tos-install-jni should be run at installation time
Also try the folliwing
1) open shell in the program directory
2) CLASSPATH=$CLASSPATH:/opt/tinyos-2.1.0/support/sdk/java
3) now try make

Anonymous said...

making blink for example works fine,
it's only when I use mig in a makefile that I have a problem with my application

when i'm in /support/sdk/java and try make tinyos.jar I get the same types of errors

CLASSPATH=$CLASSPATH:/opt/tinyos-2.1.0/support/sdk/java
and then make telosb
doesnt work

Gireesh said...

I normally use eclipse 2 work with java files... This error is not familiar.
Probably you may need to look into pages like
http://docs.tinyos.net/index.php/Java_cygwin

this is the only thing I found........
Sorry that I could not give a solution currently. If I get something, I will post t here.

In case you found a solution to this, please post it here.

Anonymous said...

this is an extract from tinyos tutorial 4, when i change -target=null

by -target=telosb, everything seems to work fine...

COMPONENT=TestSerialAppC
BUILD_EXTRA_DEPS += TestSerial.class
CLEAN_EXTRA = *.class TestSerialMsg.java

TestSerial.class: $(wildcard *.java) TestSerialMsg.java
javac *.java

TestSerialMsg.java:
mig java -target=null -java-classname=TestSerialMsg TestSerial.h TestSerialMsg -o $@

include $(MAKERULES)

Gireesh said...

thats great
thank you very much for the reply
Hope someone will find it useful

Anonymous said...

I still get the errors when I make tinyos.jar, I've no idea what I have to change here in the makefile...

Anonymous said...

/usr/lib/ncc/deputy_nodeputy.h:4:20: error: stddef.h: No such file or directory
/usr/lib/ncc/nesc_nx.h:16:22: error: inttypes.h: No such file or directory
those are the first errors i get when trying to make tinyos.jar
it must be some path that isn't correct because the files are on my system
i would appreciate it if u can assist me with this

thx a lot

Gireesh said...

there is not much information on which version of tinyos u r using
if java path is problem, try to compile the java code n eclipse
If it does not fix the problem, please provide more details about ur environment such as os, java tinyos version and program u tried

Anonymous said...

Thank you for the post. It was very useful!

Anonymous said...

Please help me, i have like ansewer this:
root@DELL:/opt/tinyos-2.1.0/apps# make micaz
/bin/sh: tos-ident-flags: not found
mkdir -p build/micaz
compiling OscilloscopeAppC to a micaz binary
ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-check.xml OscilloscopeAppC.nc -lm
Invoked: ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -fnesc-dump=wiring -fnesc-dump=interfaces(!abstract()) -fnesc-dump=referenced(interfacedefs, components) -fnesc-dumpfile=build/micaz/wiring-check.xml OscilloscopeAppC.nc -lm
Running: gcc -E -D__NCC__ -imacros /usr/include/nognu -Os -fnesc-cfile=build/micaz/app.c -DDEFINED_TOS_AM_GROUP=0x22
gcc: pas de fichier à l'entrée
[gcc] Program failed..
make: *** [exe0] Erreur 1

chairi said...

hello i try to install the tinyos in ubuntu 8.10 and i have a problem .

when i use your steps in the step 4 when i reload my repositories i cant find the tinyos with the search machine .

any help please ?

thanks

Gireesh said...

with this limited info, I am not sure I can help you much.
I am currently in 8.10 and I did not find updated stanford uty repository for updating for this distro. So I still use the 8.04 based packages.

Also, please try to see that your machine can update from internet using apt-get. If you are behind a proxy or firewall, check the rules before updating

chairi said...

ok i solved the install problem but now i have an other oone.
when i run the Blink application with tossim i have a big msg . any help


chairi@chairi-desktop:/opt/tinyos-2.1.0/apps/Blink$ make micaz simmkdir -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=100000 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"chairi\" -DIDENT_HOSTNAME=\"chairi-desktop\" -DIDENT_USERHASH=0xbd195242L -DIDENT_TIMESTAMP=0x4990b98fL -DIDENT_UIDHASH=0x2293eefaL -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=\"chairi\" -DIDENT_HOSTNAME=\"chairi-desktop\" -DIDENT_USERHASH=0xbd195242L -DIDENT_TIMESTAMP=0x4990b98fL -DIDENT_UIDHASH=0x2293eefaL /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: In function ‘PyObject* _wrap_nesc_app_t_numVariables_set(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:1999: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2000: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_numVariables_get(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2066: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2067: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableNames_set(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2134: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2135: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableNames_get(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2202: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2203: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableTypes_set(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2270: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2271: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableTypes_get(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2338: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2339: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableArray_set(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2406: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2407: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_nesc_app_t_variableArray_get(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2474: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2475: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_delete_nesc_app_t(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2554: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2555: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_new_Mote(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2698: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2699: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘PyObject* _wrap_new_Tossim(PyObject*, PyObject*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2997: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:2998: warning: deprecated conversion from string constant to ‘char*’
g++ -c -shared -fPIC -o simbuild/micaz/tossim.o -g -O0 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"chairi\" -DIDENT_HOSTNAME=\"chairi-desktop\" -DIDENT_USERHASH=0xbd195242L -DIDENT_TIMESTAMP=0x4990b98fL -DIDENT_UIDHASH=0x2293eefaL /opt/tinyos-2.1.0/tos/lib/tossim/tossim.c -I/usr/include/python2.5 -I/opt/tinyos-2.1.0/tos/lib/tossim
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c: In member function ‘variable_string_t Variable::getData()’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c:116: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c:117: warning: deprecated conversion from string constant to ‘char*’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c: In member function ‘Variable* Mote::getVariable(char*)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim.c:169: warning: deprecated conversion from string constant to ‘char*’
g++ -c -shared -fPIC -o simbuild/micaz/c-support.o -g -O0 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"chairi\" -DIDENT_HOSTNAME=\"chairi-desktop\" -DIDENT_USERHASH=0xbd195242L -DIDENT_TIMESTAMP=0x4990b98fL -DIDENT_UIDHASH=0x2293eefaL /opt/tinyos-2.1.0/tos/lib/tossim/hashtable.c -I/usr/include/python2.5 -I/opt/tinyos-2.1.0/tos/lib/tossim
linking into shared object ./_TOSSIMmodule.so
g++ -shared -fPIC simbuild/micaz/pytossim.o simbuild/micaz/sim.o simbuild/micaz/tossim.o simbuild/micaz/c-support.o -lstdc++ -o _TOSSIMmodule.so
copying Python script interface TOSSIM.py from lib/tossim to local directory

*** Successfully built micaz TOSSIM library.
chairi@chairi-desktop:/opt/tinyos-2.1.0/apps/Blink$

Gireesh said...

@chairi
it says "*** Successfully built micaz TOSSIM library. "
I did not see any error. It is only a set of warnings.

Also, I never worked in TOSSIM. Please see my posts on using Avrora to emulate the wsn. Avrora is an alternative to TOSSIM.

kuldeep said...

Hello Gireesh,i have tried ur sample application on my tinyos-2.x that comes with XUBUNTU-2.0 installation.It compiled successfully with "make micaz sim",do u knw how to run it......because in windows after compiling with "make pc",we can see output with build/pc/main.exe 10 etc.so can u tell me what is the eq procedure in ubuntu.

Gireesh said...

@kuldeep
I already told about my situation. I never worked in TOSSIM nor in windows.
No comments!!!!

grace said...

hi Gireesh
thanks for helping people
i wanted to ask please :
i have a project to do and i need to use tinyos2.1.0
with tossim2
and to have a gui to view
my virtual temperature sensor network
and i do not have any real motes at all

so could this be done ?as u know.
and if u know sites which have Demos.
please tell me about them


i have been reading some nesc files and there were some nonunderstandable words to me so please what are there meanings

1- TOS_LOCAL_ADDRESS

2- call SendMsg.send(TOS_BCAST_ADDR, sizeof(int16_t), &beacon_packet);

where beacon_packet is of type TOS_Msg


infact i have a code for temperature mote from net but i did not under stand so much because there is no comments in the file and i do not know much in nesc
so please if u can help me i appreciate this
thnx,
also i wanted to ask if i can contact u by email if u do not mind because i have more Q's
this is my email
fire_sprite092(at)yahoo .com

REGARDS and thanks in advance .

grace .

Gireesh said...

@grace
Hope the blog will be helpful for you.
My aim for this blog is to work in WSN without motes for a beginner or someone interested in studying tinyos
I have not worked with TOSSIM, as you see the succeeding posts. What I use is Avrora. Please go through succeeding posts, to see how it is working.
You can test OCTOPUS, a GUI based application in tinyos in Avrora.
(Googling with octopus, tinyos will give necessary links)

After reading please get back to me for specific doubts; I will mail you
All the best

Regards

federico said...

Thank you for the post. It was very useful!
It works on ubuntu 8.10 over SUN xVM VirtualBox.

Priscilla said...

Hi, thank u so much for your valuable guide on tinyOs. I had installed it but i can't test it, i always get this problem :

Makefile:2: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: *** No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.

Do you have any idea what did i do wrong? many thanks before

Gireesh said...

@Priscilla
Did you use this tutorial for installation?
Please use nautilus (file browser) to see what is content of /opt
if the tinyos 2.1.0 directory and subdirectories are there, it should work fine.
Second check is to make sure that you have to update your .bashrc and close all the shells opened currently. Reopen shell and type
echo $MAKERULES
it should print the path correctly

XIII said...

hey..first off thanks for the install tips..was really clueless on how to use tinyos..failed to compile the simple example..my problem is that my files get saved in my user folder itself and not tinyos/apps/..appreciate the help..thanks...

XIII said...

xiii@ubuntu:~/tinyos/apps$ make telosb
mkdir -p build/telosb
compiling SkelAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"SkelAppC\" -DIDENT_USERNAME=\"xiii\" -DIDENT_HOSTNAME=\"ubuntu\" -DIDENT_USERHASH=0xa6363f6eL -DIDENT_TIMESTAMP=0x49d1b986L -DIDENT_UIDHASH=0x91b2a3d4L SkelAppC.nc -lm
SkelAppC.nc:1:3: error: invalid preprocessing directive #~
SkelAppC.nc:2:3: error: invalid preprocessing directive #see
SkelAppC.nc:3:3: error: invalid preprocessing directive #for
SkelAppC.nc:5:3: error: invalid preprocessing directive #If
SkelAppC.nc:5:36: warning: missing terminating ' character
SkelAppC.nc:6: syntax error before `['
SkelAppC.nc:8:3: error: invalid preprocessing directive #don
SkelAppC.nc:8:6: warning: missing terminating ' character
SkelAppC.nc:9:3: error: invalid preprocessing directive #don
SkelAppC.nc:9:67: warning: missing terminating ' character
SkelAppC.nc:10: stray $ in program
SkelAppC.nc:10: stray $ in program
SkelAppC.nc:11:3: error: invalid preprocessing directive #...
SkelAppC.nc:12: syntax error before `export'
SkelAppC.nc:14:3: error: invalid preprocessing directive #append
SkelAppC.nc:14:34: warning: missing terminating ' character
SkelAppC.nc:17:3: error: invalid preprocessing directive #for
SkelAppC.nc:19:3: error: invalid preprocessing directive #check
SkelAppC.nc:20:3: error: invalid preprocessing directive #update
SkelAppC.nc:23:3: error: invalid preprocessing directive #make
SkelAppC.nc:26:3: error: invalid preprocessing directive #set
SkelAppC.nc:28: syntax error before `debian_chroot'
SkelAppC.nc:28: stray $ in program
SkelAppC.nc:31:3: error: invalid preprocessing directive #set
SkelAppC.nc:36:3: error: invalid preprocessing directive #uncomment
SkelAppC.nc:37:3: error: invalid preprocessing directive #off
SkelAppC.nc:38:3: error: invalid preprocessing directive #should
SkelAppC.nc:39:2: error: invalid preprocessing directive #force_color_prompt
SkelAppC.nc:41: syntax error before `if'
SkelAppC.nc:42: syntax error before `if'
SkelAppC.nc:43:4: error: invalid preprocessing directive #We
SkelAppC.nc:43:36: warning: missing terminating ' character
SkelAppC.nc:44:4: error: invalid preprocessing directive #(
SkelAppC.nc:45:4: error: invalid preprocessing directive #a
SkelAppC.nc:46: syntax error before `color_prompt'
SkelAppC.nc:53: syntax error before `PS1'
SkelAppC.nc:53:9: warning: unknown escape sequence '\]'
SkelAppC.nc:53:9: warning: universal character names are only valid in C++ and C99
SkelAppC.nc:53:9: error: incomplete universal character name \u
SkelAppC.nc:53:9: warning: unknown escape sequence '\h'
SkelAppC.nc:53:9: warning: unknown escape sequence '\]'
SkelAppC.nc:53:9: warning: unknown escape sequence '\]'
SkelAppC.nc:53:9: warning: unknown escape sequence '\w'
SkelAppC.nc:53:9: warning: unknown escape sequence '\]'
SkelAppC.nc:53:9: warning: unknown escape sequence '\$'
SkelAppC.nc:53:9: warning: character constant too long for its type
SkelAppC.nc:55:9: warning: universal character names are only valid in C++ and C99
SkelAppC.nc:55:9: error: incomplete universal character name \u
SkelAppC.nc:55:9: warning: unknown escape sequence '\h'
SkelAppC.nc:55:9: warning: unknown escape sequence '\w'
SkelAppC.nc:55:9: warning: unknown escape sequence '\$'
SkelAppC.nc:55:9: warning: character constant too long for its type
SkelAppC.nc:59:3: error: invalid preprocessing directive #If
nesc1: warning: universal character names are only valid in C++ and C99
nesc1: error: incomplete universal character name \u
nesc1: warning: unknown escape sequence '\h'
nesc1: warning: unknown escape sequence '\w'
nesc1: warning: unknown escape sequence '\]'
SkelAppC.nc:64: syntax error before `)'
SkelAppC.nc:68:3: error: invalid preprocessing directive #Alias
SkelAppC.nc:69:3: error: invalid preprocessing directive #You
SkelAppC.nc:70:3: error: invalid preprocessing directive #~
SkelAppC.nc:71:3: error: invalid preprocessing directive #See
SkelAppC.nc:73:5: error: token "[" is not valid in preprocessor expressions
SkelAppC.nc:94:51: warning: missing terminating ' character
SkelAppC.nc:95:14: warning: missing terminating ' character
SkelAppC.nc:73:1: error: unterminated #if
SkelAppC.nc:66: syntax error at end of input
make: *** [exe0] Error 1


i rectified the previous error and this is the present problem.. i m guessing i ve missed something during the install??

Anonymous said...

mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.x/tos/platforms/intelmote2/toscrt0.s /opt/tiny
s-2.x/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
xscale-elf-gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [asms] Error 1

Could you please how can I fix this error. I am using windosXP and cygwin

Bouybanin said...

salvation Gireesh
I thank you for the relevant tutorials, and I've tested it and it works perfectly, but I have a question about "Octopus":
Is what is a simulator for TinyOS or just a screen for the real sensor to test and configure.
because I need something like tinyViz in TinyOS-1.x, now I work in TinyOS-2.x.
I tested with Avrora it works perfectly, but with Octopus it gives me always a white screen, can not add node.
before walking octopus must execute this command: export MOTECOM = serial @ / dev/ttyS0: micazis thank you in advance

Gireesh said...

@ Bouybanin

well, octopus is having a gui, it shows the network as a connected graph with node id. you can get data from node(s), disseminate values to node(s)
It works with tinyos 2.x
to do this in avrora, you need to create an od file of the program and load it using tinyos serialforwarder and avrora
it is pretty straight, similar to one i have described in http://mythicalcomputer.blogspot.com/2008/09/running-blinktoradio-using-avrora.html
+
http://mythicalcomputer.blogspot.com/2008/10/using-serialforwarder-interface-of.html

Bouybanin said...

hi Gireesh
therefore we can not simulate a network with Octopus, Octopus knowing that it shows you the real networks already exists as a graph node not virtual.
Avrora with the opposite, it can simulate a virtual network with just one code "NESC" then transforms the main.exe "on" main.od "but not the problem of a graph node.
and thank you very much for your Responses

Gireesh said...

@Bouybanin
nope
octopus can be loaded, that is what i told
u just give a try
and
avrora can take even nodepositions
so u can design ur own network using that

Anonymous said...

Thank you. it works

Yoga said...

Hi,
Thanks a lot for this blog!
It has been very useful for me. I am working with intel mote2 and thus tried to install the xscale-elf-gcc cross compiler but it does not compile correctly. when i compile a hello world program,
it gives this error message:
xscale-test.c:2:19: stdio.h: No such file or directory
xscale-test.c: In function `main':
xscale-test.c:6: warning: implicit declaration of function `printf'


it seems that some library is missing or something. Can you help me out here? Thanks a lot!

Gireesh said...

@Yoga
pls see the wiki
if problem persists, let me know

http://docs.tinyos.net/index.php/Xscale-elf_Debian

Gireesh said...

@yoga,
also check my friend's blog on this

http://tosubun2.wordpress.com/

Yoga said...

Hi,

Thanks for the links! Now, i'm getting a slightly different error. Here are the details:

when I try to install the xscale-elf-binutils-2.15-2.i386.deb package, i get an error saying that :

dpkg: error processing /tmp/xscale-elf-binutils-2.15-2.i386.deb (--install):
trying to overwrite '/usr/lib/libiberty.a', which is also in package avr-gcc-tinyos
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/tmp/xscale-elf-binutils-2.15-2.i386.deb

i have tried but it seems to be difficult to edit this particular 'libiberty.a' file.

The xscale-elf-newlib-1.13.0.1.i386.deb and xscale-elf-gcc-3.4.3-2.i386.deb packages install succesfully.

Now, when i run the compiler over the same hello world file (that compiles and runs well under the normal gcc compiler), i get a new error message:

u0705871@ubuntu:~$ xscale-elf-gcc -Wall -g -o xscale-test xscale-test.c
as: unrecognized option '-mcpu=xscale'

Yoga said...

hey! thanks a lot! i got it working! I uninstalled the avr-gcc-tinyos and reinstalled the xscale packages, startingl with the binutils first, followed by newlib and gcc at last. Thanks a lot!This is a very useful blog!

Bharat said...

Hi,

I wanted to know if you had any experience in running SerialForwarder. I am getting a bunch of errors while typing make in tools/java (which is preventing SerialForwarder from not working properly) and don't know how to resolve them. I'm using TinyOS-1.x by the way.

Thanks,
Bharat.

Gireesh said...

@bharat,
pls check my other posts
but i have worked only on 2.x, not 1.x

aigochamna said...

I failed to compile as follows:
Please help.

mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.x/tos/platforms/intelmote2/toscrt0.s /opt/tiny
s-2.x/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
xscale-elf-gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [asms] Error 1

Khaja said...

i'm using debian 4.0.. i'm getting the following error.. Can u suggest any solution?

root@debian:/opt/tinyos-2.1.0/apps/Blink# make micaz
mkdir -p build/micaz
compiling BlinkAppC to a micaz binary
ncc -o build/micaz/main.exe -Os -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 -finline-limit=100000 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"debian\" -DIDENT_USERHASH=0x0dbc5c03L -DIDENT_TIMESTAMP=0x4a997151L -DIDENT_UIDHASH=0x779e080eL -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
avr-gcc: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by avr-gcc)
make: *** [exe0] Error 1
root@debian:/opt/tinyos-2.1.0/apps/Blink#


Thanks..

Astronaut said...

Hey.
The correct CLASSPATH should be
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
Note that the ":." is VERY important. Otherwise Java tools (like TestSerial) will not work!

andy said...

hi, I was working my way on installing Tinyos-2.1.0 on ubuntu 8.10 for imote2, i used all the steps in this blog.

It works fine for micaz and telosb but when problem is with imote2
I am getting following error

user@desktop:/opt/tinyos-2.1.0/apps/Blink$ make intelmote2
mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.1.0/tos/platforms/intelmote2/toscrt0.s /opt/tinyos-2.1.0/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
as: unrecognized option '-mcpu=xscale'
make: *** [asms] Error 1


i read the previous comments but still struggling with this error. I checked all environment variables also they are set as told by you.

Kindly help me out

Jithu said...

Hi,
I am a newbie in TinyOS. I installed TinyOS based on the instructions given. I could build Blink app for telosb, but when i tried on intelmote2, i got the following.
make intelmote2 =>

mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.1.0/tos/platforms/intelmote2/toscrt0.s /opt/tinyos-2.1.0/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
Known MCU names:
msp1
msp2
msp430x110
msp430x112
..
msp430x448
msp430x449

Assembler messages:
Fatal error: unknown MCU: cpu=xscale

make: *** [asms] Error 1

Please help me ..

I have one deviation from the above instructions; After my installation, there was no folder called in opt/msp430. So in the PATH, i put /usr/msp430/bin.

Please help in solving thsi..

Thanks in advance
Jithu

Gireesh said...

imote has a diff microcontroller
msp430 is for telos
you need to install compiler for your m/c and put it in bashrc , it will work

Jithu said...

Yes .. the problem was that xscale-binutils installation was not proper. I installed it again and now it works fine.

thallam swathi said...

I have followed the steps in this post for installing tiny OS..I included all he lines mentioned here in .bashrc...but When i gave
echo $MAKERULES in the shell i am not able to get the path...itz showing blank..
plz help me out...

Thanx in advance

Jithu said...

hi thallam ..
it should work .. just try echo $MAKERULES in a console window. .bashrc is executed when u log in or when a new consolw window is opened.

Sandro Javier said...

Hi!!!

When I try to compile Blink and do 'make telosb', it appears a long list of errors like these:

/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc: At top level:
/opt/tinyos-2.1.0/tos/lib/timer/AlarmToTimerC.nc:73: syntax error before `Timer'
AlarmToTimerC: `Timer.startPeriodicAt' not implemented
AlarmToTimerC: `Timer.startOneShotAt' not implemented
In file included from /opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:42,
from /opt/tinyos-2.1.0/tos/system/TimerMilliP.nc:41,
from /opt/tinyos-2.1.0/tos/system/TimerMilliC.nc:40,
from BlinkAppC.nc:46:
In component `VirtualizeTimerC':
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:37: syntax error before `uint8_t'
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:50: syntax error before `uint32_t'
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:50: warning: no semicolon at end of struct or union
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:51: syntax error before `dt'
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:52: syntax error before `isoneshot'
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:53: syntax error before `isrunning'
/opt/tinyos-2.1.0/tos/lib/timer/VirtualizeTimerC.nc:54: syntax error before `_reserved'
VirtualizeTimerC: `TimerFrom.fired' not implemented
VirtualizeTimerC: `Timer.startPeriodicAt' not implemented
VirtualizeTimerC: `Timer.startOneShotAt' not implemented
VirtualizeTimerC: `Timer.startPeriodic' not implemented
VirtualizeTimerC: `Timer.startOneShot' not implemented
VirtualizeTimerC: `Timer.stop' not implemented
In file included from /opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:43,
from /opt/tinyos-2.1.0/tos/system/TimerMilliP.nc:41,
from /opt/tinyos-2.1.0/tos/system/TimerMilliC.nc:40,
from BlinkAppC.nc:46:
In component `CounterToLocalTimeC':
/opt/tinyos-2.1.0/tos/lib/timer/CounterToLocalTimeC.nc:38: syntax error before `uint32_t'
/opt/tinyos-2.1.0/tos/lib/timer/CounterToLocalTimeC.nc:42: syntax error before `LocalTime'
In component `HilTimerMilliC':
/opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:47: no match
/opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:48: no match
/opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:50: cannot find `TimerFrom'
/opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:51: cannot find `Alarm'
/opt/tinyos-2.1.0/tos/chips/msp430/timer/HilTimerMilliC.nc:52: cannot find `Counter'
In component `TimerMilliC':
/opt/tinyos-2.1.0/tos/system/TimerMilliC.nc:44: too many arguments
make: *** [exe0] Error 1

What can be the problem? Please help me!!!!!!!!!!!!
Merry Christmas :)

Gireesh said...

is the version u r using is correct?
Please check the version and try to reinstall tinyos if needed.
Another possibility is that your own Makefile/BlinkAppC is not correct

Sandro Javier said...

The Tinyos version is 2.1.0. I installed it with debian (.deb) packages.
I checked the BlinkAppC and it is correct

:(

Gireesh said...

Hi mr Javier
Can you try to compile a simple application like skelton, then skelton with led component; then add timer.
I mean, an incremental method to locate error. If I am not wrong, it is in MAKERULES or Original makefile from TinyOS. B/w did u install any other version before?

Sandro Javier said...

That's a good idea, I'll try it. I didn't install other version of Tinyos.
When I do tos-check-env there are some warnings:

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.

...but I have the latest version of both. Can be this the problem? Maybe I need to install an older version?

Thanks for ur help :)

Sandro Javier said...

I tried to compile Skelton, and I found the following errors:

/opt/tinyos-2.1.0/support/make/ident_flags.extra:13: atención: se imponen comandos para el objetivo `ident_cache'
../../support/make/ident_flags.extra:13: atención: se ignoran las instrucciones viejas para el objetivo `ident_cache'
/opt/tinyos-2.1.0/support/make/tos_image.extra:8: atención: se imponen comandos para el objetivo `build_tosimage'
../../support/make/tos_image.extra:8: atención: se ignoran las instrucciones viejas para el objetivo `build_tosimage'
../../support/make/msp/msp.rules:89: atención: se imponen comandos para el objetivo `setid'
../../support/make/msp/msp.rules:89: atención: se ignoran las instrucciones viejas para el objetivo `setid'
../../support/make/msp/msp.rules:95: atención: se imponen comandos para el objetivo `tosimage'
../../support/make/msp/msp.rules:95: atención: se ignoran las instrucciones viejas para el objetivo `tosimage'
../../support/make/msp/msp.rules:98: atención: se imponen comandos para el objetivo `ihex'
../../support/make/msp/msp.rules:98: atención: se ignoran las instrucciones viejas para el objetivo `ihex'
../../support/make/msp/msp.rules:101: atención: se imponen comandos para el objetivo `exe'
../../support/make/msp/msp.rules:101: atención: se ignoran las instrucciones viejas para el objetivo `exe'
../../support/make/msp/msp.rules:104: atención: se imponen comandos para el objetivo `exe0'
../../support/make/msp/msp.rules:104: atención: se ignoran las instrucciones viejas para el objetivo `exe0'
../../support/make/msp/msp.rules:112: atención: se imponen comandos para el objetivo `builddir'
../../support/make/msp/msp.rules:112: atención: se ignoran las instrucciones viejas para el objetivo `builddir'
../../support/make/msp/msp.rules:115: atención: se imponen comandos para el objetivo `bytes'
../../support/make/msp/msp.rules:115: atención: se ignoran las instrucciones viejas para el objetivo `bytes'
/opt/tinyos-2.1.0/support/make/telosb.target:25: atención: se imponen comandos para el objetivo `telos'
../../support/make/telosb.target:25: atención: se ignoran las instrucciones viejas para el objetivo `telos'
/opt/tinyos-2.1.0/support/make/telosb.target:28: atención: se imponen comandos para el objetivo `telosb'
../../support/make/telosb.target:28: atención: se ignoran las instrucciones viejas para el objetivo `telosb'
mkdir -p build/telosb
compiling SkelAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -O -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"SkelAppC\" -DIDENT_USERNAME=\"administrador\" -DIDENT_HOSTNAME=\"administrador-d\" -DIDENT_USERHASH=0xebbd717fL -DIDENT_TIMESTAMP=0x4b3b419dL -DIDENT_UIDHASH=0x05e4fec2L -DIDENT_APPNAME=\"SkelAppC\" -DIDENT_USERNAME=\"administrador\" -DIDENT_HOSTNAME=\"administrador-d\" -DIDENT_USERHASH=0xebbd717fL -DIDENT_TIMESTAMP=0x4b3b419dL -DIDENT_UIDHASH=0x05e4fec2L SkelAppC.nc -lm
multiple targets specified
make: *** [exe0] Error 2

Help me please!

Gireesh said...

Hi Sandro,
It is the problem in installation or configuration in ncc compiler.
Please check the output for $MAKERULES by
echo $MAKERULES.

Also verify if the paths set for avr-gcc and msp430-gcc

happy new year !!!!!

Sandro Javier said...

Hi,

I didn't answer before because I couldn't. Sorry.
This is the output of 'echo $MAKERULES':

/opt/tinyos-2.1.0/support/make/Makerules

I don't know how to verify paths set for avr-gcc and msp430-gcc ??? :S

Happy new year to you too!!!

Sandro Javier said...

I solved the problem. I don't know why the problem was on Ubuntu 9.10, but on Ubuntu 9.04 it goes well.

THANK YOU for your help!!!

Pablo.S said...

/opt/tinyos-2.1.0/tos/system/TimerMilliC.nc:44: too many arguments

i installed a fresh ubuntu studio, then i install tinyos, build-essentials, pyton2.6-dev and still have the same problem. What else do i need???

Pablo.S said...

i have the same problem as sandro javier, and i would like to know how to set this paths

thank you in advance.

Fazlullah said...

Hi All!
I tried to use Avrora with Tinyos 2.x, i put averora.jar and converter.sh in my /home/vr/avrora directory, modified the .bshrc file accordingly and tried to execute the command
averora | averora-converter (Aliases) and got the Error
Line 1. Unable to access jar files /home/vr/averora/avrora.jar
Line 2. Usage :convert-averora filename1.exe filename2.od
Reagrds Fazlullah Khan

Gireesh said...

@Fazlullah
err sayz t all
pl dont blindly do things.. try to understand what it does.

Fazlullah said...

@Gireesh
Hi Sir,
I tried it with so many methods like
java -jar /home/vr/avrora/avrora.jar;
This also gives the same error and that Unable to access jarfiles. The jarfiles are there and I have also downloaded it from avrora site and also through your blog but invain.
when I ran the command
java -version
it returns
java version "1.6.0_17"
java(TM) SE Runtime Environment build (1.6.0_17-bo4)
Java HotSpot(TM)Client VM buils (14.3-bo1, mixed mode, sharing)
So, please what does this ERROR mean?
Still Thanks alot for your valuable Blog, I learnt alot from it by studying all its 78 comments.
Thanks to every one on this Blog.
Regards
Khan

Gireesh said...

@Fazlullah
Dear sir,
please use CLASSPATH=... (path to yur jar) before running the shellscript/ add that line in the bash script before the java -jar

This is what I meant by "err says t all"

Gireesh said...

@Fazlullah
Dear sir,
please use CLASSPATH=... (path to yur jar) before running the shellscript/ add that line in the bash script before the java -jar

This is what I meant by "err says t all"

Fazlullah said...
This comment has been removed by the author.
Fazlullah said...
This comment has been removed by the author.
Fazlullah said...

Hi 2 All!
Is avrora compatible with mica2 only and not micaz even?? I am getting ERROR when running micaz i.e. micaz platform not found.
Regards
Fazlullah Khan

Gireesh said...

@faz
pl search for avroraz, it s a part of avrora repository in sourceforge.
Pl use sourceforge repo for avrora/avroraz

Anonymous said...

Hi guys

I really appreciate for the information u r sharing in this community. I hope u will help me out with the problem below.

I am installed tinyos in windows and when i tried to execute the progs i got the no rules found error ...then when i checkd the form i came to know that i have to make rules for the bashrc but when i tried that i get the following error. Please help me with the issue

Prathyusha Reddy@Lucky /
$ gedit ~/ .bashrc
bash: gedit: command not found

thanks

Prathyusha Reddy said...
This comment has been removed by the author.
Gireesh said...

@prathyusha
mm u r trying in cygwin....
y not have patience 2 read that its title is ...."ubuntu
pls dont BLINDLY follow things... instead understand that gedit is just an editor like notepad.........

all the best

b/w dere r not many "guys" arnd... ts my blog...... if u wana help pls learn and post your programs, so that we all will benefit out of t

Fazlullah said...

@prathyusha
Dear the gedit is not an editor for cygwin. Use its nono editor
nano .bashrc
Hope u will get it.

Fazlullah Khan
MCS, NUST, Pakistan

Fazlullah said...

Hi Gireesh G!
Asking 4 some thing stupid and that is Please Do You Have a Program for data reading which I may install on a mote and connect another mote with the PC and read the sent data from the remote node.
2nd how can I simulate this scenario on avrora OR TinyViz.
I have AVRORA and TinyViz both.
Regards

Fazlullah Khan

Gireesh said...

@faz
yaar, bit bsy with my work.. i have requested the same to one other person who learned this program from me. If she does not reply in a day or two, i will try to find time and will do a separate post on the same.
:-)

Fazlullah said...

Hi Gireesh G!
Hope you will be fine and Thanks for reply, i was waiting for the last two days but I think that Mam did not reply. Just to remind you that I need program(s) for sending and receiving data and how to simulate in Avrora or TinyViz.

Best Regards
Fazlullah Khan

Shyam Sahu said...

thanks for the guide. it sure did leave me out of a lot of hassles. thanks again.
But i am having a problem.


shiva@shiva:~$ echo $MAKERULES
/opt/tinyos-2.1.0/support/make/Makerules

althoough tinyos appears to be installed, it perhaps isn't coz i can't find any folder inside opt.
will be glad if u can help

Gireesh said...

@shyam
echo will print it as long as you put t in bashrc irrespective of the installation's success/failure

check in the synaptic package manager, if it is installed

Gireesh said...

@faz
please find the post http://mythicalcomputer.blogspot.com/2010/03/file-transfer-peer-to-peer-using-two.html

I am leaving the simulation part using Avrora to you as an exercise. Please post it after you successfully complete this part

Sahar said...

I wanted to really appreciate your constructive help!
It was great...

Thanks so much

Anonymous said...

Hey Girish..
Nice tutorial.
But I faced some problem while installing it.
I was trying to install tinyos-2.1.1 on my system with os ubuntu lucid main. After installation I made the changes in shell file as you have mentioned. But then typing the command echo $MAKERULES neither showed any path nor any error.
Nevertheless I proceeded with the example code. But then got following error message.

make: *** No rule to make target `telosb'. Stop.

:(

I would be very thankful to you if you could help me with the possible problem.

Thanks in advance.
Nikki

Gireesh said...

Hi Nikki

Please find the updated tutorial for Tinyos 2.1.1 Installation and Testing in Ubuntu

Anonymous said...

That was helpful, thanks :)

Anonymous said...

has anyone idea how to install tossim in ubuntu 10.4for tinyos2.1.1..........:(

shailley said...

hii sir
I am doing work on wireless sensor network ,can u tell me how to do multihop communication.

Hoping for ur reply soon..
Thinking you

Anonymous said...

I am working on tinyOS on windows through cygwin.I have installed all the packages as guided fr tinyOS and configured tossim.
when I run the blink application,
it gave:
tos-ident-flags:not found
python- 2.3 configure not found
ncc:not found
error 127
But I found ncc,python even when i searching in my cygwin folder.
Please help me out.I guess its a problem with path settings.

Gireesh said...

@anonims
I don't have any experience in cygwin. If you need a quick solution, download xubuntos with Virtualbox and try it

LIANG HONG said...

Hi,Gireesh, thanks a lot for your blog.

I have two questions here: thanks in advance

problme A:

cr> make telosb
mkdir -p build/telosb
compiling SkellAppc to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"SkellAppc\" -DIDENT_USERNAME=\"liang\" -DIDENT_HOSTNAME=\"liang-HP-Compaq\" -DIDENT_USERHASH=0xb0490781L -DIDENT_TIMESTAMP=0x4e84e77bL -DIDENT_UIDHASH=0x70cf32b7L SkellAppc.nc -lm
msp430-gcc: SkellAppc.nc: No such file or directory
make: *** [exe0] Error 1

and I have mspgcc in /opt/msp430
also in /usr/bin

how can I solve this problem?

Problem 2
moreover, when I type
cr> gcc -v
Using built-in specs.
Configured with: /home/raz/local/src/tinyos-toolchain-packages/sources/msp430-build-tinyos-2.1/build/gcc-3.2.3/configure --target=msp430 --prefix=/home/raz/local/src/tinyos-toolchain-packages/sources/msp430-build-tinyos-2.1/packages/usr --program-prefix=msp430-
Thread model: single
gcc version 3.2.3

But in my bash file, my path is
CPLUS_INCLUDE_PATH=:/usr/include/c++/4.5.2

and in /usr/bin
cr> ll gcc*
lrwxrwxrwx 1 root root 7 2011-09-09 08:40 gcc -> gcc-4.5*
-rwxr-xr-x 1 root root 237012 2011-04-18 16:22 gcc-4.5*
-rwxr-xr-x 1 root root 199048 2010-06-07 05:33 gccxml*
-rwxr-xr-x 1 root root 7690300 2010-06-07 05:33 gccxml_cc1plus*

so is there any problem with my gcc?

Thank you very much.
Have a nice day :)

kst said...

first off, thanks for the many FAQs answered in this topic. Still, I have some problems when trying to compile Blink in Ubuntu 10.04.

If I run "make telosb", I get:

/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:48: cannot find `Port54'
/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:51: cannot find `Port55'
/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:54: cannot find `Port56'
make: *** [exe0] Error 1


and when running "make micaz sim":

/opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:139:20: error: Python.h: No such file or directory
/opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:2501:4: error: #error "This python version requires swig to be run with the '-classic' option"
/opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:744: error: expected initializer before ‘*’ token
/opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:799: error: expected initializer before ‘*’ token
/opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:820: error: expected initializer before ‘*’ token
In file included from /usr/include/c++/4.4/stdexcept:38,
from /opt/tinyos-2.1.1/tos/lib/tossim/tossim_wrap.cxx:2520:
/usr/include/c++/4.4/exception:35: error: expected declaration before end of line
make: *** [sim-exe] Error 1

Gireesh said...

@kst: I am not sure of such errors either in TelosB or MicaZ

For Telos, I assume there is some typo error in yout program or in the settings.

For micaz sim, you need TOSSIM working.
Could you able to compile using make micaz (no sim) ?
If so the telosb error is platform dependant (mps430 compiler) or so.

Anonymous said...

Hello, thank you Gireesh for your help,you are GREAT!!
actually i'm a beginner in tinyos and have problems, i installed tinyos 2.1.1
on ubuntu 11.10 but now i need to set it for intelMote2 so that it can compile a program "let's say Blink" ,i did some steps but still in trouble;here is the shell and the error:

mashal@ubuntu:/opt/tinyos-2.1.1/apps/Blink$ make intelmote2
mkdir -p build/intelmote2
xscale-elf-gcc -c /opt/tinyos-2.1.1/tos/platforms/intelmote2/toscrt0.s /opt/tinyos-2.1.1/tos/chips/pxa27x/pxa27x_util.s -o build/intelmote2/asms.o
make: xscale-elf-gcc: Command not found
make: *** [asms] Error 127

-------------------------------------
i tried to download xscale-elf-gcc but couldn't do that because the link you posted above doesn't work in the synaptic,i think the name of distribution is missing.

I NEED YOUR HELP URGENTLY FOR MY GRADUATION PROJECT,AND I AM READY IF YOU NEED TO KNOW MORE ABOUT MY SETTINGS
thanx again :)

Gireesh said...

@anonimous: You may refer the documentation in TinyOS
docs.tinyos.net/tinywiki/index.php/IMote2_Compiler

Mash'al (last anonymous|) said...

i've downloaded arm-compiler-elf_4.1.1-1.deb but failed to install it, should i install it from the shell like"sudo install ...." or how please,thanks for help.

Anonymous said...

Are the examples given like blinkC are platform dependent??
if yes how to change the codes for mica2 platform...
i tried "make telosb" it worked ....
"make mica2" is showing error...
please help me out..!!!!!!

Gireesh said...

blink may not be platform dependant
but micaz is anyway same as mica2 except radio.
try micaz. if that also gives error, it is error in avr-gcc package

Manjula said...

Hello sir, this is manjula.

1.can you please suggest whether to use TOSSIM or Omnet++ simulator if one needs to work only with simulator and not the actual hardware.

Because i have almost spent 4 to 5 months on TOSSIM, always facing problems and finally my ubuntu got crashed and gave it up as i'm running shortage of time.

2. So i switched to omnet++.k But even this, i'm trying with simple tictoc tutorial , but get the error messae, Tictoc not found check .ini or .ned files. ( on windows 7, 64 bit OS).
Please answer to these two questions.
with regards
Manjula

Gireesh said...

@manjula

Sorry for the delay!!!
If you are not working with hardware, pl use any standard wireless simulator.
Omnet is the one i found the best coz it has a standard code base.

Use mixim framework in omnet (latest) and please try ubuntu or any linux flavours to Windows for a better learning experience

I will be posting a few more tutorials on Omnet and mixim for beginners

jyothi said...

hi
i got evertything you specified after this wat to do i mean how to run the pgm what will be the output, tell command as soon as possible

jyothi said...

tel me how to run the pgm plz as soon as possible

Gireesh said...

@jyothi!!!
Sorry, I could not get what you are asking
If you are asking about the output, it is there in the post!!

santosh said...

Hey Girish..
Nice tutorial.
But I faced some problem while installing it.
I was trying to install tinyos-2.1.1 on my system with os ubuntu lucid main. After installation I made the changes in shell file as you have mentioned. But then typing the command echo $MAKERULES neither showed any path nor any error.
Nevertheless I proceeded with the example code. But then got following error message.

make: *** No rule to make target `telosb'. Stop.

:(

I would be very thankful to you if you could help me with the possible problem.

hinz said...

hi, im new in tinyos and currently just starting on using it for my undergraduate project. I follow your guide on installing it and it all went well. when i tried to "make mica2" on SkelAppC, I got the following error:

mkdir -p build/mica2
compiling SkelAppC to a mica2 binary
ncc -o build/mica2/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -DIDENT_APPNAME=\"SkelAppC\" -DIDENT_USERNAME=\"ubuntu\" -DIDENT_HOSTNAME=\"ubuntu\" -DIDENT_USERHASH=0xf67b89f7L -DIDENT_TIMESTAMP=0x4f28e831L -DIDENT_UIDHASH=0xcdbe203fL -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/mica2/wiring-check.xml SkelAppC.nc -lm
avr-gcc: SkelAppC.nc: No such file or directory
make: *** [exe0] Error 1

any help will be much appreciate.
thanks

amit said...

I tried the SkelAppC program and the program runs well but as I try the Blink program I get a strange error which reads like:


In file included from /opt/tinyos-2.1.1/tos/chips/msp430/msp430hardware.h:29,
from /opt/tinyos-2.1.1/tos/platforms/telosb/hardware.h:4,
from /opt/tinyos-2.1.1/tos/system/SchedulerBasicP.nc:41:
/usr/bin/../lib/gcc/msp430/4.5.3/../../../../msp430/include/io.h:1:2: warning: #warning is deprecated, please include
In file included from /opt/tinyos-2.1.1/tos/chips/msp430/msp430hardware.h:30,
from /opt/tinyos-2.1.1/tos/platforms/telosb/hardware.h:4,
from /opt/tinyos-2.1.1/tos/system/SchedulerBasicP.nc:41:
/usr/bin/../lib/gcc/msp430/4.5.3/../../../../msp430/include/signal.h:43:2: warning: #warning msp430-libc deprecated, using
In file included from /opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:38,
from /opt/tinyos-2.1.1/tos/system/LedsC.nc:38,
from BlinkAppC.nc:45:
In component `HplMsp430GeneralIOC':
/opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:227: syntax error before `;'
/opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:321: cannot find `P30'
/opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:322: cannot find `P31'
..
..
..
/opt/tinyos-2.1.1/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:350: cannot find `P57'
In component `PlatformLedsC':
/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:48: cannot find `Port54'
/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:51: cannot find `Port55'
/opt/tinyos-2.1.1/tos/platforms/telosa/PlatformLedsC.nc:54: cannot find `Port56'
make: *** [exe0] Error 1


Can you help me out. Also Can you suggest ma a simulator like avrora for TelosB

Manjula said...

after using " sudo gedit /etc/apt/sources.list" and typing the
" deb http://tinyos.stanford.edu/tinyos/dists/ubuntu natty main"


and then when i say " sudo apt-get update" i get the following message for ununtu 11.04

please give me the solution
Err http://extras.ubuntu.com natty InRelease

Err http://extras.ubuntu.com natty Release.gpg
Unable to connect to extras.ubuntu.com:http:
Err http://tinyos.stanford.edu natty InRelease

Err http://tinyos.stanford.edu natty Release.gpg
Unable to connect to tinyos.stanford.edu:http:
Err http://security.ubuntu.com natty-security InRelease

Err http://security.ubuntu.com natty-security Release.gpg
Unable to connect to security.ubuntu.com:http: [IP: 91.189.92.166 80]
Err http://in.archive.ubuntu.com natty InRelease

Err http://in.archive.ubuntu.com natty-updates InRelease

Err http://in.archive.ubuntu.com natty Release.gpg
Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.92.171 80]
Err http://in.archive.ubuntu.com natty-updates Release.gpg
Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.92.171 80]
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/natty/InRelease

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/natty-updates/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/InRelease

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease

W: Failed to fetch http://tinyos.stanford.edu/tinyos/dists/ubuntu/dists/natty/InRelease

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Unable to connect to extras.ubuntu.com:http:

W: Failed to fetch http://tinyos.stanford.edu/tinyos/dists/ubuntu/dists/natty/Release.gpg Unable to connect to tinyos.stanford.edu:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/natty-security/Release.gpg Unable to connect to security.ubuntu.com:http: [IP: 91.189.92.166 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/natty/Release.gpg Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.92.171 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/natty-updates/Release.gpg Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.92.171 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.
manjula@manjula-desktop:~$

Manjula said...

Good evening sir
as you suggested me ( over the post), i'm planning to use omnetPP as i'm not working on any hardware.

Next does omnet++ with MiXiM supports for wireless sensor networks where nodes are mobile? because i'm working on routing in WSN where nodes are mobile.

Then would you suggest Omnet++ or ns2?
waiting for the reply and gave my priority also ( i.e routing in WSN with mobile nodes and mobile base staion)

thanking you
yours sincerely
R.Manjula

Gireesh said...

@manjula
Mixim supports mobility (it was combination of old mobility framework tself)
And it has profile for ieee 802.15.4 nodes. You just have to implement your own logic!!!

Manjula said...

Thank you sir, for the immediate reply.

jeni john said...

hello sir,
your tutorial helped me a lot.Actually I am doing project in fault tolerant routing protocol in wsn.I dont have any real mote and so have simulated initial programs like BlinkToRadio on both tossim and avrora. But really need to know that how can i simulate routing protocol n which simulator will be best for that.I have tried to go through different simulators and have wasted lot of time and now only 2 months left for the completion.please do reply as soon as possible.
jeni

Gireesh said...

@jeni

I have tried the whole application to mac for IEEE 802.15.4 based sensor networks in Omnet++ with Mobility Framework
Currently it is known as Mixim instead of Mobility framework.

Please try out that

jeni john said...

Thank you sir for your immediate reply. Surely, I will try out your suggestion.

Anonymous said...

Hello Sir, I hv installed tinyos 2.1.1 on ubuntu 10.10 but while compiling code I am getting the following error which is only for telosb ......
bipin@bipin-laptop:~/apps/Oscilloscope$ make telosb
mkdir -p build/telosb
compiling OscilloscopeAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"OscilloscopeApp\" -DIDENT_USERNAME=\"bipin\" -DIDENT_HOSTNAME=\"bipin-laptop\" -DIDENT_USERHASH=0x3cc0f314L -DIDENT_TIMESTAMP=0x4f7fae67L -DIDENT_UIDHASH=0xd3ec6486L OscilloscopeAppC.nc -lm
In file included from /opt/tinyos-2.1.1/tos/chips/msp430/msp430hardware.h:29,
from /opt/tinyos-2.1.1/tos/platforms/telosb/hardware.h:4,
from /opt/tinyos-2.1.1/tos/system/SchedulerBasicP.nc:41:
/usr/bin/../lib/gcc/msp430/4.5.3/../../../../msp430/include/io.h:1:2: warning: #warning is deprecated, please include
In file included from /opt/tinyos-2.1.1/tos/chips/msp430/msp430hardware.h:30,
from /opt/tinyos-2.1.1/tos/platforms/telosb/hardware.h:4,
from /opt/tinyos-2.1.1/tos/system/SchedulerBasicP.nc:41:
/usr/bin/../lib/gcc/msp430/4.5.3/../../../../msp430/include/signal.h:43:2: warning: #warning msp430-libc deprecated, using
In file included from /opt/tinyos-2.1.1/tos/platforms/telosa/chips/cc2420/HplCC2420PinsC.nc:54,
from /opt/tinyos-2.1.1/tos/chips/cc2420/control/CC2420ControlC.nc:65,
from /opt/tinyos-2.1.1/tos/chips/cc2420/csma/CC2420CsmaC.nc:58,
from /opt/tinyos-2.1.1/tos/chips/cc2420/CC2420RadioC.nc:62,
from /opt/tinyos-2.1.1/tos/chips/cc2420/CC2420ActiveMessageC.nc:67,
from /opt/tinyos-2.1.1/tos/platforms/telosa/ActiveMessageC.nc:65,

Insidemyhead said...

Sorry I don't understand what is the problem with compiling,I got this output:

make telosb
mkdir -p build/telosb
compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"insidemyhead\" -DIDENT_USERHASH=0x0977854dL -DIDENT_TIMESTAMP=0x507866cdL -DIDENT_UIDHASH=0x88e14ed0L BlinkAppC.nc -lm
In file included from /usr/src/tinyos-2.x/tos/platforms/telosa/PlatformLedsC.nc:38,
from /usr/src/tinyos-2.x/tos/system/LedsC.nc:38,
from BlinkAppC.nc:45:
In component `HplMsp430GeneralIOC':
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:227: syntax error before `;'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:321: cannot find `P30'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:322: cannot find `P31'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:323: cannot find `P31'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:324: cannot find `P32'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:325: cannot find `P33'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:326: cannot find `P33'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:327: cannot find `P34'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:328: cannot find `P35'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:330: cannot find `P50'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:331: cannot find `P51'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:332: cannot find `P52'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:333: cannot find `P53'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:334: cannot find `P36'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:335: cannot find `P37'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:337: cannot find `P60'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:338: cannot find `P61'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:339: cannot find `P62'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:340: cannot find `P63'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:341: cannot find `P64'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:342: cannot find `P65'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:343: cannot find `P66'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:344: cannot find `P67'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:346: cannot find `P66'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:347: cannot find `P67'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:349: cannot find `P67'
/usr/src/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOC.nc:350: cannot find `P57'
In component `PlatformLedsC':
/usr/src/tinyos-2.x/tos/platforms/telosa/PlatformLedsC.nc:48: cannot find `Port54'
/usr/src/tinyos-2.x/tos/platforms/telosa/PlatformLedsC.nc:51: cannot find `Port55'
/usr/src/tinyos-2.x/tos/platforms/telosa/PlatformLedsC.nc:54: cannot find `Port56'
make: *** [exe0] Errore 1


how can I solve it?

thanx to everybody

Nitin Patil said...

Hey, does anyone knows how to install tinyDB for tinyos-2.1.1?
need help