AnsweredAssumed Answered

[Solved] How can I print an Integer

Question asked by la_manna.gianluca on Jul 1, 2015
Latest reply on Jul 7, 2015 by la_manna.gianluca
I use the board SPC560P-DISP.
How can I print an Integer with Tera Term through a serial connection?
I use the function chnWriteTimeout to print a string. So:

chnWriteTimeout(&SD1, (uint8_t *)"Hello World!\r\n", 14, TIME_INFINITE);

But an Integer?
I tried to use chprintf, but not working.
 It does not recognize the function chprintf. I included the header chprintf.h

uint32_t number=25;
chprintf(&SD1, "%u \n\r", number);

The error is:
main.c:(.text_vle.main+0x10c): undefined reference to `chprintf'
collect2: ld returned 1 exit status
make: *** [build/out.elf] Error 1

In the demo of SPC5 Studio for my board they use only chnWriteTimeout.

     Best regards