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 DSS Script with CCS

I am trying to open a CCS session from the DSS script as described here:
http://wiki.davincidsp.com/index.php/Debug_Server_Scripting#Debugging_Your_JavaScript

My script executes the following:

server = env.getServer("CCSServer.1");
session = server.openSession(".*");

// A breakpoint is inserted here before the script is run and waits until CCS is opened

// Next it tries to reset and load the target
session.target.reset();
session.memory.loadProgram(DSPProgramDirectory + programName);

The reset() or loadProgram() commands do not work as the script reports the exception that the functions are not found.

Please let me know if you need more information.  I tried this is CCS v4.1 and 4.0.2 with the same results.

 

  • You cannot use the CCS session for your DSS calls. You still need to get the Debug Server and over a debug session to it:

    -----------

    var env= ScriptingEnvironment.instance()

    server = env.getServer("CCSServer.1");
    session = server.openSession(".*");

    debugServer = env.getServer("DebugServer.1"); // You still need to get the Debug Server
    ....
    debugSession = debugServer.openSession(".*"); // You still need to open a Debug Session!

    // A breakpoint is inserted here before the script is run and waits until CCS is opened

    // Next it tries to reset and load the targe
    debugSession .target.reset(); // Use debugSession and NOT session
    debugSession .memory.loadProgram(DSPProgramDirectory + programName); // Use debugSession!

    -------------------

    Basically your script is exactly the same as if you were just running DSS only, except you added the below:

    server = env.getServer("CCSServer.1");
    session = server.openSession(".*");

     

    Thanks

    ki