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.

Tms570ls3137 Console

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

Hi,

Can I use printf function  for writing in console in Tms570ls3137 ?  Addionality, I use FreeRtos, and compiler is Code Composer

  • Hans,

    Yes, but the printf function that comes with the TI ARM C compiler uses breakpoints to implement console IO, and the console IO is scanned over JTAG.    So a) it will be time-intrusive and b) it won't give you something you can connect to over a serial port, without Code Composer.

    If you're debugging, and using the printf non-realtime say to print out cycle counts before & after some algorithm that you are benchmarking then this is probably fine. 

    If you need printf() over a UART say to run without CCS attached and without halting the processor, then the C Compiler manual explains how to map the low level IO to another device like a UART.

    I'm not aware of any canned example of this though that we can send you.  One of my colleagues has done something close though so I'll add him to this thread.

  • Thank you for reply. but I do not want to more complex thing.  I used puts(); function, but I took Dabort exception.. But I use sprintf and it works but too slow..Why is when ı use puts, take dabort fault.

  • Hans,

    Here is a simple CCS project that I've created to redirect the printf to a serial terminal.
    The project includes Halcogen configuration files.
    It uses the SCI2 that is connect to the USB port of our HDK.

    The serial communication has to be set as:

    115200 bits per second
    8 Bits data
    1 Stop (No parity)

    In the project properties, the following symbol has to be defined: UART_SUPPORT otherwise the regular printf will be used.

    Please have a try and let me know if this is useful.

    5165.Printf_Serial.zip