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.

callStack.print() does not print the call stack on the std out.

I am using the scripting console of Code Composer Studio 4.2.4.00033 ( for EzDSP28335). I have two questions:

1.     Through my javascript, I try to print the call stack using the following piece of code:

exit1 = debugSession.symbol.getAddress('exit')
bp2 = debugSession.breakpoint.add(exit1)
debugSession.target.run()
debugSession.callStack.print()

But i dont get the call stack printed. (The documentation says that the API would print all frames of the current call stack to stdout on this target)

 

2.  Also, I wanted to verify the functionality of "clock.enableAutoreset()". So, I have the following piece of code (again a javascript, running through the scripting console)

debugSession.clock.enable()
debugSession.clock.reset()
debugSession.clock.enableAutoreset()
debugSession.target.runAsynch()
debugSession.target.halt()
cycles1 = debugSession.clock.read()
debugSession.target.runAsynch()
debugSession.target.halt()
cycles2 = debugSession.clock.read()
debugSession.target.runAsynch()
debugSession.target.halt()
cycles3 = debugSession.clock.read()

However, I expect that cycles1, cycles2 and cycles3 should have the same value. However, I found that there is a huge difference (more than 25% at times). Is there something wrong in my code or understanding??

I need to admit that I am new to code composer studio and DSS.

Thanks in advance,

 

Regards
Sudheer

 

  • Hi Sudheer,

    It is hard to determine what the cause of the issues are without a reproducible test case. Please provide the a test case (project + source files + javascripts). This will help us with our investigations.

    Thanks

    ki

  • 8233.TI.zip

    I have attached the project folder and my javascript. As mentioned earlier, I feed this javascript file from View->Scripting Console->execCmdFile < .js > file.

    I expect the call stack frames to be printed on the scripting console. Am I expecting correctly??

  • Forgot to mention, the second issue I asked about "clock.enableAutoreset()" is resolved.

    Once again thanks in advance,

    Regards
    Sudheer

     

  • Sudheer

    sugam sudheer said:
    I have attached the project folder and my javascript. As mentioned earlier, I feed this javascript file from View->Scripting Console->execCmdFile < .js > file.

    You should be using loadJSFile command instead. execCmdFile is for playing back console commands.

    sugam sudheer said:
    I expect the call stack frames to be printed on the scripting console. Am I expecting correctly??

    according to the documentation, the output would go to stdout of the target. So I don;t think it would go to the scripting console...

    ki