Problems with Cortex, floating point and multilib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've built a toolchain w/the multilib as in the attached t-arm-elf.

http://www.zylin.com/gccbinary.html

However, multilib and Cortex has some hickups w.r.t. floating point format,
which requires floating point format to be specified on the
command line.

/* Test app to check that multilib works */
int main(int argc, char **argv)
{
}

Invoke: arm-elf-gcc -mfpu=vfp -mcpu=cortex-m3 -mthumb test.c

And you get:

/tmp/cccL5n1B.o uses FPA instructions, whereas a.out does not

The solution is to add -mfpu=vfp to the command line:

arm-elf-gcc -mfpu=vfp -mcpu=cortex-m3 -mthumb test.c

Here is what I believe is going on:

There are two different types of floating point VFP and FPA. The key
point is that they are not compatible.

Does -march=armv7 imply  VFP, whereas mcpu=cortex-m3 does not?

Binutils produces an error message that is misleading. The real problem
is that the types of floating point are being mixed.

Is this behaviour intentional?

Should I add VFP & FPA to t-arm-elf as multilib permutations?


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer

Free eCos workshop in Oslo October 21!
http://www.zylin.com/workshop.html

Attachment: t-arm-elf
Description: Binary data


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux