Tool/software:
Please see attached CCS project (testDSSWS.zip) and DSS script (read_symbol_values.txt..you will need to change the extension to .js).
The output of the script is shown below.
>C:\ti\ccs1210\ccs\ccs_base\scripting\bin\DSS.bat read_symbol_values.js
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See www.slf4j.org/codes.html for further details.
=== Starting DSS Symbol Reader ===
Accessing scriptingEnvironment...
Debug server acquired.
Target configuration set.
Session opened for XDS2xx probe.
C28xx_CPU1: GEL Output:
Memory Map Initialization Complete
value
0
value
0
Finished reading all symbols.
if I uncomment the line containing "session.memory.writeData(Memory.Page.DATA, 50050, 195, 16)", the script outputs the following:
>C:\ti\ccs1210\ccs\ccs_base\scripting\bin\DSS.bat read_symbol_values.js
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See www.slf4j.org/codes.html for further details.
=== Starting DSS Symbol Reader ===
Accessing scriptingEnvironment...
Debug server acquired.
Target configuration set.
Session opened for XDS2xx probe.
C28xx_CPU1: GEL Output:
Memory Map Initialization Complete
value
195
value
0
Finished reading all symbols.
importPackage(Packages.com.ti.debug.engine.scripting);
importPackage(Packages.com.ti.ccstudio.scripting.environment);
importPackage(Packages.java.lang);
importPackage(Packages.java.io);
importPackage(Packages.com.ti.ccstudio.scripting.environment.FileUtils);
print("=== Starting DSS Symbol Reader ===");
try {
//Create the Scripting Environment Object
var script = ScriptingEnvironment.instance();
print("Accessing scriptingEnvironment...");
var debugServer = script.getServer("DebugServer.1");
print("Debug server acquired.");
debugServer.setConfig("NewTargetConfiguration.ccxml");
print("Target configuration set.");
var session = debugServer.openSession("Texas Instruments XDS2xx USB Debug Probe_0/C28xx_CPU1");
print("Session opened for XDS2xx probe.");
session.target.connect();
session.memory.writeData(Memory.Page.DATA, 50050, 195, 16)
var value = session.memory.readData(Memory.Page.DATA, 50050, 16);
print("value")
print(value)
var value = session.memory.readData(Memory.Page.DATA, 49152, 16);
print("value")
print(value)
print("Finished reading all symbols.");
} catch (e) {
print("Fatal error: " + e);
}
