Guest User

Untitled

a guest
Apr 18th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Import the DSS packages into our namespace to save on typing
  2. importPackage(Packages.com.ti.debug.engine.scripting)
  3. importPackage(Packages.com.ti.ccstudio.scripting.environment)
  4. importPackage(Packages.java.lang)
  5.  
  6. // Configurable Parameters
  7. var configFilePath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/targetConfigs/MSP430F2618.ccxml";
  8. var programPath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/Debug/quicksort.out";
  9. var traceFilePath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/LoadProgram.js.xml";
  10. var styleSheetPath = "../../../Users/Mateja Putic/workspace_CCSv5_3/quicksort/DefaultStylesheet.xsl";
  11.  
  12. // Create our scripting environment object - which is the main entry point into
  13. // any scriptingEnvironment and
  14. // the factory for creating other Scriptable ervers and Sessions
  15. var scriptingEnvironment = ScriptingEnvironment.instance();
  16.  
  17. // Set up trace
  18. scriptingEnvironment.traceBegin(traceFilePath, styleSheetPath)
  19. scriptingEnvironment.traceSetConsoleLevel(TraceLevel.ALL)
  20. scriptingEnvironment.traceSetFileLevel(TraceLevel.ALL)
  21.  
  22. // Create a debug server
  23. var debugServer = scriptingEnvironment.getServer("DebugServer.1");
  24.  
  25. // Set the device ccxml
  26. debugServer.setConfig(configFilePath);
  27.  
  28. // Open a debug debugSession
  29. debugSession = debugServer.openSession(".*");
  30.  
  31. // Print debugger properties
  32. debugSession.options.printOptions(".*");
  33.  
  34. // Connect the debugger to the target
  35. debugSession.target.connect();
  36.  
  37. // Do something here ...
  38.  
  39. // Disconnect the debugger from the target
  40. debugSession.target.disconnect();
  41.  
  42. // Terminate the debug debugSession
  43. debugSession.terminate();
  44.  
  45. // Stop the debug server
  46. debugServer.stop();
  47.  
  48. // stop the trace
  49. scriptingEnvironment.traceSetConsoleLevel(TraceLevel.INFO)
  50. scriptingEnvironment.traceEnd()
Advertisement
Add Comment
Please, Sign In to add comment