Hi Henning,

try to delete that "@safe()". I can remember, that it once caused some trouble
in my program.

Best,
Martin

Quoting Henning Kettler <[email protected]>:

> Hi Martin,
>
> thanks for your fast reply...
> I checked my code to see if there is any difference to yours. But it is
> absoloutely the same...
> I have appended my code at the end of this mail. It should work as it is part
> of TinyOS and delivered with TinyOS (although my TinyOS didn't have these
> code files, which confuses me a bit)
>
> Greetings,
> Henning
>
>
> And here the code:
>
> BlinkAppC.nc:
> configuration BlinkAppC
> {
> }
> implementation
> {
>   components MainC, BlinkC, LedsC;
>   components new TimerMilliC() as Timer0;
>   components new TimerMilliC() as Timer1;
>   components new TimerMilliC() as Timer2;
>
>
>   BlinkC -> MainC.Boot;
>
>   BlinkC.Timer0 -> Timer0;
>   BlinkC.Timer1 -> Timer1;
>   BlinkC.Timer2 -> Timer2;
>   BlinkC.Leds -> LedsC;
> }
>
> BlinkC.nc:
> #include "Timer.h"
>
> module BlinkC @safe()
> {
>   uses interface Timer<TMilli> as Timer0;
>   uses interface Timer<TMilli> as Timer1;
>   uses interface Timer<TMilli> as Timer2;
>   uses interface Leds;
>   uses interface Boot;
> }
> implementation
> {
>   event void Boot.booted()
>   {
>     call Timer0.startPeriodic( 250 );
>     call Timer1.startPeriodic( 500 );
>     call Timer2.startPeriodic( 1000 );
>   }
>
>   event void Timer0.fired()
>   {
>     dbg("BlinkC", "Timer 0 fired @ %s.\n", sim_time_string());
>     call Leds.led0Toggle();
>   }
>
>   event void Timer1.fired()
>   {
>     dbg("BlinkC", "Timer 1 fired @ %s \n", sim_time_string());
>     call Leds.led1Toggle();
>   }
>
>   event void Timer2.fired()
>   {
>     dbg("BlinkC", "Timer 2 fired @ %s.\n", sim_time_string());
>     call Leds.led2Toggle();
>   }
> }
>
>
>
>
>
> -------- Original-Nachricht --------
> > Datum: Tue, 27 Oct 2009 12:55:21 +0100
> > Von: [email protected]
> > An: Henning Kettler <[email protected]>
> > CC: [email protected]
> > Betreff: Re: [Tinyos-help] Problems compiling Blink for an IRIS mote
>
> > Hi Henning,
> >
> > could it be, that your code has some mistakes? Your configuration looks
> > for the
> > main component, which is not specified. That's the problem.
> >
> > Be sure, that your BlinkAppC looks like this:
> >
> > configuration BlinkAppC
> > {
> > }
> > implementation
> > {
> >   components MainC, BlinkC, LedsC;
> >   components new TimerMilliC() as Timer0;
> >   components new TimerMilliC() as Timer1;
> >   components new TimerMilliC() as Timer2;
> >
> >   BlinkC -> MainC.Boot;
> >
> >   BlinkC.Timer0 -> Timer0;
> >   BlinkC.Timer1 -> Timer1;
> >   BlinkC.Timer2 -> Timer2;
> >
> >   BlinkC.Leds -> LedsC;
> > }
> >
> > Where BlinkC denotes my Module, where I put the logic (in this case blink
> > logic)
> > in.
> >
> > I hope, this works.
> >
> > Best,
> > Martin
> >
> > Quoting Henning Kettler <[email protected]>:
> >
> > > Hello everyone,
> > >
> > > I've got a problem compiling the Blink - tutorial for my IRIS mote.
> > >
> > > At first here is my configuration
> > > I'm running Windows XP and have Motworks installed, which was delivered
> > with
> > > my IRIS mote. As programmer I'm using the mib520.
> > >
> > > I have gone through the tutorials delivered with my mote and was able to
> > > install them all on my motes without any problems (neither compilation
> > or
> > > programming problems).
> > > So I tried the Blink - lesson on this site
> > > (http://docs.tinyos.net/index.php/Getting_Started_with_TinyOS) and
> > downloaded
> > > the Blink source files (http://www.tinyos.net/tinyos-2.x/apps/Blink/),
> > > because I couldn't locate them anywhere in my TinyOS folders.
> > > So after I put them in a subfolder in /apps, I opened the files in
> > > Programmers Notepad and hit the 'make iris' button in the tools menu,
> > which
> > > ended up with a big bunch of errors (listed at the end of this mail)...
> > >
> > > Does anybody know why these errors occur? I've got a feeling that the
> > TinyOS
> > > - Version which was installed during the Moteworks - installation
> > process is
> > > a kind of customized TinyOS, or just an old version...
> > >
> > > I have tried to modify the code to get it running, but elemenating one
> > error
> > > got me to five new one...
> > >
> > > Regards,
> > > Henning
> > >
> > > Here is the list of errors that showed up into my output window in
> > > programmers notpad (which is the same when I type 'make iris' in
> > cygwin).
> > >
> > >
> > > > "C:\Crossbow\PN\IDE.bat"
> > > "C:\Crossbow\cygwin\opt\MoteWorks\apps\henning\Blink\"
> > > "C:\Crossbow\cygwin\bin" "make iris"
> > > #############################
> > > Command:   make iris
> > > Cygwin:    C:\Crossbow\cygwin\bin
> > > Directory: C:\Crossbow\cygwin\opt\MoteWorks\apps\henning\Blink\
> > > "/opt/MoteWorks/tools/bin/ide.pl 'make iris'
> > > 'C:\Crossbow\cygwin\opt\MoteWorks\apps\henning\Blink\'"
> > > #############################
> > > ide.pl Ver:$Id: ide.pl,v 1.1.2.1 2006/05/29 07:22:52 lwei Exp $
> > > Executing: /opt/MoteWorks/apps/henning/Blink/ bash -c "make iris"
> > > mkdir -p build/iris
> > >     compiling BlinkAppC to a iris binary
> > > ncc -o build/iris/main.exe -Os -finline-limit=100000 -DPLATFORM_MICAZC
> > > -I%T/platform/iris -I%T/lib/Queue -I%T/sensorboards/micasb
> > > -I%T/lib/Broadcast -I%T/lib/XLib    -DROUTE_PROTOCOL=0x90
> > -I%T/radio/rf230
> > > -I%T/lib/internal/XMesh -DMULTIHOPROUTER=XMeshRouter -Wall -Wshadow
> > > -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=iris
> > -fnesc-cfile=build/iris/app.c
> > > -board=micasb -DIDENT_PROGRAM_NAME="BlinkAppC"
> > > -DIDENT_PROGRAM_NAME_BYTES="66,108,105,110,107,65,112,112,67,0"
> > > -DIDENT_USER_ID="pg09" -DIDENT_USER_ID_BYTES="112,103,48,57,0"
> > > -DIDENT_HOSTNAME="pool-kn02"
> > > -DIDENT_HOSTNAME_BYTES="112,111,111,108,45,107,110,48,50,0"
> > > -DIDENT_USER_HASH=0xbdc96382L -DIDENT_UNIX_TIME=0x4ae6c74eL
> > > -DRF230_DEF_CHANNEL=11  -DRF230_TXPOWER=TXPOWER_MAX BlinkAppC.nc -lm
> > > In component `BlinkAppC':
> > > BlinkAppC.nc:45: component MainC not found
> > > In file included from BlinkAppC.nc:45:
> > > In component `BlinkC':
> > > BlinkC.nc:39: unknown attribute `safe'
> > > BlinkC.nc:39: empty scalar initializer
> > > BlinkC.nc:39: (near initialization for `...@safe')
> > > In file included from /opt/MoteWorks/tos/interfaces/Timer.nc:19,
> > >                  from BlinkC.nc:41,
> > >                  from BlinkAppC.nc:45:
> > > In C file:
> > > /opt/MoteWorks/tos/interfaces/Timer.h:19: redefinition of `TIMER_REPEAT'
> > > /opt/MoteWorks/tos/interfaces/Timer.h:19: previous declaration of
> > > `TIMER_REPEAT'
> > > /opt/MoteWorks/tos/interfaces/Timer.h:20: redefinition of
> > `TIMER_ONE_SHOT'
> > > /opt/MoteWorks/tos/interfaces/Timer.h:20: previous declaration of
> > > `TIMER_ONE_SHOT'
> > > /opt/MoteWorks/tos/interfaces/Timer.h:21: redefinition of `NUM_TIMERS'
> > > /opt/MoteWorks/tos/interfaces/Timer.h:21: previous declaration of
> > > `NUM_TIMERS'
> > > In file included from BlinkAppC.nc:45:
> > > In component `BlinkC':
> > > BlinkC.nc:41: syntax error before `TMilli'
> > > BlinkC.nc:42: syntax error before `TMilli'
> > > BlinkC.nc:43: syntax error before `TMilli'
> > > In file included from BlinkAppC.nc:45:
> > > BlinkC.nc:45: interface Boot not found
> > > BlinkC.nc:50: `booted' is not in interface `Boot'
> > > BlinkC.nc: In function `Boot.booted':
> > > BlinkC.nc:51: `Timer0' undeclared (first use in this function)
> > > BlinkC.nc:51: (Each undeclared identifier is reported only once
> > > BlinkC.nc:51: for each function it appears in.)
> > > BlinkC.nc:52: `Timer1' undeclared (first use in this function)
> > > BlinkC.nc:53: `Timer2' undeclared (first use in this function)
> > > BlinkC.nc: At top level:
> > > BlinkC.nc:57: unknown interface `Timer0'
> > > BlinkC.nc: In function `Timer0.fired':
> > > BlinkC.nc:59: interface has no command or event named `led0Toggle'
> > > BlinkC.nc: At top level:
> > > BlinkC.nc:63: unknown interface `Timer1'
> > > BlinkC.nc: In function `Timer1.fired':
> > > BlinkC.nc:65: interface has no command or event named `led1Toggle'
> > > BlinkC.nc: At top level:
> > > BlinkC.nc:69: unknown interface `Timer2'
> > > BlinkC.nc: In function `Timer2.fired':
> > > BlinkC.nc:71: interface has no command or event named `led2Toggle'
> > > In component `BlinkAppC':
> > > BlinkAppC.nc: At top level:
> > > BlinkAppC.nc:46: component TimerMilliC not found
> > > BlinkAppC.nc:46: component `TimerMilliC' is not generic
> > > BlinkAppC.nc:47: component `TimerMilliC' is not generic
> > > BlinkAppC.nc:48: component `TimerMilliC' is not generic
> > > BlinkAppC.nc:51: cannot find `Boot'
> > > BlinkAppC.nc:53: cannot find `Timer0'
> > > BlinkAppC.nc:54: cannot find `Timer1'
> > > BlinkAppC.nc:55: cannot find `Timer2'
> > > make: *** [exe0] Error 1
> > >
> > > > Process Exit Code: 0
> > > > Time Taken: 00:02
> > > --
> > > Neu: GMX DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
> > > http://portal.gmx.net/de/go/dsl02
> > > _______________________________________________
> > > Tinyos-help mailing list
> > > [email protected]
> > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > >
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
>
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to