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.

  • Resolved

CCS/TMS320C6678: How to determine the length of dat file automatically when using loadData API function?

Expert 7030 points

Replies: 1

Views: 39

Part Number: TMS320C6678

Tool/software: Code Composer Studio

Hello Champs,

Customer wanted to use  memory.loadData API to load a dat file to target.

public void loadData(int nPage,
                     long nAddress,
                     java.lang.String sFilename,
                     int nLength)
              throws ScriptingException


But he needed to input the nlength parameter manually every time, is there some API function to read the length of dat file automatically?


Thanks.
Rgds
Shine

  • Hi Shine,
    There is no API that returns the number of samples in a CCS data (*.dat) file. *If* the .dat file has a proper header (no guarantee it does), then you can get the length from there. You would have to parse the file to read the first line with the header, and then get the length.

    For more information on the header, refer to the CCS Help (Help -> Help Contents -> Code Composer Studio Help -> Views and Editors -> Memory View -> Data File Formats)

    Thanks
    ki

    -----------------------------------

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training? Check out the CCS Training Site

    Curious about the status of a bug and know the tracking ID? Track it via the public bug tracking portal

    NOTE: When a bug is filed and a tracking ID is provided, the thread may then be suggested as "TI Thinks Resolved". Why? Please read the first FAQ of the CCS Forum Guidelines & FAQ

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.