Question
printf problem in atollic truestudio stm32f103
Posted on December 15, 2015 at 10:05
Hello, i am new to 32Bit world
i am using Atollic Lite the update version. my IC was STM32F103C8 and STM32F10x Standard Peripherals Library Drivers update History V3.6.1. I need to use printf to print thing to USART.I saw some thread that need to attach sys_call.c and tiny_printf.c? Is that true?
i follow some thread that use the following code:
nt _write(int file, char *ptr, int len)
{ /* Implement your write code here, this is used by puts and printf for example */ int i=0; for(i=0 ; i<len ; i++) USARTSendChar((*ptr++)); //<–this is my usart code return len; } however it doesnot work.i use normal USART to dump ascii to hyperterminal was ok
can anyone help ? many thanks Jeff