Other Parts Discussed in Thread: TMS320F28379D
Tool/software:
Hello,
I am trying to use a javascript file in DSS environment to start a CCS GUI session with all parameters and windows set up.
To do so, I read following sources:
7.6. Scripting — Code Composer Studio 12.7.0 Documentation
Launching Code Composer Studio from DSS (ti.com)
In the last one, there is a note: "Wait until the CCS IDE is fully launched." It seems to be a very important information !
It seems that some actions from DSS scripting environment are "missed" by CCS IDE if it is not ready (showing the opened debug session, taking into account some "option" on flash, others ?).
As a result to "let" CCS IDE to be ready, I add some ugly "wait" instructions into the following DSS script.
// Get scripting environment singleton
var script = ScriptingEnvironment.instance();
// Logging configuration
script.traceBegin("ccs_log.xml")
script.traceSetConsoleLevel(TraceLevel.CONFIG)
script.traceSetFileLevel(TraceLevel.CONFIG)
// Script timeout in millisecond for current environment (-1 infinite)
script.setScriptTimeout(60000);
var timeout = script.getScriptTimeout();
script.traceWrite("timeout: " + timeout);
// Starting up a CCS IDE
ccsServer = script.getServer("CCSServer.1");
ccsSession = ccsServer.openSession(".*");
// Waiting to let IDE to be fully loaded (no synchronization schem found between javascript and eclipse)
Thread.sleep(15000); // in milliseconds
// Starting up a DebugServer
var debugServer = script.getServer("DebugServer.1");
debugServer.setConfig("targetConfigs/LaunchpadXL_TMS320F28379D_woGEL.ccxml");
var debugSession = debugServer.openSession(".*C28xx_CPU1.*");
// Waiting to led IDE to capture this session (and take into account following configuration)
Thread.sleep(5000); // in milliseconds
// Configure and connect to target
debugSession.options.setString("FlashEraseSelection","Necessary Sectors Only (for Program Load)");
debugSession.target.connect();
Is there any mean to build a synchronisation with CCS IDE ?
Thanks,
Damien