This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C5505 override printf

Hi,

I cannot use standard printf function (Code Composer v6) because it's too slow for my application and buffering also doesn't make sense, so can I reimplement printf function?

printf is sending data via XDS100v2 debugger and probably it's using a USART for this because USART pins are busy with debugger or it's using some other channel to send data through debugger. So, is it possible to reimplement this debugger printf module? As I see, it just sending bytes one by one like a simple polling routine, but I want to make it via interrupt or dma.

Thanks.

  • Dmitry,

    I'm not aware of an example that does this. Perhaps someone in the community has tried this before and would chime in.
    Will post back here if we can find any details for you.

    Lali
  • Hi,

    Thanks, basically I want to know how to reimplement communication protocol through XDS100v2 debugger in CCSv6 using printf, putc and fflush functions. I'm guessing it's using UART for communication and UART has DMA support, so it should be possible to speed-up this text output a bit.

    Regards

  • You don't want to mess with printf and family. Instead, re-implement the low-level unix functions open, close, read, write, lseek, unlink, and rename; printf and family use those low-level functions. You can have the low-level functions communicate to the outside world however you like. The default implementation of these functions (from the compiler RTS library) does not use UART, it uses breakpoints in the debugger. I don't know whether you are using the default functions or if you are using some sort of replacement.