Tool/software: Code Composer Studio
Hello,
I want to program approximately 200 F280049 with the attached DSS Script and multiple XDS110 with chained F28. In order to keep the script scalable, I want to use arrays and for loops. While the array for debugger names and CPU names is easily created, I am not sure about an array of debug session objects. Is this even possible in Java?
Another point to decrease the overall programming time is the use of multi threading. Is this possible in DSS scripts?
// To run this script oen the "Scripting Console" under the "View" tab in CCS // use the "loadJSFile <path to file>" command to load and run this script // 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 = "<path>/targetConfigs/TMS320F280049.ccxml"; var programToLoad = "<path>/CPU1_RAM/Basis_F280049.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 debugServer = script.getServer( "DebugServer.1" ); // Create Arrays with the appropriate Names for debugger and modules var rack_debugger = ["Texas Instruments XDS110 USB Debug Probe"]; var rack_modules = ["C28xx_CPU1", "C28xx_CPU1_0", "C28xx_CPU1_1", "C28xx_CPU1_2", "C28xx_CPU1_3", "C28xx_CPU1_4", "C28xx_CPU1_5", "C28xx_CPU1_6", "C28xx_CPU1_7", "C28xx_CPU1_8" ]; // Set the device ccxml debugServer.setConfig( deviceCCXMLFile ); // Open a debug session debugSession0 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1" ); debugSession1 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_0" ); debugSession2 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_1" ); debugSession3 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_2" ); debugSession4 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_3" ); debugSession5 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_4" ); debugSession6 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_5" ); debugSession7 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_6" ); debugSession8 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_7" ); debugSession9 = debugServer.openSession( "Texas Instruments XDS110 USB Debug Probe", "C28xx_CPU1_8" ); // Connect to the target debugSession0.target.connect(); debugSession1.target.connect(); debugSession2.target.connect(); debugSession3.target.connect(); debugSession4.target.connect(); debugSession5.target.connect(); debugSession6.target.connect(); debugSession7.target.connect(); debugSession8.target.connect(); debugSession9.target.connect(); // Load the program debugSession0.memory.loadProgram( programToLoad ); debugSession1.memory.loadProgram( programToLoad ); debugSession2.memory.loadProgram( programToLoad ); debugSession3.memory.loadProgram( programToLoad ); debugSession4.memory.loadProgram( programToLoad ); debugSession5.memory.loadProgram( programToLoad ); debugSession6.memory.loadProgram( programToLoad ); debugSession7.memory.loadProgram( programToLoad ); debugSession8.memory.loadProgram( programToLoad ); debugSession9.memory.loadProgram( programToLoad ); // Run the program debugSession0.target.runAsynch(); debugSession1.target.runAsynch(); debugSession2.target.runAsynch(); debugSession3.target.runAsynch(); debugSession4.target.runAsynch(); debugSession5.target.runAsynch(); debugSession6.target.runAsynch(); debugSession7.target.runAsynch(); debugSession8.target.runAsynch(); debugSession9.target.runAsynch(); // Disconnect from the target //debugSession0.target.disconnect(); //debugSession1.target.disconnect(); //debugSession0.terminate(); //debugSession1.terminate(); //debugServer.stop();
Regards,
Martin