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.

TMS320F280049: #3195-D (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

Part Number: TMS320F280049


Tool/software:

I got the following warning:

 #3195-D (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

Here is my code:

b += sprintf( b, " readback: %f\r\n", getTarget() );

and the here is the called function

float32_t getTarget(void);

The warning disappear only writing a constant link here

b += sprintf( b, " readback: %f\r\n", 3.5f );

I am using

Code Composer Studio

Version: 12.8.1.00005

and the default setting (fpu32)

What can I do?

Thank you in advance

  • Can you tell me what float32_t is typedef as?

  • typedef float         float32_t;

  • And this is the excerpt from file "hw_types.h" where the typedef is declared. . .

    #ifndef C2000_IEEE754_TYPES
    #define C2000_IEEE754_TYPES
    #ifdef __TI_EABI__
    typedef float float32_t;
    typedef double float64_t;
    #else // TI COFF
    typedef float float32_t;
    typedef long double float64_t;
    #endif // __TI_EABI__
    #endif // C2000_IEEE754_TYPES

  • I can reproduce ...

     #3195-D (Performance) EABI double precision is 64-bits as opposed to 32-bits for COFF. Consider changing doubles to floats for improved performance in FPU32-mode.

    Here is my code:

    b += sprintf( b, " readback: %f\r\n", getTarget() );

    and the here is the called function

    float32_t getTarget(void);

    I cannot reproduce ...

    The warning disappear only writing a constant link here

    b += sprintf( b, " readback: %f\r\n", 3.5f );

    I still get the warning diagnostic.

    In this particular case, passing a float argument to sprintf, there is nothing that can be done to avoid the type double.  Even for the constant 3.5f, a value of type double is passed to sprintf.

    The best way forward is to suppress the diagnostic.  Please search the C28x compiler manual for the sub-chapter titled Understanding Diagnostic Messages, and the sub-chapter titled The Diagnostic Message Pragmas.  You'll learn that the diagnostic ID in this case is 3195, and it can be suppressed with the command line option --diag_suppress=3195, or ...

    #pragma diag_suppress 3195

    Thanks and regards,

    -George