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.

CCS/OMAP-L138: Debug Server Scripting Execution on both cores issue

Part Number: OMAP-L138
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

I'm currently looking at implementing automatic testing using the OMAP-L138.  I'm able to setup scripts that will execute only on the DSP or the ARM core, but when I go to execute on both using the simultaneous member of the server class, only the DSP will cleanly execute.  The ARM execution produces the following error:

"ARM9_0: Can't Run Target CPU: (Error -2030 @ 0x52545441) Internal error: Access to unknown or invalid register was requested. Restart the application. If error persists, please report the error. (Emulation package 8.0.27.9)". 

If the only change I make to the script is to comment out the entry for the DSP session in the DebugSession array assignment I pass to the simultaneous.run() function, the ARM core will execute without any issues.

  • Hi,

    This error itself is reported in several threads where a common issue is the improper memory or core initialization, either by the absence of a GEL file or by the loaded firmware itself. Searching for error 2030 returns the following references:

    e2e.ti.com/.../240262
    e2e.ti.com/.../577403
    e2e.ti.com/.../546675

    Hope this helps,
    Rafael
  • Rafael,

    I do have the GEL file present. The following excerpt is from my script file. In the first setup:

    var debugScriptArray=new Array();
    debugScriptArray[0]=debugSessionARM;
    //debugScriptArray[1]=debugSessionDSP;
    script.traceWrite("Running the code on both the DSP and the ARM");
    debugServer.simultaneous.run(debugScriptArray);

    The ARM operates correctly and does not throw the error that I see in my original post. The second excerpt if when I do see the error:

    var debugScriptArray=new Array();
    debugScriptArray[0]=debugSessionARM;
    debugScriptArray[1]=debugSessionDSP;
    script.traceWrite("Running the code on both the DSP and the ARM");
    debugServer.simultaneous.run(debugScriptArray);

    Note that the third line of the five line snippet is now uncommented. If this line is executed in the script, the DSP core will operate correctly, while the ARM side will throw the error. There are no other changes to the configuration or the script between successful execution of the ARM core and unsuccessful execution of the ARM core.

    Ed
  • Hi Ed,
    I tried this on my OMAP-L138 target, using your JS code snippet, and both cores executed fine without error. Can you provide your full JS script? Also, what CCS version are you using?

    Thanks
    ki
  • Ki,

    The version of CCS I'm using is 8.1.0.00011.  Here is my script:

    // 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);

    //setup path variables
    var ccsInstallDir = "C:/ti/ccsv8/";
    var logFileStylesheet = ccsInstallDir + "/ccs_base/scripting/examples/DebugServerExamples/DefaultStylesheet.xsl";

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

    // Create a log file in the current directory to log script execution
    script.traceBegin("ARMDSPRunLog.xml", logFileStylesheet);

    // Log everything
    script.traceSetConsoleLevel(TraceLevel.ALL);
    script.traceSetFileLevel(TraceLevel.ALL);

    // Get the Debug Server and start a Debug Session
    debugServer = script.getServer("DebugServer.1");
    debugServer.setConfig("../ARM_Program/ARM_Program_XDS560.ccxml");

    //get the session for the ARM
    debugSessionARM = debugServer.openSession("Blackhawk XDS560v2-USB System Trace Emulator_0/ARM9_0");
    script.traceWrite("Session opened to ARM");

    //get the session for the DSP
    debugSessionDSP = debugServer.openSession("Blackhawk XDS560v2-USB System Trace Emulator_0/C674X_0");
    script.traceWrite("Session opened to DSP");

    //connect the DSP and the ARM
    debugSessionARM.target.connect();
    debugSessionDSP.target.connect();
    script.traceWrite("Session Connected to DSP and ARM, loading DSP program");

    //load the ARM ground program
    script.traceWrite("Loading ARM Ground program");
    debugSessionARM.memory.loadProgram("../ARM_Program/Debug/ARM_Program.out");

    // Load the DSP Flight program
    // (ScriptingEnvironment has a concept of a working folder and for all of the APIs which take
    // path names as arguments you can either pass a relative path or an absolute path)
    debugSessionDSP.memory.loadProgram("../DSP_Program/Debug/DSP_Program.out");


    // Restart, and go to main. If the target is configured to go to main on restart, then restarting
    // should be sufficient. Otherwise we will need to also set a breakpoint at main and run to it.
    script.traceWrite("restarting DSP and ARM");

    debugSessionARM.target.restart();
    debugSessionDSP.target.restart();

    script.traceWrite("Running the DSP and ARM");


    var addrReset=debugSessionDSP.symbol.getAddress("AP_OP_Initiate_Reset");
    var bp1=debugSessionDSP.breakpoint.add(addrReset);

    var debugScriptArray=new Array();
    debugScriptArray[0]=debugSessionARM;
    //ARM Executes with the line below commented out, the ARM errors with the line executing.
    debugScriptArray[1]=debugSessionDSP;

    script.traceWrite("Running the code on both the DSP and the ARM");
    debugServer.simultaneous.run(debugScriptArray);

    if(debugSessionDSP.memory.readRegister("PC")==addrReset)
    {
    script.traceWrite("About to reset");
    }


    script.traceWrite("TEST SUCCEEDED!");

    // All done
    debugSessionDSP.target.disconnect();
    debugSessionARM.target.disconnect();
    debugServer.stop();


    // Stop logging and exit.
    script.traceEnd();

    Thanks,

    Ed

  • After some digging around, it looks like you are running into a known issue: DBGTRC-3954 - "Group core fails to properly control the ARM/DSP cores of an OMAPL device"

    This issue is fixed with the latest emulation pack (8.1.0) that comes in CCSv9.0

    You can also try checking for updates in CCSv8 and take the latest TI Emulators update (8.1.0)

    Note that if you do update to v9.0, there is a known issue with the dss.bat file used with DSS. We will be providing a patch update in the next week or two but I can just give you the updated dss.bat file here if you need it.