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.

Question about dss debugging

Other Parts Discussed in Thread: TMS320C6678, CCSTUDIO

Hi All,
I don't know precisely whom to address with my question about dss.
I work with TMS320C6678 onto Windows via CCS5 and SEED-XDS560v2 USB Emulator.
I used for debugging my project dss, script below


// Import the DSS packages into our namespace to save on typing
importPackage(Packages.com.ti.debug.engine.scripting)
importPackage(Packages.com.ti.ccstudio.scripting.environment)
importPackage(Packages.java.lang)

// Configurable Parameters
var deviceCCXMLFile = "c:/Users/Borovikov_O/ikbo_dsp/soft/conf/k10sv.ccxml";
var programToLoad = "c:/Users/Borovikov_O/ikbo_dsp/app/debug/dsp.out";

// Create our scripting environment object - which is the main entry point into any script and
// the factory for creating other Scriptable ervers and Sessions
var script = ScriptingEnvironment.instance();

// Create a debug server
var ds = script.getServer( "DebugServer.1" );

// Set the device ccxml
ds.setConfig( deviceCCXMLFile );

// Open a debug session

debugSession1 = ds.openSession("SEED XDS560V2 USB Emulator/C66xx_0");
debugSession2 = ds.openSession("SEED XDS560V2 USB Emulator/C66xx_1");
debugSession3 = ds.openSession("SEED XDS560V2 USB Emulator/C66xx_2");


//connect with CPU

debugSession1.target.connect();
debugSession2.target.connect();
debugSession3.target.connect();

// Load the program
try {
debugSession1.memory.loadProgram(programToLoad);
} catch(ex) {

quit();
}
// my Attempt breakpoints
var my_str_bp = debugSession1.symbol.getAddress("dspLocalReset");
var bp1 = debugSession1.breakpoint.add(my_str_bp);
try {
var dsp_setup_str = debugSession1.symbol.getAddress("_attemptCores");
print(dsp_setup_str);
var bp2 = debugSession1.breakpoint.add(dsp_setup_str);

}catch(ex) {
quit();
}
// Run the program
try {
debugSession1.target.run();
} catch(ex) {
quit();
}

If I run my script via Scripting Console without preliminary start my project I have this


If I run my script after run my project (and after unloading project from CCS) I have this
(it's right work)

If I run my script without CCS I have this


C:\Users\Borovikov_O\ikbo_dsp\app\debug>c:\ti\ccsv5\ccs_base\scripting\bin\dss -dss.debug DebugServer01.js
Loaded FPGA Image: C:\ti\ccsv5\ccs_base\common\uscif\dtc_top.jbc

Exit from dss  is going on here 

      debugSession1.target.run();

It's don't work -  catch(ex) 

Where my errors?

Thank

      Oleg

  • Hi Oleg,

    Moved this thread to CCS Forum for faster response.

    Thank you.

  • Hi Rajasekaran,

    I will do as you advice

    Best regards,

        Oleg

  • Hi Oleg,

    if the run API is the last command in your script, then it looks like it ran successfully and hit some halt point. That would cause the API to return and the script to terminate. Is that what is going on in your case?

    ki

  • Hi Ki,

    If I run my script step-by-step I have next result:

    last successful command to my script is

    print(dsp_setup_str);

    next command is crash:

    // Run the program
    try {
    debugSession1.target.run();
    } catch(ex) {
    quit();
    }

    I am  crash in to string

       debugSession1.target.run();

    catch(ex)  - don't work

    Best regards,

      Oleg

  • Oleg Borovikov said:

    // Run the program
    try {
    debugSession1.target.run();
    } catch(ex) {
    quit();
    }

    I am  crash in to string

       debugSession1.target.run();

    catch(ex)  - don't work

    Are you getting an actual crash with an crash message? Or is rhino simply shutting down? When you single step over, does it ever step to the quit() routine?

  • Good day Mr. Lee,

    You are right, I do modify my script and I noticed that
    crash don't to invoke
    debugSession1.target.run();

    But I don't understand the behavior of my program together with my dss script
    I expect to stop the program onto breakpoint but it does not.
    Where my errors?
    Best regards
    Oleg

  • The way your script is written, it will run the target and then when you reach some halt point, it will terminate the script. The fact that the run API returns without an exception being thrown seems to suggest that a halt point was reached. The run call returned and the script terminated. To verify this, try adding an additional line to read the program counter and print out the value. It should tell you where the program was halted before the script terminated.

    Thanks

    ki

  • How do you do Mr. Lee,
    Thank you very much for your answer.
    I realized as works this script.
    Best regards,
    Oleg