[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

printf does not work



Hello,

I'm writing a BSP - it successfully compiles and links with the
application hello_world_c/test.c which uses printf to output a message.
However, the message does not appear on the console.

I wrote a console driver that uses termios and polled mode only. The
functions console_initialize() and console_open() (which tells termios
the uart_pollWrite callback function) are invoked.
Execution also reaches the application code (which calls printf), it
even returns to the bsp code (boot_card and bsp_cleanup)

But printf does not cause console_write() to be invoked. It doesn't seem
to do anything.

When I use filedes = fopen("/dev/console", "ab") and fwrite("HELLO",
5,1,filedes) the program crashes,
but: console_write() IS invoked and HELLO appears on the console.

Can anyone tell me where to look for the error?

Many thanks in advance,

Marcus

PS:

I haven't checked yet whether the clock driver works OK - Could this be
the reason (I still didn't find out whether a clock tick is mandatory?).