Part Number: MSP432E401Y
i am using an MSP432 chip both the MSP432P401R or the MSP432E401Y with the Qmath and IQmath libraries.
I created a simple file with the Qmath functions which builds and works fine. When I convert the same file that used the Qmath functions to an IQmath version some of the math functions do not build.
#include "msp432.h"
#include <stdint.h>
#define PI 3.1415926536
/* Select the global Q value and include the Qmath header file. */
#define GLOBAL_IQ 11
#include "IQmathLib.h"
volatile float res; // floating point variable to verify results
volatile float res2; // floating point variable to verify results
int main(void)
{
_iq qA, qB, qC, qD, qE; // Q variables using global type
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // stop watchdog timer
/* Basic global Q operations. */
qA = _IQ(1.0);
qB = _IQ(2.5);
qC = qA + qB;
res=_IQtoF(qC); // 3.5 = 1.0 + 2.5
qD = _IQmpy4(qB);
qE = _IQmpy(qA, qB);
res2=_IQtoF(qE); // 8.75 = 3.5 * 2.5
while(1);
}
The IQmath function _IQmpy4(qB) builds and runs. However, the function to multiply two numbers _IQmpy(qA, qB) and the function to convert from a Qnumber format to floating _IQtoF(qC) do not build.
The console error shown is:
<Linking>
undefined first referenced
symbol in file
--------- ----------------
_IQ11mpy ./QmathLib_empty_ex1.obj
_IQ11toF ./QmathLib_empty_ex1.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "IQmathLib_empty_ex1_MSP432.out" not built
>> Compilation failure

