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: Question about IQmath and COFF/EABI

Part Number: TMS320F280049

Hi Team,

I'm working on a project that use PM_sincos_lib.h and PM_sincos_lib.C. But I currently have this problem.

  1. _IQ15toF use invalid

In the program, I can't get the result of IQto15F, but there is no warning or error

Code:
p->itheta = coarseAngle + fineAngle; // IQ15
p->ftheta = _IQ15toF(p->itheta); // floating-point

Result:I thought I should get p->ftheta=0.25 but it didn't. Why is this? How should I modify.

       2.And I found that there will be format conflicts. I wonder if this Lib is used in COFF, but we need to run under EABI, so there are the following problems.How should we avoid this problem?

       3.  I think maybe this Lib is setup under COFF and I am running EABI. If I need to run under EABI, how should I solve this problem so that I can run IQmath.lib and PM_SINCOS.LIB smoothly? (BTW, I use IQmath.lib as shown in the picture).

Thanks for your help.

Jenson

  • Result:I thought I should get p->ftheta=0.25 but it didn't. Why is this? How should I modify.

    What is the initial itheta value? f theta will be itheta / 2^15. 

    2.And I found that there will be format conflicts. I wonder if this Lib is used in COFF, but we need to run under EABI, so there are the following problems.How should we avoid this problem?

    Please affix a 'f' at the end of all float values. The EABI compiler will treat all float values without an 'f' as a double.

     I think maybe this Lib is setup under COFF and I am running EABI. If I need to run under EABI, how should I solve this problem so that I can run IQmath.lib and PM_SINCOS.LIB smoothly? (BTW, I use IQmath.lib as shown in the picture).

    IQMath.lib is a symbols library which will choose the correct library based on project configurations. If you are directly using the appropriate IQMath library, remove IQMath.ib and use either IQMath_Eabi.lib or IQMath_fpu32_eabi.lib depending on whether or not you have enabled fpu32 in your project.

    -Shantanu

  • Hi Shantanu,

    Sorry for late!

    The only problem I'm currently having is that _IQ15toF doesn't work.

    My code is as follows :

    p->itheta = coarseAngle + fineAngle; // IQ15
    p->ftheta = _IQ15toF(p->itheta); // floating-point

    If the code works, the ftheta should show 0.25, but it doesn't turn out like that.

    Do you have any comments on this?

    Thanks

    Jenson

  • Jenson,

    The result should be 0.00000762939453125. Can you verify if the IQTables and IQMath lib are properly allocated? Can you share the .map file of your project that is generated post compilation?

    -Shantanu

  • Hi Shanty,

    I will send you an email via email pls check it!

    Thanks

    Jenson