Floagin Point - Illegal Instruction

azzido
Today I realized that I can't run an application based on floating point.

int main(void)
{
   double x = 3.1415;

   printf("%lf",x);
 
   return 0;
}

How can I make working floating point ? I should to specify some arguments
in command line at compiling ? EABI ?

Regards !

davef
Seeing as no one else responded I can only suggest a few things to
investigate.

I have seen some comments about floating point libraries for this platform.
 

-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t

Not sure what this is for, but it looks like it leaves out the floating
point library.  Maybe, floating point is in by default. 

I know, say for AVR 8bit chips and GCC, you have an option of bringing in
or leaving out the floating point library (libm, I think).

Also, printf . . . what are you printing to?  Thought printk was the call
for output to the console.

HTH

Vladimir Fonov
Attachment: test_float.c (115 Byte)
Hello,

compiling attached program with arm-linux-gcc test_float.c -o test_float
works fine on my mini2440 ( I am running 2.6.32.2 kernel )

skip2816
Hi azzido,

maybe its help: Any weeks ago, I built kernel 2.6.29 from sources of these
site.
cp config_mini2440_t35 .config 
done and before make I walked thru make menuconfig. I found there was no
floting point emulation activated but a hint I have to activate one. I have
never tested the result leaving floting point emulation unchecked.

skip