// Inport DSS and Java Package importPackage(Packages.com.ti.debug.engine.scripting); importPackage(Packages.com.ti.ccstudio.scripting.environment); importPackage(Packages.com.ti.dvt.engine.scripting); importPackage(Packages.java.lang); // Modify these viriables to match your environment. use forward slashes var ccs7InstallDir = "C:/ti/ccsv7"; var DSSWorkshopDir = "C:/ti/xdctools_3_50_02_20_core/packages/xdc/rov/dss"; var deviceCCXMLFile = "C:/workspace_CCSv7/lab1/NP/C28/F28034.ccxml"; var programToLoad = "C:/workspace_CCSv7/lab1/NP/C28/Debug/C28.out"; var LogFile = "C:/workspace_CCSv7/lab1/log.xml"; //Create the Scripting Environment Object var script = ScriptingEnvironment.instance(); // Create a log file to log script execution script.traceBegin(LogFile, "C:/workspace_CCSv7/lab1/DefaultStylesheet.xsl"); // Set trace levels for console and logs script.traceSetConsoleLevel(TraceLevel.INFO); script.traceSetFileLevel(TraceLevel.ALL); script.traceWrite("Begin scripting session"); // Get the Debug Server and start a Debug Session var debugServer = script.getServer("DebugServer.1"); debugServer.setConfig("C:/workspace_CCSv7/lab1/NP/C28/F28034.ccxml"); var debugSession = debugServer.openSession(".*"); // Connect to the CPU debugSession.target.connect(); script.traceWrite("Connecting to device..."); //session.target.connect(); script.traceWrite("Connected"); // Load a program debugSession.memory.loadProgram("C:/workspace_CCSv7/lab1/NP/C28/Debug/C28.out"); print(["debugSession.target.run"]) // Run the target debugSession.target.runAsynch(); print(["a"]); // All done debugServer.stop(); script.traceWrite("End scripting session"); // Stop logging and exit. script.traceEnd();