Hi,

You might have forgotten to use 'SerialPrintfC' as a component.

Regards,
Saeid

On 11/20/2012 06:20 PM, Sean Dekker wrote:
Hi all,

There is a app in TinyOS called LedColor. I can make and install it with no problem on TelosB and it prints to screen color of the current turned on LED.

I want to use the 'printf' function in my own app, so I went ahead and add the line to my file:

#include <stdio.h>

Also I added this line to my Makefile:

PFLAGS += -I$(TOSDIR)/lib/printf

It looks like thats the only required stuff to use printf function. But while the LedColor app can be built and run very fine, my own app can not use printf function as I get the following errors while trying to build it:

mkdir -p build/telosb
    compiling RoombaSerialAppC to a telosb binary
ncc -o build/telosb/main.exe -Os -I/opt/tinyos-2.1.2/tos/lib/printf -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"RoombaSerialApp\" -DIDENT_USERNAME=\"saeid\" -DIDENT_HOSTNAME=\"amiga\" -DIDENT_USERHASH=0x2ef96b27L -DIDENT_TIMESTAMP=0x50abbb9aL -DIDENT_UIDHASH=0xe9e5907cL RoombaSerialAppC.nc -lm /opt/tinyos-2.1.2/tos/chips/cc2420/lpl/DummyLplC.nc:39:2: warning: #warning "*** LOW POWER COMMUNICATIONS DISABLED ***"

/usr/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(printf.o): In function `printf': /home/cire/mm/w/tinyos-main.git/tinyos-2.x/packaging/msp430-46/msp430-libc-20120224/src/./stdlib/printf.c:42: undefined reference to `putchar'

/usr/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(printf.o): In function `vprintf': /home/cire/mm/w/tinyos-main.git/tinyos-2.x/packaging/msp430-46/msp430-libc-20120224/src/./stdlib/printf.c:50: undefined reference to `putchar'

collect2: ld returned 1 exit status
make: *** [exe0] Error 1

Can you please tell me what can be the problem?

Thanks.


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

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

Reply via email to