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/CCSTUDIO: CCS: Data Format

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

Hi,

  • In CCS930->Help. Data formats  available are. 1-Hex, 2-Int, 3-Float, 4-Long

    During Load Memory in memory browser, We used to view our data in different formats.

    (8-bit unsigned int,

    8-bit unsigned char, 

    16-bit unsigned int,

    16-bit unsigned char,

    32-bit unsigned int,

    32-bit unsigned char)

    In order to save those formats, how to choose in DSS(Java API)

    I can able to save data in Hex values only by using -> saveData(0, 0x1c1c, "C:\\dss\\myFile.dat", 7, 4, false); how to choose those different formats. I want to save my data in 32-bit unsigned int

    API Ref: public void saveData(int nPage, long nAddress, java.lang.String sFilename, int nLength,int nIOFormat, boolean bAppend)

  • Hello,

    sadasivam arumugam said:
    In order to save those formats, how to choose in DSS(Java API)

    You can use the memory.saveData2() API.

    As per the API doc:

    ---

    public void saveData2(long nAddress,
                          int nPage,
                          int nLength,
                          java.lang.String sFile,
                          int format,
                          boolean bAppend)
                   throws ScriptingException
    This API supports saving data in additional formats not supported by com.ti.debug.engine.scripting.Memory.saveData() The list of supported formats could be listed using the com.ti.debug.engine.scripting.Memory.getSupportedTypes() API
    Parameters:
    nAddress - is the first address in the block.
    nPage - the memory page. Use one of Memory.Page enumeration.
    nLength - defines the number of items
    sFile - specifies the name of the file that will store the target data.
    format - - desired format

    ---

    As specified in the API doc, use the memory.getSupportedTypes() to determine the IDs for all the formats supported on your device. For example, on a CC26xx device, the returned IDs are:

    0 - 32-Bit Hex - TI Style
    1 - 32-Bit Hex - C Style
    2 - 32-Bit Signed Int
    3 - 32-Bit UnSigned Int
    4 - 32-Bit Binary
    5 - 32-Bit Floating Point
    6 - 32-Bit Exponential Float
    7 - 16-Bit Hex - TI Style
    8 - 16-Bit Hex - C Style
    9 - 16-Bit Signed Int
    10 - 16-Bit UnSigned Int
    11 - 16-Bit Binary
    12 - 8-Bit Hex - TI Style
    13 - 8-Bit Hex - C Style
    14 - 8-Bit Signed Int
    15 - 8-Bit UnSigned Int
    16 - 8-Bit Binary
    17 - Character
    18 - 64-Bit Hex - TI Style
    19 - 64-Bit Hex - C Style
    20 - 64-Bit Signed Int
    21 - 64-Bit UnSigned Int
    22 - 64-Bit Floating Point
    23 - 64-Bit Exponential Float

    Hence, if I wanted to save memory to a dat format from address 0x0 with 20 records in TI 16-Bit Hex format, I would do something like:

    debugSession.memory.saveData2(0, 0, 20, "data.dat", 7, false);
    With "7" being the ID for "16-Bit Hex - TI Style"
    Thanks
    ki

     

  • It works. Thanks.