Tool/software: TI C/C++ Compiler
Hello,
I'm developing embedded software using code composer studio V10 with the TI optimized ARM compiler. I'm trying to use the CI/O utilities (which are really great) provided by TI on a Hercules TMS570LS09 target using the debug probe XDS200 from Digital Spectrum.
Every thing works very well, put when I try to write in a file that has been opened in append mode using fprintf or fputc, it's very very slow making it almost unusable. Indeed writing one single characters in a file takes almost 500ms. If the file is open in write mode it's more than 100 times faster.
I've already tried to change the buffering modes, with the following lines of code:
char buffer[256];
setvbuf(fp, buffer, _IOFBF, sizeof(buffer) / sizeof(buffer[0]));
But it doesn't improve the performance significantly.
Does anyone one knows why there is such a huge difference of speed between the two way of opening file? Is there a way to improve the write speed of file opened in append mode?
Thanls for your help