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.

Compiler/MSP430F2232: msp430g2231

Part Number: MSP430F2232

Tool/software: TI C/C++ Compiler

Hello,

I've been trying to use IQmath function to multiply two numbers.  I continue to get   error  :  Description    Resource    Path    Location    Type
<a href="processors.wiki.ti.com/.../10198">no input section is linked in</a>  no input section is linked in             C/C++ Problem. 

#include <msp430.h>
#include <IQmathLib.h>
_iq a, b, c;

int main()
{
    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer

    a = _IQ15(2.0);
    b = _IQ15(5.0);

    c =_IQ15mpy(a,b);
}

I can get the correct answer with no errors  using a multiply by 2 function indicating the library is being accessed.

c =_IQmpy2(a);

What can I do to resolve this issue?

Regards,

Art

  • Hi Art,

    Please try declaring a and b as type _iq15 instead of _iq.

    Regards,
    Nathan
  • Nathan,
    Thanks for the response but changing _iq to _iq15 didn't help. I'm not sure if I have the library is installed correctly. It might not be able to find the function _IQ15mpy
  • Hi Art,

    One thing I would try first is to put the IQmathLib.h include in quotes instead of angled brackets like this: #include "QmathLib.h"

    I'm not sure if that will fix things, but that could be causing you some issues. Additionally, did you follow section 2.3 of the IQmathLib Users Guide when setting up your project. If you have, and changing the #include line does not fix things, then you may want to try uninstalling an reinstalling it. Also, I would still recommend defining your variables as iq15 for iq15 functions.

    Regards,
    Nathan
  • Nathan,

    I was able to get the IQmath function working by importing an  example file at  CCS Eclipse projects.

    / IQmathLib_empty_ex2: IQmath empty project example.
    //
    // This example provides a template for new IQmathLib projects.
    //
    // B. Peterson
    // Texas Instruments Inc.
    // May 2014
    // Built with CCS version 6.0.0.00190 and IAR Embedded Workbench version 6.10.1
    //*****************************************************************************
    #include "msp430.h"

    #include <stdint.h>

    /* Include the IQmath header file. */
    #include "IQmathLib.h"
    _iq15 a,b,c;
    int main(void)
    {
        /* Disable WDT. */
        WDTCTL = WDTPW + WDTHOLD;
     a= _IQ15(1.5);
     b= _IQ15(1.6);
     c= _IQ15mpy(a,b);
        return 0;
    }
    Thanks for the help. I should be able to take it from here.

    Regards,

    Art

**Attention** This is a public forum