printf in XMC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
OlCh_4641241
Level 1
Level 1
First like given
Hi
I would like to use printf function in my code.
In stm32, I used to implement printf function by fputc function.


int fputc(int ch,FILE *f)
{
UART_lStartTransmitPolling(&UART_0, (uint8_t*)&ch, 1);
return ch;
}

I wrote it in dave, but printf doesn't work.
Any one know about this topic?
0 Likes
1 Reply
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

See \eclipse\ARM-GCC-49\share\gcc-arm-none-eabi\samples\src\retarget

Regards,
Jesus
0 Likes