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.

DSS error while CCS debugging

Hey, I'm having issues with DSS while running code composer. I'm using a simple script to read from certain memory locations. This script has worked so far, except when code composer is currently debugging. In this case, initialization (openSession()) fails with "Error initializing emulator". I'm hoping to be able to use this script while debugging in CCS, so I can halt the proccessor at some point, then run the script to get values. The script is currently be run via the provided DSS batch file. It seems that I can mirror the functionality by manually calling into the DSS API from the eclipse scripting console, but when I launch from the batch I can't openSession(). Any idea what might cause this error? Is what I'm doing supported? I tried loading my js file from the scripting console, but there are issues I would need to work through, and this isn't ideal. I'm using v5.5 and a XDS510USB

  • Hello,

    Only one debugger instance can access the same hardware target. If you already have a debug session for that target in CCS, you cannot create a new debug session for it via CCS and try to connect to it.

    What you should do is run your script from the CCS scripting console and have it use the existing debug session.

    http://processors.wiki.ti.com/index.php/Scripting_Console#Running_DSS_JavaScript_Files

    Thanks

    ki

  • I appreciate the swift response. I was afraid that might be the case. If possible then, I'd like to be able to execute the script from cmd or to the scripting console. The only real issue I've had so far is that when I try to load from the console, it messes up my directories (there are 2 other js files). This is because I use load(<filename>) with no directory; I have to admit this is a terrible idea for this exact reason. A quick google search didn't come up with an easy way to find the directory of a js file in javascript. Do you know a way to do this? There might also be a method in the DSS API. Thanks Again.

  • Murph612 said:
    A quick google search didn't come up with an easy way to find the directory of a js file in javascript. Do you know a way to do this?

    Try this:

    java.io.File( "." ).getCanonicalPath();    

    This should return the current working directory.

  • The problem with doing this is that the function will return the value of the path from where it's called; ie. the Eclipse folder. For now I might have a hacky solution (set pathname to a var before loading the file). Now I'm having issues debugging scripts called from CCS. I log messages to the console which would tell me what the error is, but these messages don't appear to be logged to the scripting console. Is there a way to view the stdout of a script called from the scripting console? Also, is it possible to run the rhino debugger with a script called from the scripting console?