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.

CCS/TMS320C6727: Loading .dat files

Part Number: TMS320C6727
Other Parts Discussed in Thread: TMS320DM642

Tool/software: Code Composer Studio

Hi there,

I'm trying to load data onto the target as described in SPRA381. And "CCS/TMS320DM642: How to Read the .dat file into the CCS project" as reference.

I have a dat file I'm trying to write to memory then read back, however I'm unable to with "save and load data" under the file options in CCS 3.3.

I also am trying to utilize GEL_AddInputFile(), and GEL_MemoryLoad() as described. No success has been observed of writing data to the specified memory space.

Regards,

Blake West

  • Hi Blake,

    Blake West said:
    I have a dat file I'm trying to write to memory then read back, however I'm unable to with "save and load data" under the file options in CCS 3.3.

    What exactly is not working? Did you get an error messages?

    Blake West said:
    I also am trying to utilize GEL_AddInputFile(), and GEL_MemoryLoad() as described. No success has been observed of writing data to the specified memory space.

    Can you provide the GEL file you created for this functionality?

    Thanks

    ki

  • HI Ki,

    I'm currently able load into memory using GEL_MemoryLoad() into a buffer that is assigned at a base address.

    However,
    I'd rather be able to utilize "GEL_AddInputFile()", as from my under standing this function takes a symbol within a file, and populates at the address of the symbol the length specified from a .dat file.

    Whenever I try to use this, it specifies I don't have a valid path, presumably to the source file in which the symbol is located.

    Does this signature appear correct?

    GEL_AddInputFile(Bufferlocation.cpp, "line", data.dat. 1, "inp_buff", "0x100000", 0, 0,)

    Regards,

    Blake

  • Blake West said:

    Does this signature appear correct?

    GEL_AddInputFile(Bufferlocation.cpp, "line", data.dat. 1, "inp_buff", "0x100000", 0, 0,)

    The syntax appears a bit off. For example. the first and third parameter should be strings and need to be wrapped in quotes. The second parameter should be an integer and not wrapped in quotes. 

  • Ki,


    I was able to resolve the error (I formatted my GEL  command on here incorrectly, however it was correct in *.gel), (ill need to look into why) however now, when use this command I get this:
    This the the function that I'm using for this:
       GEL_AddInputFile("GelTester.cpp",
                         6,
                         "data.dat",
                         1, "inbuff",
                         "0x400000");
    After reviewing the documentation with this function, I may not be able to utilize it as intended.

    Primarily, I would like to load data from a .dat file into memory at runtime, into a specified buffer. 

    Currently the destination that I'm trying to load the data into is declared within a class (GelTester) as such: static uint8_t inbuff[];
    then defined outside the class as: uint8_t GelTester::inbuff[_BUFF_SIZE];
    where _BUFF_SIZE is currently 0x400000.
    Right now, this is the only way we've found to make a buffer with a variable size (besides dynamic memory allocation); I'm able to load data into memory by specifying the memory address with GEL_MemoryLoad(), and loading directly into memory at the defined address of the symbol.

    This isn't what I'd prefer, as I'd rather be able to load data with symbols names / files, rather than memory locations

    Does GEL_AddInputFile() have the functionality that I'm looking for?
    Otherwise, what would you recommend?

    Thank you,

    Blake West 
  • If I recall correctly, the GEL_AddInputFile() function is used to automate configuring the CCS v3 probe point functionality - basically inject some data from a *.dat file to target memory each time a specified breakpoint is hit. It is used to simulate external I/O data that periodically comes in. Is this what you want to do? Or do you just want to load all the data in one shot like with GEL_MemoryLoad()? You'd likely want to use GEL_MemoryLoadData() instead since that one natively handles *.dat file formats.

    Blake West said:
    Primarily, I would like to load data from a .dat file into memory at runtime, into a specified buffer. 

    Just to clarify, all of these GEL calls are intrusive - the memory write occurs when the target is halted. Hence it is not true "runtime" (non-intrusive) behavior.

    Blake West said:
    This isn't what I'd prefer, as I'd rather be able to load data with symbols names / files, rather than memory locations

    You can do this. In place of a specific address, you can pass in the name of the symbol. GEL should be able to resolve the addres

    Thanks

    ki

  • Ki, it appears the name resolution from GEL doesn't work as described from my perspective. However, I've been able to utilize the functionality of the command as intended.

    I'm having further issues; I'll continue this on another article.

    Thank you,


    Blake