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.

CCS: Is Debug Scripting Server thread safe?

Tool/software: Code Composer Studio

I'm seeing some crashes of DSS and I'm wondering if it is related to accessing DSS calls from a multi-threaded application. I have detailed logging turned on by using these calls:

com.ti.ccstudio.scripting.environment.ScriptingEnvironment.instance().traceBegin("myfilename_" + timeStamp + ".log");
com.ti.ccstudio.scripting.environment.ScriptingEnvironment.instance().traceSetFileLevel(com.ti.ccstudio.scripting.environment.TraceLevel.ALL);

When things are failing, the log file ends abruptly without a closing log tag. The detailed log messages don't all appear in the same order (although most of them do) and we do see the sequence numbers logged out of order in the file as well.

We are debugging a (new) device that has multiple cores. We start all cores from a main thread using runAsync() and then have a halt-monitor thread for each core. The halt-monitor threads call waitForHalt() on the debugsession for their respective core. When one core halts, its monitoring thread sends a signal the main thread and the main thread halts the other cores with a call to halt() on the debugsession(s) of the other core(s). We are doing this because we don't know which core will halt first and we want to halt all the cores once one core reaches a breakpoint.

In summary, I'm looking for confirmation that starting several cores independently via runAsync() from a main thread, and then calling waitForHalt() from multiple threads, and then calling halt() on all cores from the main thread is safe to do with DSS.

Thanks!