Hello,
Im trying to use this function but it doesnt works...i put this in the header of the file that i want to use the function:
#include "math.h" /* include math functions */
What i want to do is this....
irms=sqrt(sum2corriente/NUM_MCICLO);
//they are defined like (copy&paste from my main.c):
//#define NUM_MCICLO 100
//
//#pragma DATA_SEG DEFAULT
//static dword sum2corriente=0;
//static dword irms=0;
How could i do this? i know that sqrt(double variable), is this going to work? i want it to tried but i compile the file and it gives no errro, but when i pressed the debug button then it shows this error:
Error #1> Link error: Undefined: "sqrt"
Referenced from "TPM1_ISR" in main.c
Error #2> Link Failed.
Im using the irms calc in a Interruption subroutine....
Please help! how can i get this to work?
Thanks!
Solved! Go to Solution.
Seems the floating point library (e.g. ansif.lib) is not included in your project. I'd suggest you to see this thread
Attached is the list of libraries available in CodeWarrior for MCUs v6.2.
Stanish
Seems the floating point library (e.g. ansif.lib) is not included in your project. I'd suggest you to see this thread
Attached is the list of libraries available in CodeWarrior for MCUs v6.2.
Stanish
Thanks man! Gracias!
it works, i only create a new project and activate the floating point support...and it works!
Thanks, i was thinking of implement an asm algorithm to do the sqrt() function...
Thanks again!