This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

open and read data from text file using Debug server scripting(DSS)

HI,

I am trying to automate debugging using CCS . I want to give the input from the file to DSS .i.e read data from a file using DSS.

Does DSS provide any file handling APIs? Or Do i have to create our own file handling functions .

One of the example in ti folder uses a "FileInoutStream" . But when I try to use this i get no refernce to this function.

Please let me know how to go ahead

Thanks

Abdul 

  • Hi Abdul,
    Do you want to read data from a file and load it to memory on the target? Or do you want to read data from a file and access the data from the script?

    Thanks
    ki
  • Hi Ki,

    I want to read data from a file(text file) and access the data from the DSS script. I am trying to write DSS script with the reference of MemoryDump.js. (C:\ti\ccsv6\ccs_base\scripting\examples\DebugServerExamples\MemoryDump.js)
    The file (FileInputStream.js) is missing in the path mentioned. This FileInputStream.js will be having read(), write(), close() and open()

    With Regards,
    Abdul Rafi.
  • Hi Ki,

    I want to read data from a file(text file) and access the data from the DSS script. help on this

    Thanks,
    Abdul Rafi
  • There are no dedicated DSS APIs for this. But you can using standard Java file APIs for this.

    If you want to look at an example, see the attached example js file near the end of this thread:

    Thanks

    ki

  • I have taken the example file (MemoryDump.js) provided by TI. In MemoryDump.js calling "FileInputStream". "FileInputStream" definition is missing. Could you provide "FileInputStream" function defination

    thanks,
    Abdul Rafi
  • FileInputStream is one of the java file APIs I mentioned earlier.

    docs.oracle.com/.../FileInputStream.html

    You will need to import the java file.io package to use it:

    importPackage(Packages.java.io)

    Thanks
    ki