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.

Launching CCS from a DSS script in v5.1 or v5.3

Other Parts Discussed in Thread: CCSTUDIO

I have been trying to run the example script that opens a CCS session. Here is what I'm running (in a Matlab script). You could achieve the exact same thing in a cmd window.

cd 'C:\ti2\ccsv5\ccs_base\scripting\examples\DebugServerExamples\'
system(['C:\ti2\ccsv5\ccs_base\scripting\bin\dss.bat ' 'CCSSession.js'])

"c:\ti2" - is where my CCS v5.3 install is.

I have tried running this script and it does not work. Is the example shipped with CCS v5.3 not working out of the box? I also tried this script running with CCS v5.1 DSS and it didn't work. This example is not included with CCS v5.1 but I tried bringing it over and running it there.

The fact that the CCSSession.js has been added since v5.1 doesn't mean that the feature has been restored?

[Q1] - I read that v5 is not supported for this feature. Why? Is that still the case for all of the latest releases?
http://processors.wiki.ti.com/index.php/Debugging_Your_DSS_Script_Using_CCStudio_v4

This is extremely disappointing to the extent that we may not use DSS if we can not have interactive debug.

[Q2] - Lastly, if it is possible to start the CCS session, what ".jar" file do I need to add to my path? Its not startup.jar like it was in CCS v4 I don't think because that doesn't exist.

The design of the API is nice but I am disappointed with all of the issues I have had using DSS. I am also disappointed that these scripts aren't supported in the Matlab JRE, seems such an obvious use-case.

Also, I do have DSS scripts working to some extent with CCS v5.3 and Matlab 32-bit. If anyone wants to know how you can e-mail me at calogero{dot}j at gmail.

Thanks

