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.

Jave Scripting - changing processor focus in Debug window



Hello,

I'm using Java Scripting, in the Scripting Console, to run various debug and test scenarios.  But I'm having trouble changing the focus from one processor to the other using scripting.  For instance, I can connect to core 1 of a F28375D Delfino dual-core processor, using debug_session_1.target.connect(), where debug_session_1 is associated with CPU1. I then load symbols, set a breakpoint and run to that breakpoint.  At that point, I want to change focus to core 2/CPU2, using scripting, so that I can also load symbols there and start it running also (via scripting).  But when I go to load symbols, it loads those symbols to core 1/CPU1, because the focus is still there.  How do I use Java Scripting to change the focus in the Debug window from CPU1, to CPU2.  Doing a debug_session_2.target.connect() does not work, via scripting.  It connects to the processor, but still keeps focus on CPU1.  Outside of scripting, I would right click on CPU2 and select Connect Target.  But I need to do this all via automated scripting.

Regards,

Robert

  • Hi Robert,

    Note that DSS is for automating the actual debug engine. There are no GUI dependencies. Hence there are no DSS APIs for controlling the GUI. Changing debug context in the Debug view is a GUI action. 

    In any case, it doesn't matter for DSS. You would open a debug connection for each CPU (CPU1 & CPU2) and using the corresponding debug session object for each CPU to specify which CPU needs to take action. DSS will always go by which debug session object is used, not the debug context.

    Thanks

    ki

  • Hi Ki,

    Thanks for the reply.  I have opened new debug sessions for each of the CPUs, as shown below

    var script = ScriptingEnvironment.instance();

    var debug_server = script.getServer( "DebugServer.1" );

    var debug_session_1 = debug_server.openSession( "Texas Instruments XDS2xx USB Debug Probe_0/C28xx_CPU1" );

    var debug_session_2 = debug_server.openSession( "Texas Instruments XDS2xx USB Debug Probe_0/C28xx_CPU2" );

    However, the issue comes when loading symbols.  And from what I see, or at least the call I'm using to do this, symLoad(), there is no selection of debug session.  It just loads to the active GUI session.  Is there a different call, other than symLoad, which will load symbols to a designated debug session?

    Robert

  • And from what I see, or at least the call I'm using to do this, symLoad(),

    Ah, you are using a Scripting Console command, not a DSS API. I understand the issue now. In your case, I suggest using the equivalent DSS API:

    debug_session_2.symbol.load(<symbol file>);

    Thanks

    ki

  • Thanks Ki, that worked.  Do you know of any centralized location(s) where such calls, and permutations of them, can be found?  

    Robert

  • I refer to the DSS API documentation:

    <CCS INSTALL DIR>/ccs/ccs_base/scripting/docs/DS_API/index.html

    Thanks

    ki