This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sprintf works, but not putchar or printf

I am using Infineon XC866 and Keil uvision. I selected the LX51 Linker in the project setup. The UART is init through

///  Initialization of module 'UART (Serial Interface)'

UART_vInit();

which was done by Dave.

Sprintf works fine. And the function

// USER CODE BEGIN (MAIN_General,10)
void message( char *pucMessage )
{
 // while the character is not 0
 while (*pucMessage)
 {
  SBUF = *pucMessage++;
  while (TI == 0) {;}
  TI = 0;
 }
 return;
}
// USER CODE END

works fine.

But I can not get putchar or printf to work.

Any advise ?

0