// 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) // Create our scripting environment object - which is the main entry point into any script and // the factory for creating other Scriptable ervers and Sessions var script = ScriptingEnvironment.instance(); // Create a debug server var ds = script.getServer( "DebugServer.1" ); // Set the device ccxml ds.setConfig("MyTargetConfiguration.ccxml"); // Open a debug session var debugSession = ds.openSession( "Texas Instruments XDS100v2 USB Debug Probe_0/C674X_0" ); debugSession.target.connect(); // Load the program debugSession.memory.loadProgram("NANDWriter_DSP.out"); // Run the program debugSession.target.run(); debugSession.target.waitForHalt(); var resetType = debugSession.target.getResetType(1); script.traceWrite("Going to issue reset: '" + resetType.getName() + "' (" + resetType.getDescription() + ")... "); resetType.issueReset(); java.lang.Thread.sleep(100); script.traceWrite("Done\n"); debugSession.target.restart(); debugSession.target.runAsynch(); debugSession.target.disconnect();