Hi Ki,
It is working.
It was not working before because I had not supplied the false argument to session.target.run() function, thereby which it was always waiting for halt to occur.
I am running the batch file (ccs2020\ccs\scripting\run.bat) with the C29xxCPU1 executable, along with a debugSession JS script, to run it from Windows command window.
Within the JS script, I am using a for-loop to continuously read from the address of a symbol, as shown below:
const addr = debugSession.primary.symbols.getAddress("sineValues");
let b = 0;
debugSession.primary.target.run(false);
for(i=1; i<=5000; i++)
{
b = debugSession.primary.memory.read(addr,1,16);
console.log(b);
}However, when I see the plot of the data obtained (I have a set of sine values outputted in the executable), the reads are not very uniform (not a fixed gap between values), which I believe is expected, as the above for-loop code is asynchronous and will execute the read asynchronously instead of at a set rate:

Do you have any suggestions/recommendations to periodically read data at a set rate, instead of using a for-loop for it?
Is there some maximum limit to the rate at which session.registers.read() can be executed by the debug session from CCS?
One idea I have is to use some module for it, like the exec-sync function of the child_process module of Node JS: Child Process Node.js v0.12.0 Manual & Documentation that will help in executing the above code synchronously.
But is it even possible to import the module using require('child_process')?
I am not sure because I had tried some other modules like require('net') and it was throwing errors in the JS code; maybe I have to add some env variable, I don't know.
Let me know what you think of this.
Thanks, and regards,
Sumukh.