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.

TMDSCNCD280025C: Unable to download executable using CCSv1030

Part Number: TMDSCNCD280025C

HI All,

I used to download the executable using the following command format using dss.bat which was working fine till CCS v1010

C:\ti\ccs1010\ccs\ccs_base\SCRIPT~1/bin/dss.bat <SCRIPTINGPATH>/runProgram_generic.js <CCXMLFILE> <EXECUTABLENAMEWITHPATH> "*" C28xx_CPU1 "TI_F28002x" "*"'

But starting from CCS v1030,the arguments I am passing after javascript file is not at all considered and getting the error because of that.

C:\ti\ccs1030\ccs\ccs_base\SCRIPT~1/bin/dss.bat <SCRIPTINGPATH>/runProgram_generic.js <CCXMLFILE> <EXECUTABLENAMEWITHPATH> "*" C28xx_CPU1 "TI_F28002x" "*"'

*** User inputs:
Target Configuration: undefined
Program Name: undefined
Board Name: unspecified (connect to first board)
CPU Name: unspecified (connect to first CPU)

*** Starting debug session...
SEVERE: Cannot read System Setup data from XML file 

Though I am maintaining the same order as recommended by the usage example 

Usage: dss [-dss.debug] [-dss.workspace WORKPLACE_FOLDER] DSS_JAVASCRIPT_FILE  [optional script arguments]

