TOOLS
Listato 2 - Sessione di debug con file di configurazione
// Load a program for just the first TCI6488 CPU
...
script.traceWrite("Loading program to first TCI6488 CPU...");
// Get the Debug Server and start a Debug Session
debugServer = script.getServer("DebugServer.1");
debugSessionF1A.memory.loadProgram("HelloTCI6488.out");
script.traceWrite("Done!");
// Configure target for a TCI6488 EVM with SD XDS510 USB emulator
// Load a program for just the second TCI6488 CPU
script.traceWrite("Configuring debug server for TCI6488 EVM...");
script.traceWrite("Loading program to second TCI6488 CPU...");
debugServer.setConfig("TCI6488EVM_SD510USB.ccxml");
debugSessionF1B.memory.loadProgram("HelloTCI6488.out");
script.traceWrite("Done!");
// Open a debug session for each TCI6488 CPU
script.traceWrite("Opening a debug session for all TCI6488 cores...");
script.traceWrite("Done!");
// Run the program for just the first TCI6488 CPU
debugSessionF1A = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
script.traceWrite("Executing program on first TCI6488 CPU...");
F1A");
debugSessionF1A.target.run();
debugSessionF1B = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
script.traceWrite("Execution complete!");
F1B");
debugSessionF1C = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
F1C");
debugSessionF2A = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
// Reload program for just the first TCI6488 CPU
script.traceWrite("Loading program to first TCI6488 CPU...");
F2A");
debugSessionF1A.memory.loadProgram("HelloTCI6488.out");
debugSessionF2B = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
script.traceWrite("Done!");
F2B");
debugSessionF2C = debugServer.openSession("TCI6488EVM_XDS510USB/C64PLUS_
F2C");
script.traceWrite("Done!");
// Run the program for the first and second TCI6488 CPU simultaneously
script.traceWrite("Executing program on first and second TCI6488 CPU...");
// Connect to each TCI6488 CPU
var dsArray = new Array();
script.traceWrite("Connecting to all TCI6488 CPUs...");
dsArray[0] = debugSessionF1A;
debugSessionF1A.target.connect();
dsArray[1] = debugSessionF1B;
debugSessionF1B.target.connect();
debugSessionF1C.target.connect();
debugSessionF2A.target.connect();
debugSessionF2B.target.connect();
debugServer.simultaneous.run(dsArray); // Run CPUs 1 and 2
script.traceWrite("Done!");
debugSessionF2C.target.connect();
script.traceWrite("Done!");
...
Tabella dei contenuti per la edizione digitale del Firmware - Novembre 2014 / N°106