More tracing:
void TERMIO_PutChar( char ch)
{
size_t cnt = 1;
__write_console(1, (unsigned char *)&ch, &cnt, 0L);
}
--------------------------------------------------------------------
int __write_console(__file_handle handle, unsigned char * buffer, size_t * count, __ref_con ref_con)
{
#pragma unused(handle,ref_con)
... __init_uart_console() ...
... WriteUARTN( buffer, *count ) ...
}
--------------------------------------------------------------------
UARTError __init_uart_console(void)
{
UARTError err = kUARTNoError;
static int initialized = 0;
if (initialized == 0)
{
err = InitializeUART( UART_CONSOLE_BAUD_RATE );
if (err == kUARTNoError)
initialized = 1;
}
return( err );
}
--------------------------------------------------------------------
UARTError InitializeUART(UARTBaudRate baudRate)
{
#if UART_SUPPORT_TYPE==UART_54451
baudRate = kBaud115200;
#endif
uart_init(TERMINAL_PORT, SYSTEM_CLOCK_KHZ, baudRate);
return kUARTNoError;
}
--------------------------------------------------------------------
UARTError WriteUARTN(const void* bytes, unsigned long length)
{
int count;
for (count = 0; count < length; count++) {
uart_putchar(TERMINAL_PORT, *( ((char *)bytes) + count));
}
return kUARTNoError;
}
--------------------------------------------------------------------
End result - printf() boils down to uart_init() and uart_putchar() - but these don't seem to work by themselves?