// 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 deviceCCXMLFile = "InsituTargetConfiguration.ccxml"; var programToLoad = "NANDWriter_DSP.out"; // 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( deviceCCXMLFile ); // Open a debug session //debugSession = ds.openSession( "tixds100v2c674x.xml" ); var debugSession = ds.openSession( "Texas Instruments XDS100v2 USB Debug Probe_0/C674X_0" ); debugSession.target.connect(); // Load the program debugSession.memory.loadProgram( programToLoad ); // Run the program debugSession.target.run(); debugSession.target.waitForHalt(); //var resetType = debugSession.target.getResetType(1); //script.traceWrite("Reset name: " + resetType.getName() + ". " + resetType.getDescription() + "\n") var numResets = debugSession.target.getNumResetTypes(); for (count = 0; count < numResets; count++) { var resetType = debugSession.target.getResetType(count); if ( resetType.isAllowed() ) { script.traceWrite("Reset name: " + resetType.getName() + ". " + resetType.getDescription() + "\n"); resetType.issueReset(); java.lang.Thread.sleep(10000); } } //java.lang.System.out.println(resetType.getDescription()); //java.lang.System.out.println(resetType.getName()); //resetType.issueReset(); //java.lang.System.out.println("Bla1"); //java.lang.Thread.sleep(10000); //java.lang.System.out.println("Bla2"); //debugSession.target.reset(); //debugSession.target.restart(); debugSession.target.disconnect();