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.

posting F28335 codes from CCS4.1 to CCS3.3, "undefined symbol" ___fmax / ___fmin

Other Parts Discussed in Thread: CONTROLSUITE, CCSTUDIO

Hey all, I am still preferring CCS 3.3 over CCS 4.x (will do CCS 4 when I have some down time). we just purchased HVPM kit with F28335 controlCARD, and I am porting sample codes (HVPM_Sensorless_2833x), written with float-point libraries, from CCS 4 to CCS3. the codes ran well within CCS 4 (so it is working), however, when I made a project in CCS 3.3 and got following errors,

[HVPM_Sensored.c] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -g -pdsw225 -o3 -fr"C:/CCStudio_v3.3MCU/MyProjects/HVPM_Sensored_2833x/Debug" -i"C:/TI/controlSUITE/development_kits/~SupportFiles/F2833x_headers" -i"C:/TI/controlSUITE/device_support/f2833x/v132/DSP2833x_headers/include" -i"C:/TI/controlSUITE/device_support/f2833x/v132/DSP2833x_common/include" -i"C:/TI/controlSUITE/libs/math/IQmath/v15c/include" -i"C:/TI/controlSUITE/libs/app_libs/motor_control/math_blocks/v2.0" -i"C:/TI/controlSUITE/libs/app_libs/motor_control/drivers/f2833x_v1.0" -i"C:/TI/controlSUITE/libs/math/FPUfastRTS/V100/include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"Debug.lkf" "HVPM_Sensored.c"
"HVPM_Sensored.c", line 1070: warning: function declared implicitly
"HVPM_Sensored.c", line 1070: warning: function declared implicitly
"HVPM_Sensored.c", line 1085: warning: function declared implicitly
"HVPM_Sensored.c", line 1085: warning: function declared implicitly

[Linking...] "C:\CCStudio_v3.3MCU\C2000\cgtools\bin\cl2000" -@"Debug.lkf"
<Linking>

 undefined first referenced                                                              
  symbol       in file                                                                   
 --------- ----------------                                                              
 ___fmax   C:\\CCStudio_v3.3MCU\\MyProjects\\HVPM_Sensored_2833x\\Debug\\HVPM_Sensored.obj
 ___fmin   C:\\CCStudio_v3.3MCU\\MyProjects\\HVPM_Sensored_2833x\\Debug\\HVPM_Sensored.obj

error: unresolved symbols remain
error: errors encountered during linking; "./Debug/HVPM_Sensored_2833x.out" not
   built

>> Compilation failure

Build Complete,
  1 Errors, 4 Warnings, 0 Remarks.

 

I assume  I missed something simple, but could not figure out. please help. thanks

 

Jizhong

 

  • Jizhong Wang said:
     undefined first referenced                                                              
      symbol       in file                                                                   
     --------- ----------------                                                              
     ___fmax   C:\\CCStudio_v3.3MCU\\MyProjects\\HVPM_Sensored_2833x\\Debug\\HVPM_Sensored.obj
     ___fmin   C:\\CCStudio_v3.3MCU\\MyProjects\\HVPM_Sensored_2833x\\Debug\\HVPM_Sensored.obj

    Jizhong,

    These are intrinsics used to improve the performance of the code.  They require codegen tools 5.2.2 or later.  My first suggestion is to update the codegen you are using to take advantage of this boost.

    If you take a look in IQmathLib.h you will find the following - if you do not wish to update your codegen then uncomment the first #define _IQsat  and comment out the one that uses intrinsics.

    Regards
    -Lori

    //###########################################################################
    #else   // MATH_TYPE == FLOAT_MATH
    //###########################################################################

    .......

    //---------------------------------------------------------------------------
    //extern  float _satf(float A, float Pos, float Neg);
    //#define   _IQsat(A, Pos, Neg)    _satf(A, Pos, Neg)
    //
    // The following define requires codegen tools V5.2.2 or later
    //
    #define   _IQsat(A, Pos, Neg)  (__fmax(((__fmin((A),(Pos)))),(Neg)))
    //---------------------------------------------------------------------------

  • Thanks a lot, Lori. upgrade codegen to 5.2.2 took care of it.