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.

TMS320F28335: _IQsin() function not working even including IQMathLib.h

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

We are trying to use _IQsin()  from the IQMathLib.h and the compiler doesn't find its definition, niether us can find any entry of _IQsin() on any file.

Does anyone has  IQsin() working on the same device than us?

The code we are trying to implement it  on an S-function level 2.

Thanks in advance.

  • Yaki,

    Can you paste the error you are getting?

    1. In IQMathLib.h, is MATH_TYPE defined to IQ_MATH or FLOAT_MATH?

    2. Does your project include IQMath_fpu32.lib?

    3. Please refer to the IQMath example 28335_IQSampleC for the F2833x present in C2000Ware at:

    C2000Ware_4_03_00_00\libraries\math\IQmath\c28\examples\C\2833x

    It uses the _IQsin() (Lines 122 and 123 of IQSample.c)

    Thanks,

    Sira

  • We are trying to use the IQMathLib.h   with IQ numbers to take advantages from the IQ math. In so, we are trying to use that define (_IQsin() ), nevertheless is defined as an external define on the IQMathLib.h , and the compiler doesn't find it. 

    The error messagge is: 

    C:\Users\Yaki\AppData\Local\Temp\mex_46636000454989_2328\pll_1ph_SOGI_c2000_wrapper.obj:pll_1ph_SOGI_c2000_wrapper.c:(.text+0x37f): undefined reference to `_IQ32sin' C:\Users\Yaki\AppData\Local\Temp\mex_46636000454989_2328\pll_1ph_SOGI_c2000_wrapper.obj:pll_1ph_SOGI_c2000_wrapper.c:(.text+0x38a): undefined reference to `_IQ32cos' collect2.exe: error: ld returned 1 exit status

    Thanks!
  • We are trying to use the IQMathLib.h   with IQ numbers to take advantages from the IQ math. In so, we are trying to use that define (_IQsin() ), nevertheless is defined as an external define on the IQMathLib.h , and the compiler doesn't find it. 

    The error messagge is: 

    C:\Users\Yaki\AppData\Local\Temp\mex_46636000454989_2328\pll_1ph_SOGI_c2000_wrapper.obj:pll_1ph_SOGI_c2000_wrapper.c:(.text+0x37f): undefined reference to `_IQ32sin' C:\Users\Yaki\AppData\Local\Temp\mex_46636000454989_2328\pll_1ph_SOGI_c2000_wrapper.obj:pll_1ph_SOGI_c2000_wrapper.c:(.text+0x38a): undefined reference to `_IQ32cos' collect2.exe: error: ld returned 1 exit status

    Thanks!
  • Does the above pll_1ph_SOGI_c2000_wrapper.obj:pll_1ph_SOGI_c2000_wrapper.c file include IQMathlib.h?

    Please answer my other questions as well.

    Thanks,

    Sira