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.

Debugging printf() statements within DSS Scripting

Other Parts Discussed in Thread: TMS5703137

Hey,

I am using CCS 5 for evaluating the TI TMS570 (more precisely the TMS5703137) platform and for the ease of debbuging I implemented several printf() commands in my C-Code. When running and debbuging within the CCS 5 environment the printf() statments are shown in the CCS 5 console window. 

To make the debugging process independent from the CCS 5, I started using Debug Server Scripting, which works quite well but I can't track the printf() respectifly the stdout output. When walking through the DSS Docu, I found the debugSession.beginCIOlogging("log.txt") and debugSession.endCIOlogging() methods. But when integrating them into my DSS script it only creates an empty text file. I was searching the forum but couldn't find a specific How to Tutorial. Only one Post which deals with this problem but the problem doesn t seem to be resolved. http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/144416.aspx#521275

So what would be great if you could give me a short overview on how to implement CIO loging in my DSS script.

Thanks in advance

Max 

  • A little update:

    I added a breakpoint within my DSS script with debugSession.breakpoint.add("C$$IO$$")  and now in combination with the debugSession.beginCIOlogging() method I am able to optain a file which contains the output of the first printf() statement in my C-Code, but only the first. Why arent the other ones recorded?

    As I understood it, CCS 5 is looking for halts while running the programm. If it is halted at the CIO breakpoint, the printf() output is read an then the execution of the programm continues. Is that right? So in other words, I need to modify the DSS in a way to show the same behavoir? 

    Thanks again,

    Max

  • Next Update:

    I finally figured out that whenever a string within the printf() function is terminated with "\n" the CIO logging seems to abort. When removing this ending, everythink works fine.

    So I guess the problem is resolved.

    Max

  • I am sorry to come up with this topic again, but do you know why the DSS shows the behavoiur mentioned above? For convenince reasons it would be great to be able to keep the "\n" within the printf function.

    Thanks in advance,

    Max