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.

"debugSession.memory" could not be resolved or is not a field?

Hi,

          It is about DSS from Java.

          I am using the following code to lauch a CCSServer for debug, but  a line of code has a compiler error, see the highlighted. What is the problem?

 

Br,

AppleCat

 

        ScriptingEnvironment env = ScriptingEnvironment.instance();
       
        CCSServer debugServer = null;
     CCSSession debugSession = null;
    
    try     
    {
//         // Get the Debug Server and start a Debug Session
         debugServer = (CCSServer) env.getServer("CCSServer.1");
      //debugServer = (DebugServer) env.getServer("CCSServer.1");
         //debugServer.setConfig("C:/Program Files/Texas Instruments/ccsv4/scripting/examples/C64/tisim_c64xple.ccxml");
         //debugServer.setConfig("../scripting/examples/C64/tisim_c64xple.ccxml");
         //ebugSession = (CCSSession) debugServer.openSession("New_configuration");
         debugSession = (CCSSession) debugServer.openSession(".*");
                // Load a program
         debugSession.memory.loadProgram("C:/Program Files/Texas Instruments/ccsv4/scripting/examples/C64/modem/Debug/modem.out");   // debugSession.memory cannot be resolved or is not a field.
    }
         catch (Exception e)
    {
         System.out.print(""+e+" Exception catched!!");
    }

  • I'm a little confused about what you are trying to do with these lines:

            CCSServer debugServer = null;

    ...

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

    Do you really want to get the CCS Server? I am assuming want you really meant was to get a debug server and not the CCS server (which is used for launching the CCS GUI from DSS)

    In that case you should be doing something like:

             DebugServer debugServer = null;

             debugServer = (DebugServer ) env.getServer("DebugServer.1");

             debugServer.setConfig("myconfig.ccxml"); // You always need to specify a target configuration with DSS

             debugSession = debugServer.openSession(".*");
               
              // Load a program
              debugSession.memory.loadProgram("C:/Program Files/Texas Instruments/ccsv4/scripting/examples/C64/modem/Debug/modem.out");

    Thanks

    ki

     

     

  • Hi, Ki,

            Yes,  sorry for my mis-use of the CCSServer and DebugServer. I know the difference now in one of your other posts . Thank again.

    Br,

    AppleCat