[Tinyos-help] I need help.

avinash chaurasia avinash.aviank2003 at gmail.com
Fri Apr 9 06:56:11 PDT 2010


try the below code for SimpleC.nc and find out the diff with ur code.


/*filename: SimpleC.nc*/

module SimpleC{
   uses interface Boot;
}

implementation{

   event void Boot.booted(){

   }

}

Thanks
Avinash Kumar Chaurasia
Department of Computer Science
IIT Kanpur, India


On Fri, Apr 9, 2010 at 1:46 PM, Alexandre Locci Martins <
alexandre.locci at gmail.com> wrote:

> Hi
>
> 4 everyone!
> I am  a new user of  TinyOS so my question could sound a little silly, but
> I really need help.
> What is the problem?
> I written a simple code like that...
>
> /*filename: SimpleAppC.nc*/
> configuration SimpleAppC{
>
> }
> implementation{
>    components SimpleC, MainC;
>
>    SimpleC.Boot -> MainC.Boot;
> }
>
> /*filename: SimpleC.nc*/
>
> configuration SimpleC{
>    uses interface Boot;
> }
>
> implementation{
>
>    event void Boot.booted(){
>
>    }
>
> }
>
> /*Makefile*/
> COMPONENT=SimpleAppC
> include $(MAKERULES)
>
> Yes, just like on the tinyOS's site [?].
>
> But, when I try...
>
> # make micaz
> mkdir -p build/micaz
>     compiling SimpleAppC 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 -DIDENT_APPNAME=\"SimpleAppC\"
> -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"alexandre-lapto\"
> -DIDENT_USERHASH=0xf463738bL -DIDENT_TIMESTAMP=0x4bbf2905L
> -DIDENT_UIDHASH=0x7d421870L -fnesc-dump=wiring
> -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs,
> components)' -fnesc-dumpfile=build/micaz/wiring-check.xml SimpleAppC.nc -lm
> In file included from SimpleAppC.nc:12:
> In component `SimpleC':
> SimpleC.nc:12: unexpected interface reference in declaration of
> `Boot.booted'
> SimpleC.nc:12: only types and constants can be declared in configurations
> SimpleC.nc:12: syntax error before `{'
> SimpleC.nc:10: `Boot' not connected
> make: *** [exe0] Error 1
>
> I read the tutorial of  tinyOS and looks like that everything works fine.
> I have installed on my computer:
>
> ncc: 1.2.4
> nescc: 1.3.1
> gcc: gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
>
> My problem should be very simple so I ask apologise, but how I told...I
> really need help.
> Tu
>
> --
> Alexandre
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100409/4c9f3170/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 96 bytes
Desc: not available
Url : https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100409/4c9f3170/attachment.gif 


More information about the Tinyos-help mailing list