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.

TMS320F280049: Running JS file from node.JS other than scripting console or rhino debugger

Part Number: TMS320F280049
Other Parts Discussed in Thread: CCSTUDIO

Tool/software:

Hello,

I am able to run the javascript examples provided in the CCS folder and run them either from scripting console or rhino debugger.

Is it possible to run that same JS code using Visual Studio Code or command prompt(without using dss -dss.debug, i.e, without using Rhino debugger) using node.JS (which is available in the ccs installation folder C:\ti\ccs1271\ccs\tirex3\ti-rex-core\bin\node  or externally installing node.JS

And When I run a JS file from scripting console or rhino debugger, can I call another JS file from that file?, If possible then how the control will return to the calling JS file from the called JS file. If possible can you please provide me some examples.

Thanks,
Anil

  • Is it possible to run that same JS code using Visual Studio Code or command prompt(without using dss -dss.debug, i.e, without using Rhino debugger) using node.JS (which is available in the ccs installation folder C:\ti\ccs1271\ccs\tirex3\ti-rex-core\bin\node  or externally installing node.JS

    This is not an offically supported environment. Please continue to use the supported methods mention in the CCS User's Guide: https://software-dl.ti.com/ccs/esd/documents/users_guide/sdto_dss_handbook.html

    And When I run a JS file from scripting console or rhino debugger, can I call another JS file from that file?,

    Yes, absolutely. Check out the loadti example in <CCS INSTALL DIR>\ccs\ccs_base\scripting\examples\loadti. The main.js script includes several other js files in the same directory.

    Thanks

    ki

  • Hello Ki,

    Thankyou for suggesting the use of loadti

    I was using =>   loadti -c <path of ccxml file>/filename.ccxml <path of out file>/filename.out  , in the command prompt.
    When I run it, it shows 

    "

    .......
    Target running...
    Interrupt to Abort....

    "

    What should I do next?
    And where should I give the js file to be run , i.e., main.js or any other js which I want to run

    I tried using loadJSFile command in the scripting console, once after running loadti, but it showed below error
    1)for loading main.js given in the example, it showed error as... couldnt open file "null/getArgs.js"
    2)for loading other js file which I created(is shown below), it showed error as..... syntax error......
    while there is no error in directory or file name

    testEnv = {};

    run();

     

    function run()

    {

     

        load(java.lang.System.getenv("D:/User/Anil/Function_calling") + "./dummy1.js");

     

        dummy();

     

        dssScriptEnv = Packages.com.ti.ccstudio.scripting.environment.ScriptingEnvironment.instance();

     

    }

    I have also referred the loadti  documentation, but its not clear yet how to run and use it.

    Also can you please help me to know where to include these importpackages in the loadti code

    importPackage(Packages.com.ti.debug.engine.scripting)
    importPackage(Packages.com.ti.ccstudio.scripting.environment)
    importPackage(Packages.java.lang)
    importPackage(Packages.com.ti.ccstudio.scripting)
    importPackage(Packages.com.ti.debug.engine.scripting.setup)




    Thanks and Regards,
    Anil