I have a simple test program that included syscalls.c as follows:
main()
{
while(1) { printf("OK");
delay1sec();
flashLED() // works OK
}
}
Program compiles and links OK.
My problem is that _write_r() doesn't get called for each character to
be output. The LED flashes every second as it should, but the system
seems to buffer output until about 1000 characters are stored
(internally somewhere), then _write_r() is called to dump the lot in one
go.
All syscalls.c stubs are as per documantations, i.e:
isatty_r() returns 1;
fsatst_r() stores st->st_mode = S_IFCHR; and returns 0;
write_r()
{ for (i = 0; i < len; i++) ser_Out(*p++);
}
ser_Out() is a standard UART output poll routine that has been fully
tested in isolation.
Any ideas what's going on? Are there any global buffer size variables
that need to be checked somewhere?
Thanks in advance