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.

Can I use sizeof() in FEE ? :(



Hi

I want to write a FEE test which needs to calculate the structure size when I read back the structure from the block.

But it seems that the sizeof() function can not be called in the  CCS. It's said no definition about the sizeof().

Is there an other better way to calculate the structure size when I read back the structure from the block?

Thanks in advance!

  • Hello user4397545,

    Whom or where did you find that sizof is not supported in CCS? I was successfully able to use it in a local project of mine. The code where it was used is shown below:

    //initialize the tx data
    for(bufnum=0; bufnum< (sizeof TX_DATA1) /*D_SIZE*/; bufnum++)
    {
    TX_DATA1[bufnum] = bufnum;
    }

    Where TX_DATA1 is declared as:
    uint8 TX_DATA1[D_SIZE]= {0}; /* transmit buffer in sys ram */

    Can you provide more detail and perhaps a code snippet of how you are attempting to use this operator in your code?
  • Hi Chuck,

    So sorry about this, this question is sent by a colleague of mine using my account.

    He has just started to learn the CCS with TMS570. So he is not quite familiar with the CCS and misunderstand an error as the sizeof's.

    Sorry again about that .

    And thanks your answer and your patience :)

    Have a good day!
  • Hello user4397545,

    No issues. Our goal with this forum is to help anyone with a question no matter their level of experience. The only bad questions are those that are never asked!