This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/MSP430F1611: Not able to use printf();

Part Number: MSP430F1611


Tool/software: TI C/C++ Compiler

Dear all,

I am currently trying to use printf() to read the values that I retained from wireless data packets, and value of counters.

I am running this with SCONScript, and using MAC OS.

I get the following error, my gcc is 48 and using macports.

any help will be greatly appreicated.

scons: done reading SConscript files.

scons: Building targets ...

Compiling          build/telosb_mspgcc/projects/common/01bsp_radio_rx/01bsp_radio_rx.o

build/telosb_mspgcc/projects/common/01bsp_radio_rx/01bsp_radio_rx.c: In function ‘mote_main’:

build/telosb_mspgcc/projects/common/01bsp_radio_rx/01bsp_radio_rx.c:134:7: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]

Linking            build/telosb_mspgcc/projects/common/01bsp_radio_rx_prog

/opt/local/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(printf.o): In function `printf':

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_msp430-libc/msp430-libc/work/msp430-libc-20120224/src/./stdlib/printf.c:42: undefined reference to `putchar'

/opt/local/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(printf.o): In function `vprintf':

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_msp430-libc/msp430-libc/work/msp430-libc-20120224/src/./stdlib/printf.c:50: undefined reference to `putchar'

collect2: ld returned 1 exit status

scons: *** [build/telosb_mspgcc/projects/common/01bsp_radio_rx_prog] Error 1

scons: building terminated because of errors.