Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Import the DSS packages into our namespace to save on typing
- importPackage(Packages.com.ti.debug.engine.scripting)
- importPackage(Packages.com.ti.ccstudio.scripting.environment)
- importPackage(Packages.java.lang)
- // Configurable Parameters
- var configFilePath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/targetConfigs/MSP430F2618.ccxml";
- var programPath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/Debug/quicksort.out";
- var traceFilePath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/LoadProgram.js.xml";
- var styleSheetPath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/DefaultStylesheet.xsl";
- // Create our scripting environment object - which is the main entry point into
- // any scriptingEnvironment and
- // the factory for creating other Scriptable ervers and Sessions
- var scriptingEnvironment = ScriptingEnvironment.instance();
- // Set up trace
- scriptingEnvironment.traceBegin(traceFilePath, styleSheetPath)
- scriptingEnvironment.traceSetConsoleLevel(TraceLevel.ALL)
- scriptingEnvironment.traceSetFileLevel(TraceLevel.ALL)
- // Create a debug server
- var debugServer = scriptingEnvironment.getServer("DebugServer.1");
- // Set the device ccxml
- debugServer.setConfig(configFilePath);
- // Open a debug debugSession
- debugSession = debugServer.openSession(".*");
- // Print debugger properties
- debugSession.options.printOptions(".*");
- // Connect the debugger to the target
- debugSession.target.connect();
- // Do something here ...
- // Disconnect the debugger from the target
- debugSession.target.disconnect();
- // Terminate the debug debugSession
- debugSession.terminate();
- // Stop the debug server
- debugServer.stop();
- // stop the trace
- scriptingEnvironment.traceSetConsoleLevel(TraceLevel.INFO)
- scriptingEnvironment.traceEnd()
Advertisement
Add Comment
Please, Sign In to add comment