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.

TMS320F28384S: seting support in FPU64 the compiler didn't find __fmin64 , __fmax64

Part Number: TMS320F28384S

dear sir ,

we are evaluating the 28284S   chip  to replace our previous one  28386S , and we wanted to take advatnge the support in FPU64.

on the previous chip (with FPU32) we  are using  intrinsic functions    __fmin   and __fmax , and wanted to port the code to   the new chip  with FPU64.

we saw that in FPU64  we need to call the following function  __fmin64  and __fmax64  (of course all variles are double), instead of __fmin  / __fmax,

we also change the processor support to fpu64 under the compiler.

but for some reason the linker issue error that __fmin64  / __fmax64 is undefined symbol   (we are linking rts2800_fpu64_eabi.lib)

any idea what causing it ?

is there example  that using intrisinc function for FPU64 ?

  • Hi,

    Is your project in eabi and coff? To quote the compiler guide (https://www.ti.com/lit/ug/spru514v/spru514v.pdf):

    "If you are using the COFF ABI, arguments and return values listed as floats may also use doubles, because both are 32-bit types. The FPU32 intrinsics are supported, but the FPU64 intrinsics are not supported if you are using the COFF ABI."

    Hope this helps.

    -Shantanu

  • Hi Shantanu,

    Thank for the reply  , My project is in EABI  only  (if i am not mistaking  All 2838X library are in EABI )  , the strange thing 

    that i notice  is that when i call the intrinisc funcion    __fracf64   , there is no issue  , the linker is sucessfully link it to rts2800_fpu64

    but when is i tried to call __fmin64  or __fmax64   the linker complain it's undifed symbol

  • Hi,

    I think this may require some investigation. Can i see your project files (.cproject, .project, .ccsproject). Also please show me the code where you are using fmin64. 

    -Shantanu

  • hi Shantanu,

    1. i have uploaded the requested files

    2.below are the lines i called  __fracf64   (whic is also intrinsic fuunction  , and is working 

       and __fmin64   (doesnt work)

      all variables are double

        
        error =__fracf64(error );
        
        error=__fmin64(__fmax64(error, -err_pos_limit), err_pos_limit);
    

    3.i have atteced also the compillation error  in log.txt  file

  • I dont think they have been uploaded as I am unable to find the attachments. Can you make sure it has been uploaded properly?

    You can follow instructions here: 
    https://e2e.ti.com/support/site-support-group/site-support/f/site-support-forum/761619/faq-how-do-i-attach-a-file-or-link-to-my-post

  • for some reason the linker issue error that __fmin64  / __fmax64 is undefined symbol   (we are linking rts2800_fpu64_eabi.lib)

    any idea what causing it ?

    Unfortunately, the intrinsics __fmin64 and __fmax64 are not recognized by the compiler.  I filed EXT_EP-10399 to have this investigated.  You are welcome to follow it with that link.

    A workaround is to write the typical expression to compute the minimum or maximum of two variables ...

    result_double = (arg1_double < arg2_double) ? arg1_double : arg2_double;

    In addition, enable optimization by using the option --opt_level=0 or higher.

    Thanks and regards,

    -George

  • For C2000, with --float_support=fpu64, the user guide incorrectly shows below intrinsics which are not supported.  The user guide will be updated in next STS release:
         __fmin64(double x, double y)
         __fmax64(double x, double y)

    The compiler will automatically generate the MINF64/MAXF64 instructions when it detects C code with the min/max idiom in conditionals or ternary operators. See below example which requires --opt_level=0 or higher.

    double fmax64(double arg1, double arg2)
    {
        return arg1 > arg2 ? arg1 : arg2;
    }

    cl2000 --abi=eabi --float_support=fpu64 test.c -o0

    ||fmax64||:
        ;*** 23 ----------------------- return __fmax64(arg1, arg2);
        MAXF64 R0,R1
        LRETR