manjula@manjula-desktop:~/Blink$ make micaz sim
mkdir -p simbuild/micaz
  placing object files in simbuild/micaz
  writing XML schema to app.xml
  compiling BlinkAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim 
-fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido- -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=\"manjula\" 
-DIDENT_HOSTNAME=\"manjula-desktop\" -DIDENT_USERHASH=0xcbc93b00L 
-DIDENT_TIMESTAMP=0x4e9d2687L -DIDENT_UIDHASH=0x7d4166f8L 
-I/usr/lib/python2.6/include     -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
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$isOn’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:57: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:57: error: (Each undeclared 
identifier is reported only once
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:57: error: for each function it 
appears in.)
/opt/tinyos-2.1.1/tos/lib/tossim/TossimActiveMessageC.nc: In function 
‘TossimActiveMessageC$Model$receive’:
/opt/tinyos-2.1.1/tos/lib/tossim/TossimActiveMessageC.nc:105: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$sim_scheduler_event_handle’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:78: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$Scheduler$init’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:163: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$popTask’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:114: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$Alarm$getAlarm’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:227: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/AlarmToTimerC.nc: In function 
‘AlarmToTimerC$0$start’:
/opt/tinyos-2.1.1/tos/lib/timer/AlarmToTimerC.nc:49: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/AlarmToTimerC.nc: In function 
‘AlarmToTimerC$0$fired$runTask’:
/opt/tinyos-2.1.1/tos/lib/timer/AlarmToTimerC.nc:65: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$Alarm$stop’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:205: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc: In function 
‘VirtualizeTimerC$0$updateFromTimer$runTask’:
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc:104: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$getStartTime’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:54: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$isWaiting’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:133: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$pushTask’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:140: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$setOcr0’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:82: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$cancel_compare’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:570: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$notify_changed’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:111: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$cancel_overflow’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:538: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$schedule_new_overflow’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:530: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$Timer0$set’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:301: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$Compare$fired’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:153: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc: In function 
‘VirtualizeTimerC$0$startTimer’:
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc:135: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$getEuid’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:48: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$setEuid’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:51: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$turnOff’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:78: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$sim_mote_boot_handle’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:153: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$Counter$get’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:173: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$last_zero’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:101: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc: In function 
‘VirtualizeTimerC$0$fireTimers’:
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc:68: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc: In function 
‘SimSchedulerBasicP$sim_scheduler_submit_event’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimSchedulerBasicP.nc:70: error: ‘tos_state’ 
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$Alarm$startAt’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:215: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function 
‘Atm128AlarmAsyncP$0$setInterrupt’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:113: error: 
‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘HplAtm128Timer0AsyncP$schedule_new_compare’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:260: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In 
function ‘INTERRUPT_16’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:93: 
error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘sim_mote_set_start_time’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:120: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘SimMoteP$SimMote$turnOn’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:65: error: ‘tos_state’ undeclared 
(first use in this function)
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function 
‘sim_mote_enqueue_boot_event’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:162: error: ‘tos_state’ undeclared 
(first use in this function)
make: *** [sim-exe] Error 1
manjula@manjula-desktop:~/Blink$ 

R.MANJULA


From: tinyos-help-requ...@millennium.berkeley.edu
Sent: Tue, 18 Oct 2011 00:33:37 
To: tinyos-help@millennium.berkeley.edu
Subject: Tinyos-help Digest, Vol 102, Issue 33
Send Tinyos-help mailing list submissions to

   tinyos-help@millennium.berkeley.edu



To subscribe or unsubscribe via the World Wide Web, visit

   https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



or, via email, send a message with subject or body 'help' to

   tinyos-help-requ...@millennium.berkeley.edu



You can reach the person managing the list at

   tinyos-help-ow...@millennium.berkeley.edu



When replying, please edit your Subject line so it is more specific

than "Re: Contents of Tinyos-help digest..."





Today's Topics:



   1. help: implicit declaration of function `TCAST'

      (srikanth pasumarthy)

   2. Re: Global Variables (Michael Schippling)

   3. Re: Custom modules. (Michael Schippling)





----------------------------------------------------------------------



Message: 1

Date: Mon, 17 Oct 2011 20:18:28 +0530

From: srikanth pasumarthy <pasumarthysrika...@gmail.com>

Subject: [Tinyos-help] help: implicit declaration of function `TCAST'

To: tinyos-help@millennium.berkeley.edu

Message-ID:

   <cagbf7o2we_vch7dkl6r7qxs_ppugpk2d8250w8rcoxoqjdr...@mail.gmail.com>

Content-Type: text/plain; charset="iso-8859-1"



Hi all,

   I am working on GPIO usage on Iris motes. While using 
AtmegaGeneralIOP.nc

component it is giving the following error log for all functions:



/opt/MoteWorks/tos/platform/atm1281/AtmegaGeneralIOP.nc: In function

`Pin.isOutput':

/opt/MoteWorks/tos/platform/atm1281/AtmegaGeneralIOP.nc:57: implicit

declaration of function `TCAST'

/opt/MoteWorks/tos/platform/atm1281/AtmegaGeneralIOP.nc:57: syntax error

