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.

TMS320C5517: printf under Load & Run

Part Number: TMS320C5517

Tool/software:

Hi, I'm trying to display text messages on the console window using printf(); under running by "Select program to load",but not work like as under Debug mode.Is any operation needed to printf() be availableon the console under load to run mode?Best regards, Takahiro Okutsu.

  • Hi Takahiro-san,

    The printf() function only print out the output to the CCS console. As long as you use the CCS to load the program through JTAG, then printf will print the output on the CCS console. If you tried to load and run a program using the headless method (like loadti), then there is no CCS console window, therefore no printf output.

    In this case you may want to use the UART output function: UART_fputs().

    Best regards,

    Ming

  • Hi,Ming-san.Thank you for your answer. In our environment, we develop, debug, and run programs by connecting a custom board using C5517 to CCS v12 and XDS100v2 (JTAG-Emulator). In this program, the intended text is displayed on the conbsole using printf, but when this program (*.out file) is loaded and run using Select program to load instead of in debug mode, printf is displayed only the first time, and the printf that should be displayed in the next event is not executed. I would like to know the cause of this and how to solve it.(Please point out any problem)Best regards,Takahiro Okutsu.

  • Hi Takahiro-san,

    I am not sure I get the difference between the "load and run programs via XDS100v2" and "when this program (*.out file) is loaded and run using Select program to load instead of in debug mode". As long as the CCS and JTAG is used to load and run a program (*.out file), then the CCS console exists, therefore the printf should display in the CCS console.

    Also I am confused about " printf is displayed only the first time". Di you mean that the printf only output on the CCS console one time and then stop working? If that is the case, the problem is in your program, i.e. the next printf did not get executed. 

    Best regards,

    Ming

  • Hi,Ming-san.Thank you for your answer.Indeed, my understanding is the same between "Debugging from debug mode on CCS by clicking "Debug button" and "program execution(run) by Selecting Run->load->Select program to load->*.out file selecting".But in my experiment, the formaer works as intended, and in the latter, only printfs(except the 1'st printf and other programed matters<-correct working continuously) not work.Then I will look into the timming of intterupt etc.If you guess or pointed out same thing wrong in my understanding or etc.Please teach me.Best regards,Takahiro Okutsu.

  • Hi Takahiro-san,

    If that is the case, then the issue is in your program or the way you use the printf is incorrect.

    The printf function is very intrusive. It disables all interrupts when executing and it is slow too. 

    If you are using the printf in the ISR or time critical tasks, there will be issues for sure.

    You may want to use the UART_fputs() function instead.

    Best regards,

    Ming