[Tinyos-help] help regarding TPSN

Prakshep Mehta prakshep at iitb.ac.in
Mon Jun 5 07:49:17 PDT 2006


Hello,

I want to use TPSN protocol for my project. I downloaded the code from 
your site and tried implementing it on tinyos 1.1.15 (for tossim). I got 
the following error:

[root at pc48 TestTPSN]# make pc
   compiling TestTPSN to a pc binary
ncc -o build/pc/main.exe -g -O0 -board=micasb -pthread -target=pc  -Wall 
-Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-nido-tosnodes=1000 
-fnesc-cfile=build/pc/app.c  TestTPSN.nc -lm
In file included from TestTPSNM.nc:42:
/opt/tinyos-1.x/tos/interfaces/TPSNsync.nc:44: warning: declaration of 
`alarm' shadows global declaration
/usr/include/unistd.h:378: warning: location of shadowed declaration
/opt/tinyos-1.x/tos/system/TPSNsyncM.nc:392: warning: declaration of 
`alarm' shadows global declaration
/usr/include/unistd.h:378: warning: location of shadowed declaration
/opt/tinyos-1.x/tos/system/GenericComm.nc:88: no match
/opt/tinyos-1.x/tos/system/SClockC.nc:38: component HPLSClock not found
/opt/tinyos-1.x/tos/system/SClockC.nc:32: expected component 
`HPLSClock', but got component 'SClockC'
/opt/tinyos-1.x/tos/system/SClockC.nc:40: no match
/opt/tinyos-1.x/tos/system/SClockC.nc:41: no match
/opt/tinyos-1.x/tos/system/SClockC.nc:38: redefinition of `HPLSClock'
/opt/tinyos-1.x/tos/system/SClockC.nc:40: no match
/opt/tinyos-1.x/tos/system/SClockC.nc:41: no match
make: *** [build/pc/main.exe] Error 1
[root at pc48 TestTPSN]#

 From the above error we understood that HPLSClock.nc is not found in 
/opt/tinyos-1.x/tos/system/ folder. So I copied it from 
/opt/tinyos-1.x/tos/interfaces/platforms/mica2 to  
/opt/tinyos-1.x/tos/system/ directory. After doing this I got the 
following error:
[root at pc48 TestTPSN]# make pc
   compiling TestTPSN to a pc binary
ncc -o build/pc/main.exe -g -O0 -board=micasb -pthread -target=pc  -Wall 
-Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-nido-tosnodes=1000 
-fnesc-cfile=build/pc/app.c  TestTPSN.nc -lm
In file included from TestTPSNM.nc:42:
/opt/tinyos-1.x/tos/interfaces/TPSNsync.nc:44: warning: declaration of 
`alarm' shadows global declaration
/usr/include/unistd.h:378: warning: location of shadowed declaration
/opt/tinyos-1.x/tos/system/TPSNsyncM.nc:392: warning: declaration of 
`alarm' shadows global declaration
/usr/include/unistd.h:378: warning: location of shadowed declaration
/opt/tinyos-1.x/tos/system/GenericComm.nc:88: no match
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.SetRate':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:72: `ETIMSK' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:72: (Each undeclared identifier 
is reported only once
/opt/tinyos-1.x/tos/system/HPLSClock.nc:72: for each function it appears 
in.)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:72: `OCIE3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:73: `TCCR3B' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:74: `TCNT3' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:75: `OCR3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:76: `TCCR3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:77: `COM3A0' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:78: `DDE3' undeclared (first use 
in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:79: `TCCR3C' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.readCounter':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:87: `TCNT3' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.setCounter':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:92: `TCNT3' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.getTime':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:99: `TCNT3' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:100: implicit declaration of 
function `bit_is_set'
/opt/tinyos-1.x/tos/system/HPLSClock.nc:100: `ETIFR' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:100: `OCF3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.intEnable':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:117: `ETIMSK' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:117: `OCIE3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `SClock.intDisable':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:121: `ETIMSK' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc:121: `OCIE3A' undeclared (first 
use in this function)
/opt/tinyos-1.x/tos/system/HPLSClock.nc: At top level:
/opt/tinyos-1.x/tos/system/HPLSClock.nc:126: old-style parameter lists 
not supported
/opt/tinyos-1.x/tos/system/HPLSClock.nc:126: warning: return-type 
defaults to `int'
/opt/tinyos-1.x/tos/system/HPLSClock.nc: In function `TOSH_INTERRUPT':
/opt/tinyos-1.x/tos/system/HPLSClock.nc:129: `TCNT3' undeclared (first 
use in this function)
make: *** [build/pc/main.exe] Error 1
[root at pc48 TestTPSN]#

 From the above error and trying to understand the code, I guess that 
ETIMSK,OCIE3A,COM3A0,DDE3,ETIFR, 
OCF3A,TCCR3B,TCNT3,OCR3A,TCCR3A,DDRE,TCCR3C are some constant or 
variables which are declared/defined in a separate file and that file is 
not included in the source package which i downloaded from the link:

http://www.ee.ucla.edu/~saurabh/time_synchronization/NesC-TPSNsync-1.1.zip

I will be thankful if you can help me solving this error as it is very 
important for my project. I really appreciate the work you people have 
done.

Thanks and regards,
Prakshep Mehta



More information about the Tinyos-help mailing list