Can you show me your makefile?

Kevin

On Tue, Jun 2, 2009 at 6:06 AM, Vincent Gay<[email protected]> wrote:
> Hi,
>
> I'm trying to use printf in the application 'RadioCountToLeds' running on
> top of tinyOS-2.0.2. I have some problems with wiring interfaces of printf.
>
> I have modified RadioCountToLedsAppC.nc as follows:
> configuration RadioCountToLedsAppC {}
> implementation {
>   components MainC, RadioCountToLedsC as App, LedsC;
> ...
>   components PrintfC;
>
>   App.Boot -> MainC.Boot;
> ...
>   App.PrintfControl -> PrintfC;
>   App.PrintfFlush -> PrintfC;
> }
>
> I have also modified RadioCountToLedsC.nc as follows:
> #include "printf.h"
>
>
> module RadioCountToLedsC {
>   uses {
>     ...
>     interface PrintfFlush;
>     interface PrintfControl;
>  }
> }
> implementation {
>   event void Boot.booted() {
>     call PrintfControl.start();
>     call AMControl.start();
>   }
>
>   ...
>
>   event void PrintfControl.startDone(error_t err) {
>     // do nothing
>   }
>
>   event void PrintfControl.stopDone(error_t err) {
>     // do nothing
>   }
>
>  event void PrintfFlush.flushDone(error_t err) {
>     // do nothing
>   }
>
>   event void MilliTimer.fired() {
>     counter++;
>     dbg("RadioCountToLedsC", "RadioCountToLedsC: timer fired, counter is
> %hu.\n", counter);
>     printf("RadioCountToLedsC: timer fired, counter is %hu.\n", counter);
>     call PrintfFlush.flush();
> }
>
> I have modified the Makefile to include $(TOSDIR)/tos/lib/printf/2_0_2 in
> the CFLAGS.
>
> When compiling for micaz, I get the following errors:
> mkdir -p build/micaz
>     compiling RadioCountToLedsAppC to a micaz binary
> ncc -o build/micaz/main.exe -Os -finline-limit=100000 -Wall -Wshadow
> -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
> -I/opt/tinyos-2.x/tos/lib/printf/2_0_2
> -DIDENT_PROGRAM_NAME=\"RadioCountToLed\" -DIDENT_USER_ID=\"tai\"
> -DIDENT_HOSTNAME=\"tai-desktop\" -DIDENT_USER_HASH=0xde281e84L
> -DIDENT_UNIX_TIME=0x4a253f62L -DIDENT_UID_HASH=0x5473dbafL
> -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
> -fnesc-dump='referenced(interfacedefs, components)'
> -fnesc-dumpfile=build/micaz/wiring-check.xml RadioCountToLedsAppC.nc -lm
> In file included from RadioCountToLedsAppC.nc:48:
> In component `RadioCountToLedsC':
> RadioCountToLedsC.nc:57: interface PrintfControl not found
> RadioCountToLedsC.nc: In function `Boot.booted':
> RadioCountToLedsC.nc:67: interface has no command or event named `start'
> RadioCountToLedsC.nc: At top level:
> RadioCountToLedsC.nc:84: `startDone' is not in interface `PrintfControl'
> RadioCountToLedsC.nc:88: `stopDone' is not in interface `PrintfControl'
> In file included from /opt/tinyos-2.x/tos/lib/printf/2_0_2/PrintfC.nc:53,
>                  from RadioCountToLedsAppC.nc:53:
> In component `PrintfP':
> /opt/tinyos-2.x/tos/lib/printf/2_0_2/PrintfP.nc: In function `sendNext':
> /opt/tinyos-2.x/tos/lib/printf/2_0_2/PrintfP.nc:86: warning: passing
> argument 2 of `Packet.getPayload' makes pointer from integer without a cast
> In component `RadioCountToLedsAppC':
> RadioCountToLedsAppC.nc: At top level:
> RadioCountToLedsAppC.nc:64: cannot find `PrintfControl'
> make: *** [exe0] Error 1
>
> I cannot find the tutorial modules (TestPrintf, etc.) for printf 2.0.2
> release.
>
> Does anyone have an idea about what is wrong?
>
> Thanks,
> Vincent
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
~Kevin

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to