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.

monitor debugging over DSS within CCS

Other Parts Discussed in Thread: CCSTUDIO

Hello everybody,

is it possible to monitor the debug activity made via DSS within CCS4. For example when setting a breakpoint using DebugSession.debug.add(...) I would like to actually see the breakpoint being set also in CCS4 gui.

I stumbled upon the method ScriptingEnvironment.isWithinCCS() so I hoped the monitoring could be done by connecting to an existing Debug Server. But for this solution the name of the Server generated by CCS is missing.

 

Thanks,

Bjoern

  • Hi ki,

    thanks for your answer. I haven't mentioned that we use Java (not JavaScript). Isn't there anything more to do than adding startup.jar to the classpath (see picture) in order to let CCS startup parallel to the debug session?

    Haven't tried it out yet...

    (EDIT)

    okay, tried it now... Only adding the .jar file mentioned above is not enough. Some statement for starting CCS4 seems to miss. The example given in the wiki only covers JavaScript in combination with Rhino. More details regarding pure Java would be nice. I tried following example code (startup.jar is added -> see pic above) but CCS4 is not started:

    // Import all DSS packages for the Debug Server
    import com.ti.ccstudio.scripting.environment.*;
    import com.ti.debug.engine.scripting.*;

    public class dbgRun {

        public static void main(String[] args) {

            System.out.println("Hello");
           
            // Create our scripting environment object - which is the main entry point into any script and
            // the factory for creating other Scriptable ervers and Sessions

            ScriptingEnvironment env = ScriptingEnvironment.instance();
           
            //test
            System.out.println("isWithinCCS: " + env.isWithinCCS());

            DebugServer debugServer = null;
            DebugSession debugSession = null;
        
            try {
                // Get the Debug Server and start a Debug Session
                debugServer = (DebugServer) env.getServer("DebugServer.1");
                debugServer.setConfig("X:/env_CCS4/Signum Debugger conf.ccxml");
                debugSession = debugServer.openSession();

                //simple tasks for testing
                debugSession.target.connect();
                debugSession.target.reset();
                debugSession.target.runAsynch();
                debugSession.target.disconnect();
               
                debugSession.terminate();
                debugServer.stop();
               
                //Load a program
                //debugSession.memory.loadProgram("C:/Program Files/Texas Instruments/ccsv4/scripting/examples/C64/modem/Debug/modem.out");

            }
            catch (ScriptingException e) {
               
                System.out.println("ERROR" + "\n" + e.getMessage());
            }
           
        }
       
    }

     

    Thanks,

    Bjoern

  • You need the call to launch CCS:

    (CCSServer) env.getServer("CCSServer.1");

    This thread has an example:

    https://e2e.ti.com/support/development_tools/f/81/t/30904.aspx

    Thanks

    ki