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: Query on using loadti and running javascript using loadti

Part Number: TMS320F280049
Other Parts Discussed in Thread: CCSTUDIO

Tool/software:

Hello,

I am using loadti feature of DSS for calling a function in one javascript from another javascript.

I am writing as =>   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

  • Hi Anil,

    loadti is a standalone example script that can be run from a console outside of the CCS GUI. I'm not aware of any options it has for calling other scripts.  The script source is included in the CCS install though and you could modify it to do what you want.  If you are trying to script something within the CCS scripting console,  you don't need to use load ti.

    If you are trying to sequence operations outside of the CCS GUI and without modifying loadti, you would run loadti to load your program, and then run your additional scripts after loadti completes.

    Here's some background information you may find helpful in understanding how DSS works: https://software-dl.ti.com/ccs/esd/training/workshop/ccsv9/dss_fundamentals_workshop.html . I would recommend reviewing this if you haven't already.

    Please also note that DSS will be updated in CCSv20.0 when CCS moves from an Eclipse-based framework to a Theia-based framework.  If you will be moving to CCSv20, you may be better off looking at the updated scripting language. You can read more about it here: https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs_theia/index_debug-scripting.html

    The new scripting language is available in CCS v1.5.0 (and the v1.5.1 update which is coming within  a few days).