before `volatile'



In one of the post in this forum I found this one -

https://www.millennium.berkeley.edu/pipermail/tinyos-devel/2008-February/002504.html.

But couldn't understand what he is trying to say, as I didn't find any of

the folder/file name he is mentioning.



Thanks.

Srikanth.



Find the attached code of AtmegaGeneralIOP.nc for your reference.



generic module AtmegaGeneralIOP(uint8_t port_addr,

                uint8_t ddr_addr,

                uint8_t pin_addr) 
@safe()

{

    provides interface GeneralIO as Pin[uint8_t bit];

}



implementation

{

#define pin (*TCAST(volatile uint8_t * ONE, pin_addr))

#define port (*TCAST(volatile uint8_t * ONE, port_addr))

#define ddr (*TCAST(volatile uint8_t * ONE, ddr_addr))



    inline async command bool Pin.get[uint8_t bit]() { return (pin 
&

(1<<bit)) != 0; }

    inline async command void Pin.set[uint8_t bit]() { port |= 
1<<bit; }

    inline async command void Pin.clr[uint8_t bit]() { port &= 
~(1<<bit); }

    inline async command void Pin.toggle[uint8_t bit]() { atomic port 
^= 1

<<bit; }



    inline async command void Pin.makeInput[uint8_t bit]() { ddr 
&=

~(1<<bit); }

    inline async command bool Pin.isInput[uint8_t bit]() { return 
(ddr &

(1<<bit)) == 0; }

    inline async command void Pin.makeOutput[uint8_t bit]() { ddr |= 
1<<bit;

}

    inline async command bool Pin.isOutput[uint8_t bit]() { return 
(ddr &

(1<<bit)) != 0;}

}

-------------- next part --------------

An HTML attachment was scrubbed...

URL: 
https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20111017/fbc60b8f/attachment.html
 



------------------------------



Message: 2

Date: Mon, 17 Oct 2011 10:45:42 -0600

From: Michael Schippling <sc...@santafe.edu>

Subject: Re: [Tinyos-help] Global Variables

To: Manjunath Doddavenkatappa <dodda...@comp.nus.edu.sg>

Cc: tinyos forum <tinyos-help@millennium.berkeley.edu>

Message-ID: <4e9c5bb6.6040...@santafe.edu>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed



I was never able to get the names to resolve...

Instead I have an interface method that passes

a pointer to the "global" around to everyone else.

Do you have a good trick to avoid that?



thx

MS



Manjunath Doddavenkatappa wrote:

> I used use a separate component that allocates global variables. I am not 

> sure whether there is more appropriate way...

> 

> Manjunath D

> 

> 
################################################################################################################

> 
***************************************************************************************************************

> 

> On Mon, 17 Oct 2011, wasif masood wrote:

> 

>> Hi all,

>>

>> I am wondering is it possible to define a global variable in nesC 
which is

>> to be visible to all components in the project? If not, what are other 
good

>> approaches against that?

>>

>> BR,

>> Wasif Masood

>>

> _______________________________________________

> Tinyos-help mailing list

> Tinyos-help@millennium.berkeley.edu

> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help





------------------------------



Message: 3

Date: Mon, 17 Oct 2011 10:51:01 -0600

From: Michael Schippling <sc...@santafe.edu>

Subject: Re: [Tinyos-help] Custom modules.

To: Jude Allister <j.alliste...@gmail.com>

Cc: Tinyos-help@millennium.berkeley.edu

Message-ID: <4e9c5cf5.4020...@santafe.edu>

Content-Type: text/plain; charset=ISO-8859-1; format=flowed



The doc/tutorial describes how to do this with the "config" file.



For a simple example, I think the Blink demo app has a config

file that links in a couple of external modules. Or look for

an app that has multiple .nc files (in T1 SimpleCmd has more

than one source file) and see how it works.



MS



Jude Allister wrote:

> I have created a module that provides 3 interfaces.  It is called 

> "LEDModuleC.nc" and it includes a .h file containing things that module 

> needs.

> 

> I am having trouble testing it in a different application now.  Is 
there 

> a specific file-name format I must give it instead of LEDModuleC.nc?  

> How do I tell my test application where to find it? Do I just #include 

> "LEDModuleC.nc" ??

> 

> I was under the impression that if I put them all in the same folder, 

> the "uses" statements in the test application would make nesC look for 

> the stuff in LEDModuleC.nc.  I guess this isn't the case?

> 

> 

> also, I am a bit confused either way about what would go in my 

> TestAppC.nc and TestC.nc files to use the new module.  I looked at a 
bit 

> of the TinyOS examples/library files and I'm still not quite getting it.

> 

> Right now:

> 

> TestC.nc:

> // 3 interfaces provided by LEDModuleC.nc

>     uses interface LEDCycler;

>     uses interface LEDBlinker;

>     uses interface LEDPulser;

> 

> TestAppC.nc

> 

> // can't exactly figure this part out.

> 

> 

> Hopefully this is something quick/minor to work out.

> 

> Thank you

> 

> 

> 

> 

> 

> ------------------------------------------------------------------------

> 

> _______________________________________________

> Tinyos-help mailing list

> Tinyos-help@millennium.berkeley.edu

> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help





------------------------------



_______________________________________________

Tinyos-help mailing list

Tinyos-help@millennium.berkeley.edu

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



End of Tinyos-help Digest, Vol 102, Issue 33

********************************************

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

Reply via email to