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.

Compiler/TMS320F280049: Wrong representation of CLA int32 variable in expression-window

Part Number: TMS320F280049

Tool/software: TI C/C++ Compiler

Hello,

I defined a variable of type int32_t in the CLA2CPU RAM that is used (written) from the CLA. In the expression window this variable is from type int and the shown value is got from the lower 16bits (truncated)!
The calculation in the CLA is OK. The CPU get the full-32 value. Just the display by debugging is wrong. I think the problem is that the variable is seen from the CCS as int and not as long. This is maybe because of the different length of the base-type "int" between CPU and CLA (in stdin.h):

#if defined(__TMS320C28XX_CLA__)
    typedef          int    int32_t;
#else
    typedef          long   int32_t;
#endif

Do You have some help/workaround to solve this problem?

I'm using:
- CCS Version 7.2.0.00013
- Compiler TI v 16.9.6.LTS

Thanks a lot, best regards

   Luca

Please see also:
https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/656777/2413198#2413198

  • Hi Luca,

    An integer (int) for the C28x is 16-bits. This is likely why you are seeing only half of the 32-bits in the expression window. You need to change the type of the variable or the expression.

    Hope this help.

    sal
  • Hi Sal,

    to avoid this problem I implemented (already 2 weeks ago) following work-around in my project file:

    #if defined(__TMS320C28XX_CLA__)
    #include "f28004x_cla_typedefs.h"
    #else
    typedef int32_t sint32;

     

    but I'm still convinced that the mentioned lines in the (compiler) stdint.h are wrong. Here again:

    #if defined(__TMS320C28XX_CLA__)
        typedef          int    int32_t;
    #else
        typedef          long   int32_t;
    #endif

    Please consider a fix for the next compiler versions.

    Thanks
       Luca

  • What do you think is wrong with the above? Can you give a suggestion of what you think is correct.

    Thanks,
    sal