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.

CCSv4 Console Scripting: loadRaw can't find file

Hi

CCSv4.1.3

I'd like to use "loadRaw" to load memory and it can't find the file. The output is below

js:> loadData 0xe0000000 0 "data.txt" 1

Error evaluating "GEL_MemoryLoad(3758096384,0,1,"C:\\Work\\CCSv4_ndk\\data.txt")": GEL_MemoryLoad

Could Not Open File C:\Work\CCSv4_ndk\data.txt for reading. (C:\Program Files\Texas Instruments\ccsv4\eclipse\configuration\org.eclipse.osgi\bundles\188\1\.cp\resources\debugserver\memory.js#200

js:>

)
:

But the file exists and only has the archive attribute

C:\Work\CCSv4_ndk>attrib
A          C:\Work\CCSv4_ndk\data.txt

Also, I used this command to set the path

js:> env.setCurrentDirectory("C:/Work/CCSv4_ndk/");

Why can't it find the data.txt file? Could it be its actually complaining about the file format?

What should the data.txt format be?

Cheers

 

 

  • Update

    It turns out the problem is the data.txt format. It has to have the header

    1651 1 e0000000 0 10

    Don't know why it said it "could not open file".

    Cheers

     

     

  • Hi,

    I'm trying to load a file in memory using a DSS script.

    I use the loadRaw() function like this:

     

    var address = session.symbol.getAddress("my_var")

    session.memory.loadRaw(Memory.Page.PROGRAM, address, "file.txtt", 16, false)

     

    but i have the same errors with the GEL_MemoryLoad() API you present in the first post. 

    In the above post you said that the problem was the file format, but what does represent the string 1651 1 e0000000 0 10 ?

     

    Thanks,

    Luca.

  • Hello Luca,

    Luca Fusari said:
    In the above post you said that the problem was the file format, but what does represent the string 1651 1 e0000000 0 10 ?

    That string is a header for CCS data files (*.dat). Are you trying to load a data file or a raw binary file? loadRaw is for loading a raw binary file while Eddie was load a CCS data file.

    ki