Hi all,
Plz tell me whether CCS V5.2 supports TCL Scripting, if yes then plz guide the procedure.
Regards,
Umesh
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.
Hi all,
Plz tell me whether CCS V5.2 supports TCL Scripting, if yes then plz guide the procedure.
Regards,
Umesh
Umesh,
The scripting solution for CCS is called Debug Server Scripting. There is more information here: http://processors.wiki.ti.com/index.php/Debug_Server_Scripting
The API is JAVA and the default supported language is JavaScript. However you can use other languages what can interface with JAVA. People have been able to use TCL by utilizing Jacl/Tclblend
Regards,
John
Umesh,
Our examples and docs are for our supported language JavaScript. We can put a short wiki article together but it may be a bit before it gets published.
Attached is an example tcl script that uses some of our APIs. This one is based on a very old version of DSS so some of the API and environment setup is different. It was also done on Linux so tclblend_init variable would need to be adjusted.
http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/81/2251.Memory.tcl
Regards,
John
We are able to install Jacl/TclBlend.But we are facing the problem in these steps .We are getting errors for setting Environment which is there in
0285.Memory.tcl.Please guide us how to tackel it.
#! /bin/sh
# DebugServer root directory - edit if necessary
DEBUG_SERVER_ROOT=/opt/ti/dss1.1/DebugServer
# Debug Server library paths - don't edit
LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/bin/linux_ia32:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/linux/components:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/drivers:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
# Java class paths - don't edit
CLASSPATH=$DEBUG_SERVER_ROOT/linux/sdk/lib/MozillaInterfaces.jar:$CLASSPATH
CLASSPATH=$DEBUG_SERVER_ROOT/scripting/lib/com.ti.ccstudio.scripting.environment_3.1.0.jar:$CLASSPATH
CLASSPATH=$DEBUG_SERVER_ROOT/scripting/lib/com.ti.debug.engine_1.0.0.jar:$CLASSPATH
export CLASSPATH
tcl_dir=`pwd`
# If tclblend was installed in a different folder - you'll need to edit this path
exec /opt/tclblend/bin/jtclsh $tcl_dir/$1
set target [java::field $myDebugSession target]
$target reset
or
[java::field $myDebugSession target] reset
Here is the Shell file
#! /bin/sh # DebugServer root directory - edit if necessary DEBUG_SERVER_ROOT=/opt/ti/dss1.1/DebugServer # Debug Server library paths - don't edit LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/bin/linux_ia32:$LD_LIBRARY_PATH LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/linux/components:$LD_LIBRARY_PATH LD_LIBRARY_PATH=$DEBUG_SERVER_ROOT/drivers:$LD_LIBRARY_PATH export LD_LIBRARY_PATH # Java class paths - don't edit CLASSPATH=$DEBUG_SERVER_ROOT/linux/sdk/lib/MozillaInterfaces.jar:$CLASSPATH CLASSPATH=$DEBUG_SERVER_ROOT/scripting/lib/com.ti.ccstudio.scripting.environment_3.1.0.jar:$CLASSPATH CLASSPATH=$DEBUG_SERVER_ROOT/scripting/lib/com.ti.debug.engine_1.0.0.jar:$CLASSPATH export CLASSPATH tcl_dir=`pwd` # If tclblend was installed in a different folder - you'll need to edit this path exec /opt/tclblend/bin/jtclsh $tcl_dir/$1
Example Script (may need an update as the API could have changed)
0285.Memory.tcl
hi John,
We are also facing the environment setting issue with 2251.Memory.tcl (same that u shared in above mail).Error log is as given below,
cannot import class "com.ti.ccstudio.scripting.environment.ScriptingEnvironment"
, it does not exist
Please guide us to set the path for importing java packages such as
java::import com.ti.ccstudio.scripting.environment.ScriptingEnvironment
java::import com.ti.ccstudio.scripting.environment.TraceLevel
Waiting for your reply
Regards,
Umesh
Umesh,
For JavaScript people run the dss.bat file and pass their .js file to it. In the old TCL example we posted it has a sample shell script that does much of the same for Linux. http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/113625.aspx
I would suggest taking a look at the environment variables you are setting up to see if they are pointing to the correct locations. If you want to check against the dss.bat or even use it as a starting point it is located in \ccsv5\ccs_base\scripting\bin
Unfortunately I do not have any personal experience using TCL with DSS.
Regards,
John
Hi John,
As you know we are trying to create test automation tool using TCL scripting with CCS v 5.2 (DSS), But we are facing issues with setting Environment for TCL.
We are facing the below error even after setting the PATHs and CLASSPATHs (changing with respect to windows) as mentioned in the Linux example.
cannot import class "com.ti.ccstudio.scripting.environment.ScriptingEnvironment"
, it does not exist
Can you guide us where exactly the above package is present and this package is necessary for Java script also.
Please share us any relevant documents if you have (even if the documents are for previous versions of CCS) and also introduce us to the person who really worked with TCL automation with CCS v5 or previous versions.
Thanks and Regards,
Umesh.