// Board Name: TMS320C6678_0 // CPU Names : C66xx_0, C66xx_1, C66xx_2, C66xx_3, C66xx_4, C66xx_5, C66xx_6, C66xx_7 // 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); importPackage(Packages.java.io); // Create our scripting environment object - which is the main entry point into any script and // the factory for creating other Scriptable Servers and Sessions var script = ScriptingEnvironment.instance(); // Get the Debug Server and start a Debug Session debugServer = script.getServer("DebugServer.1"); // Configure target for a C6678 EVM with SD XDS560 USB emulator script.traceWrite("Configuring debug server for TMS320C6678 EVM..."); debugServer.setConfig("C:\\TargetCfgFiles\\EVM6678.ccxml"); script.traceWrite("Done!"); // Open a debug session for each C6678 CPU script.traceWrite("Opening a debug session for cores 0-4 of 6678 ..."); var debugSessionC0 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_0"); var debugSessionC1 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_1"); var debugSessionC2 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_2"); var debugSessionC3 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_3"); var debugSessionC4 = debugServer.openSession("Blackhawk XDS560v2-USB Mezzanine Emulator_0/C66xx_4"); script.traceWrite("Done!"); // Connect to each C6678 CPU script.traceWrite("Connecting to CPUs 0-4 of C6678..."); debugSessionC0.target.connect(); debugSessionC1.target.connect(); debugSessionC2.target.connect(); debugSessionC3.target.connect(); debugSessionC4.target.connect(); script.traceWrite("Done!"); // Load a program for just C6678 Core0 script.traceWrite("Loading program to C6678 C0..."); debugSessionC0.memory.loadProgram("C:\\CCS_Workspace\\App0\\Debug\\App0.out"); script.traceWrite("Done!"); // Load a program for just C6678 Core1 script.traceWrite("Loading program to C6678 C1..."); debugSessionC1.memory.loadProgram("C:\\CCS_Workspace\\App1\\Debug\\App1.out"); script.traceWrite("Done!"); // Load a program for just C6678 Core2 script.traceWrite("Loading program to C6678 C2..."); debugSessionC2.memory.loadProgram("C:\\CCS_Workspace\\App2\\Debug\\App2.out"); script.traceWrite("Done!"); // Load a program for just C6678 Core3 script.traceWrite("Loading program to C6678 C3..."); debugSessionC3.memory.loadProgram("C:\\CCS_Workspace\\App3\\Debug\\App3.out"); script.traceWrite("Done!"); // Load a program for just C6678 Core4 script.traceWrite("Loading program to C6678 C4..."); debugSessionC4.memory.loadProgram("C:\\CCS_Workspace\\App3\\Debug\\App4.out"); script.traceWrite("Done!"); // Run the program for CPUs 0-4 of C6678 simultaneously script.traceWrite("Executing program on CPUs 0-4 of C6678..."); debugServer.simultaneous.run(debugSessionC0, debugSessionC1, debugSessionC2, debugSessionC3, debugSessionC3); // Run CPUs 0-4 script.traceWrite("Done!");