hi to all,
I'm a newbie to HC12 (MC9S12E128) MCU (about 4 months) and
CodeWarrior.Recently i encounter some problems in my program.I want
to use the sqrt function in my program but it end up with an error
that _FUFLOAT is undefiened although i didn't declare it in my
program.Below is the portion of my program problems occurs
interrupt void ATD_ISR(void){
ATDCTL2_ASCIF=1;
ATDSTAT1_CCF0=1;
ATDSTAT0_SCF=1;
ATDCTL2_ASCIF=0;
ATDCTL5_SCAN=0;
ATD_value0=ATDDR0H;
ATD_value1=ATDDR1H;
ATD_value2=ATDDR2H;
ATD_value3=ATDDR3H;
if(delay==1){
if(i<40){
total[i]=(ATD_value0*ATD_value0);
sum+=total[i];
i++;
}
}
sum=sum/40;
min=sum;
rms=sqrt(min);
}
Link Error:L1822 Symbol _FUFLOAT is undefined
Started by ●June 17, 2004
Reply by ●June 18, 20042004-06-18
Hi,
You missed to include the ANSI library (you will need as well for the sqrt()
call).
_FUFLOAT is a runtime library function, so you need to link one of the ANSI
libraries with it.
(see in \lib\HC12c\lib for the library listing files)
Obviously you are using floating point in your application, so the linker
asks for floating point support.
Maybe you selected during the project creation only to use integral libraris
(no float)?
E.g. If you want to use the banked memory model with float IEEE32, double
IEEE32 you need the ansib.lib.
See as well the readme in \lib\HC12c, or simply create a project from the
wizard with your desired floating point settings.
Erich
You missed to include the ANSI library (you will need as well for the sqrt()
call).
_FUFLOAT is a runtime library function, so you need to link one of the ANSI
libraries with it.
(see in \lib\HC12c\lib for the library listing files)
Obviously you are using floating point in your application, so the linker
asks for floating point support.
Maybe you selected during the project creation only to use integral libraris
(no float)?
E.g. If you want to use the banked memory model with float IEEE32, double
IEEE32 you need the ansib.lib.
See as well the readme in \lib\HC12c, or simply create a project from the
wizard with your desired floating point settings.
Erich