Chris

  • Hi Chris,

    c0l0jar0 said:
    Is the example shipped with CCS v5.3 not working out of the box?

    There appears to be a few issues with this particular example. It seems to get stuck when launching the debug session. I'll investigate this further.

    c0l0jar0 said:

    I also tried this script running with CCS v5.1 DSS and it didn't work. This example is not included with CCS v5.1 but I tried bringing it over and running it there.

    The fact that the CCSSession.js has been added since v5.1 doesn't mean that the feature has been restored?

    Yes. There have been some changes made to CCS in v5.3 with regards to how to launch a CCS session from DSS. That example should only apply to CCSv5.3 and greater (if it worked)

    c0l0jar0 said:
    [Q1] - I read that v5 is not supported for this feature. Why? Is that still the case for all of the latest releases?
    http://processors.wiki.ti.com/index.php/Debugging_Your_DSS_Script_Using_CCStudio_v4

    For the above reason. Actually, it may still work with older versions of CCSv5 (like 5.1)

    c0l0jar0 said:
    [Q2] - Lastly, if it is possible to start the CCS session, what ".jar" file do I need to add to my path? Its not startup.jar like it was in CCS v4 I don't think because that doesn't exist.

    It is possible but it looks broken in CCSv5.3 (at least the example is). I'll try to get an answer for you on how this works.

    c0l0jar0 said:
    The design of the API is nice but I am disappointed with all of the issues I have had using DSS. I am also disappointed that these scripts aren't supported in the Matlab JRE, seems such an obvious use-case.

    The tight Matlab<->CCS debugger integation was lost starting with CCSv4 when the APIs to the debugger changed. Mathwotks has plans to support the new APIs in a future release of CCS. For more details on when, you can contact Mathworks support.

    Thanks

    ki

  • Thank you for the answers. Please do look into that example. Just to add some more information:

    The script seemed to have problems with relative addresses to configurations and things.

    debugServer.setConfig("../C64/tisim_c64xple.ccxml")

    If I step through the script in the rhino debugger it will launch an eclipse window called "Resource - Eclipse Platform" but it is not CCS and does not look like CCS. Is that the way it is supposed to work?

    I hope that you could provide some information on the possibility of this working in Matlab. I have most everything working when the scripts are written and executed in Matlab except for this. I don't want to wait around for Matlab to finally finish and charge me plenty to enable one more feature. With a few hints I could have it all working without them. So far everything works except the GUI using the following code at the top of my script.

    java_path = javaclasspath;

    path_already_added = ~isempty(regexp(java_path,'dss.jar', 'once'));
    if(~path_already_added)
    javaaddpath([ DS_dir 'packages\ti\dss\java\dss.jar' ]);
    javaaddpath([ DS_dir 'packages\ti\dss\java\dss.jar' ]);
    end

    import com.ti.debug.engine.scripting.*;
    import com.ti.ccstudio.scripting.environment.*;

    Thanks

    Chris

  • More important than other questions, is it possible to connect to an already running CCS instance? That would be better actually instead of running it from the script. Keep a single CCS window open and when the script runs it could access the CCS window that already exists.

  • Hi Chris,

    Looks like there are a few gotchas with 5.3.0 but you should be able to successfully launch CCS from your DSS script.

    I updated the wiki topic to cover CCSv5.3.0:

    http://processors.wiki.ti.com/index.php/Debugging_Your_DSS_Script_Using_CCS

    c0l0jar0 said:
    If I step through the script in the rhino debugger it will launch an eclipse window called "Resource - Eclipse Platform" but it is not CCS and does not look like CCS. Is that the way it is supposed to work?

    This one of the gotchas that is covered in the wiki. Basically you need to switch to the CCS Debug perspective. Once you do it once, CCS should remember for future launches.

    c0l0jar0 said:
    I hope that you could provide some information on the possibility of this working in Matlab. I have most everything working when the scripts are written and executed in Matlab except for this. I don't want to wait around for Matlab to finally finish and charge me plenty to enable one more feature.

    Your request is a common one and while we don't officially support this, I'd like to document this on the wiki due to popular demand. It'll take some time since I actually do not have much experience with Matlab so I'd hae to get familiar with that environment first. But I hope to put together something in the near future.

    Thanks

    ki

  • Ki-Soo Lee said:

    If I step through the script in the rhino debugger it will launch an eclipse window called "Resource - Eclipse Platform" but it is not CCS and does not look like CCS. Is that the way it is supposed to work?

    This one of the gotchas that is covered in the wiki. Basically you need to switch to the CCS Debug perspective. Once you do it once, CCS should remember for future launches.

    [/quote]

    Ki, I have the same problem. It's not just about the perspective - it seems like DSS is launching an eclipse installation with some CCS extensions, but not the true CCS instance that I would launch otherwise. I don't see any of the Trace Control extensions in the DSS-CCS that I see in my manually launched CCS. I am using v5.3.0. Is there any way to control the exact command that DSS uses to launch CCS?

    While we are on the topic, can you also tell me if it is possible to control Trace behavior from DSS when using a real target (not simulator)? For example, can I set up logging of memory accesses including read and write locations that are being read through Trace into ETB?

    Thanks,
    Manu

  • Manu,

    Manu Bansal said:
    Ki, I have the same problem. It's not just about the perspective - it seems like DSS is launching an eclipse installation with some CCS extensions, but not the true CCS instance that I would launch otherwise. I don't see any of the Trace Control extensions in the DSS-CCS that I see in my manually launched CCS.

    It should all be there. I see all the Trace options when i start CCS visa DSS. Are you sure you are in the correct perspective and correct context?

    Manu Bansal said:
    While we are on the topic, can you also tell me if it is possible to control Trace behavior from DSS when using a real target (not simulator)? For example, can I set up logging of memory accesses including read and write locations that are being read through Trace into ETB?

    You can use the breakpoint properties APIs to configure and control trace via DSS. The below wiki topic has more information on Breakpoint properties:

    http://processors.wiki.ti.com/index.php/Breakpoint

    Thanks

    ki

  • Ki-Soo Lee said:

    Ki, I have the same problem. It's not just about the perspective - it seems like DSS is launching an eclipse installation with some CCS extensions, but not the true CCS instance that I would launch otherwise. I don't see any of the Trace Control extensions in the DSS-CCS that I see in my manually launched CCS.

    It should all be there. I see all the Trace options when i start CCS visa DSS. Are you sure you are in the correct perspective and correct context?

    [/quote]

    Ki-Soo, I checked my task manager - the DSS script is launching eclipse.exe, not ccstudio.exe. My original post referred to ccsv5.3 but it's the same with v5.4. I have the following in my script:

    ccsServer = script.getServer("CCSServer.1")
    ccsSession = ccsServer.openSession(".*")

    Ki-Soo Lee said:

    While we are on the topic, can you also tell me if it is possible to control Trace behavior from DSS when using a real target (not simulator)? For example, can I set up logging of memory accesses including read and write locations that are being read through Trace into ETB?

    You can use the breakpoint properties APIs to configure and control trace via DSS. The below wiki topic has more information on Breakpoint properties:

    http://processors.wiki.ti.com/index.php/Breakpoint

    [/quote]

    Thanks, I will give that a try.

    Also, do you know how to enable inclusive function profiling with Trace in CCSv5.4? This question is detailed here.

    Thanks.

  • Manu Bansal said:
    Ki-Soo, I checked my task manager - the DSS script is launching eclipse.exe, not ccstudio.exe.

    This is expected. Regardless, you should see the trace plug-ins

    Manu Bansal said:
    Also, do you know how to enable inclusive function profiling with Trace in CCSv5.4? This question is detailed here.

    As far as I know, only exclusive counts are supported with the Trace tools.

    ki

  • Yes, I can see the Hardware Trace Anaylzer menu option now. Thanks!

    Inclusive profiling was definitely possible with Trace up until CCSv5.3. See this: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/199421/833096.aspx#833096  I have been successfully using it. Has it been removed in 5.4?