Can you tell me what is happening?



  • Hi Aditya,

    There were some updates made to the dss.bat file in CCS 10.3.0. But it should not have broken existing scripts. Can you share your *.js file? You can start a private E2E conversation with me if you do not wish to share publicly



  • Hi Ki,

    Here is the script I am using. You have to rename this as .js after downloading at your end.

     * This sample script loads and runs a specified program on a 
     * specified target. 
     * Usages:
     *   dss runProgram.js myTargetConfig.ccxml myProgramFile.out
     *   dss runProgram.js myTargetConfig.ccxml myProgramFile.out <BoardName>
     *   dss runProgram.js myTargetConfig.ccxml myProgramFile.out <BoardName> <CPUName>
     * Requirement:
     *   <INSTALL DIR>\ccsv4\scripting\bin must be in your system path.
     * You can copy and modify this script to suit your needs.
     * Copyright 2010-2015 The MathWorks, Inc.
    // Import the DSS packages into the namespace;
    // Define parameters ----------------------------
    var targetConfig;           // (user input) target configuration file
    var programName;            // (user input) program to load
    var boardName;              // (user input) board to use (optional) 
    var cpuName;                // (user input) CPU to use (optional) 
    var waitForHalt = 0;        // wait for program to halt before exiting
    var enableLogging = 0;              // enable logging
    var logFile = "RunProgramLog.xml";  // file where trace info is stored
    // Get the input parameters ---------------------
    var input = getArgs();
    programName  = input.programName;
    targetConfig = input.targetConfig;
    boardName    = input.boardName;
    cpuName      = input.cpuName;
    // Create/configure scripting object -------------
    // Create the scripting environment object
    var script = ScriptingEnvironment.instance();
    // Set the time out to 180 seconds
    // (comment this if you want to wait indefinitely)
    // Set up logging -------------------------------
    if (enableLogging) {
        // Create a log file in the current directory to log script execution
        script.traceBegin(logFile, "DefaultStylesheet.xsl");
        // Log everything
    // Set up the debug session ----------------------
    print("\n*** Starting debug session...");
    // Get the Debug Server
    debugServer = script.getServer("DebugServer.1");
    // Start a Debug Session
    try {
        debugSession = debugServer.openSession(boardName, cpuName);
    catch (ex) {
        print("*** Cannot create a valid debug session for Board/CPU=" + boardName + "/" + cpuName + ".\n" + 
              "    Make sure this matches only one board and one CPU.\n" + 
              "    Exiting...\n");
    print("*** Debug Session Name: " + debugSession.getName());
    print("*** Board Name: " + debugSession.getBoardName());
    print("*** CPU Name: " + debugSession.getCPUName());
    // Connect to the target -------------------------
    try {
        print("\n*** Connecting to target...");
    catch (ex) {
        // ignore if connect() fails - it may not be supported    
    // Reset the target -------------------------------;
    // Load the program -------------------------------
    print("\n*** Loading the program to the target...")
    // Restart the program ----------------------------;
    // Run the program --------------------------------
    // runAsynch() returns control immediately - it does not wait for program to halt;
    if ( {
        print("\n*** Program failed to run. Exiting...");
    else {
        print("*** Program is running.");
    // Wait for the program to halt -------------------
    if (waitForHalt) {
        print("\n*** Waiting for program to halt...");
        // Wait for the program to halt;
        if ( {
            print("\n*** Program is now halted.");
    // Disconnect from target --------------------------
    try {
        print("\n*** Disconnecting from target...");;
    catch (ex) {
        // ignore if disconnect() fails - it may not be supported    
    // All done -----------------------------
    print("\n*** Terminating debug session...");
    print("\n*** LOAD & RUN DONE.");
     * Get arguments from the command-line. 
    function getArgs()
        var args = {};
        var arguments = this.arguments;
        if ((arguments.length<2) && (arguments.length>4))
                "ERROR: You did not specify the correct number of arguments.\n" + 
                "Usage: dss runProgram.js <targetConfigurationFile> <programFile>\n" +        
                "Usage: dss runProgram.js <targetConfigurationFile> <programFile> <boardName>\n" +
                "Usage: dss runProgram.js <targetConfigurationFile> <programFile> <boardName> <cpuName>\n"); 
            delete args;
        // Required inputs
        args.targetConfig = arguments[0];
        args.programName  = arguments[1];
        print("\n*** User inputs: ");
        print("    Target Configuration: " + args.targetConfig);
        print("    Program Name: " + args.programName);
        if (arguments.length >= 3) {
            args.boardName = arguments[2];
            print("    Board Name: " + args.boardName);
        else {
            args.boardName = "*";  // first board
            print("    Board Name: unspecified (connect to first board)");
        if (arguments.length == 4) {
            args.cpuName = arguments[3];
            print("    CPU Name: " + args.cpuName);
        else {
            args.cpuName = "*";  // first CPU on first board
            print("    CPU Name: unspecified (connect to first CPU)");
        return args;
     * Exit the script
    function exitScript()
        if (enableLogging)
            script.traceEnd(); // stop logging

    You have to run the following command

    C:\ti\ccs1030\ccs\ccs_base\SCRIPT~1/bin/dss.bat <scriptPath>/runProgram_generic.js <CXMLFilePath>/F280025C.ccxml "<executablePath>/F28002~1.OUT" "*" C28xx_CPU1 "TI_F28002x" "*"



  • Thank you for the script. There appears to be two bugs with the dss.bat in CCs 10.3.0. Well, one is a bug while the other looks like a limitation. As a workaround, I would suggest using the dss.bat from CCS 10.1.0 with CCS 10.3.0 (you can replace the dss.bat in 10.3.0 with the one from CCS 10.1.0 - they are compatible). 



  • I filed a bug for the the issues I mentioned above. Tracking link:



  • The attached update should resolve both issues.

    @echo off
    REM *************************************************************************
    REM This script is used to run JavaScript-based DSS scripts.
    REM If eclipsec.exe is present, it will use the headless script launcher
    REM to run the script
    REM Otherwise, it does this by setting up the necessary environment and invoking the
    REM Rhino Javascript engine.
    REM Usage: dss [-dss.debug] [-dss.workspace WORKPLACE_FOLDER] DSS_JAVASCRIPT_FILE  [optional script arguments]
    REM *************************************************************************
    set DEBUGSERVER=%~dp0..\..\DebugServer
    if not exist "!DEBUGSERVER!\..\..\eclipse\eclipsec.exe" (
    	REM if eclipsec.exe is not present, use the old way of launching the script 
    REM Read the command line args looking for dss.debug or dss.workspace.
    set WORKSPACE=-data @user.home/workspace
    set OTHERARGS=
    REM A goto loop needs to be used here to prevent wildcard expansion. For loops always expand wildcards.
    if "%~1" neq "" (
    		set WORKSPACE=-data "%~1"
    	) else if "%~1" == "-dss.debug" (
    		set DEBUG_FLAG=-dss.debug
    	) else if "%~1"=="-dss.workspace" (
    	) else (
    		set OTHERARGS=!OTHERARGS! "%~1"
    	shift /1
    	goto :readargs
    Rem We should have matched everything but the script and optional script args. If not, there's an error.
    if "%OTHERARGS%" EQU "" (
    	echo Usage: dss [-dss.debug] [-dss.workspace WORKPLACE_FOLDER] DSS_JAVASCRIPT_FILE  [optional script arguments]
    	goto THEEND
    REM use the headless script launcher
    !DEBUGSERVER!\..\..\eclipse\eclipsec.exe -nosplash -application com.ti.ccstudio.apps.runScript -product com.ti.ccstudio.branding.product %DEBUG_FLAG% -dss.rhinoArgs %WORKSPACE% "%OTHERARGS%"
    goto THEEND
    REM Path to Rhino JAR File
    set RHINO_JAR="!DEBUGSERVER!\packages\ti\dss\java\js.jar"
    REM Path to DVT Scripting JAR File
    set DVT_SCRIPTING_JAR="!DEBUGSERVER!\..\dvt\scripting\dvt_scripting.jar"
    REM Path to DebugServer JAR File
    set SCRIPTING_JARS="!DEBUGSERVER!\packages\ti\dss\java\dss.jar"
    REM If this is CCS (rather than stand-alone DSS) also add Eclipse's Equinox Launcher JAR to to the classpath
    REM (need to modify to match the version of the JAR of the current version in Eclipse
    if exist "!DEBUGSERVER!\..\..\eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar" (
    	set SCRIPTING_JARS=!SCRIPTING_JARS!;"!DEBUGSERVER!\..\..\eclipse\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
    REM Name of Rhino Shell Java Application
    REM Name of Rhino Debugger Java Application
    REM add path to Windows 32-bit on Windows 64-bit (WOW64) folder for 64bit Windows to use the 32bit applications.
    if exist "!SYSTEMROOT!\SysWOW64\" set PATH=!SYSTEMROOT!\SysWOW64\;!PATH!
    REM If the user chose to install the JRE with this DSS install - use that JRE. 
    if exist "!DEBUGSERVER!\..\jre" (
    	set JAVA_HOME=!DEBUGSERVER!\..\jre
    	set PATH=!DEBUGSERVER!\..\jre\bin;!PATH!
    REM If this CCS (rather than stand-alone DSS) the installed jre is in \eclipse\jre
    if exist "!DEBUGSERVER!\..\..\eclipse\jre" (
    	set JAVA_HOME=!DEBUGSERVER!\..\..\eclipse\jre
    	set PATH=!DEBUGSERVER!\..\..\eclipse\jre\bin;!PATH!
    REM Launch Rhino script engine.  Import the scripting package.
    java.exe -Xms40m -Xmx384m -cp !RHINO_JAR!;!SCRIPTING_JARS!;!DVT_SCRIPTING_JAR! !RHINO_SHELL! %1 %2 %3 %4 %5 %6 %7 %8 %9