Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fails to compile with cdcacm.elf uses VFP register arguments #59

Closed
pedrovanzella opened this Issue Nov 5, 2012 · 3 comments

Comments

Projects
None yet
4 participants

I'm trying to compile libopencm3 under Mountain Lion, with the Yagarto arm-none-eabi gcc distribution, but make fails with

/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-memcpy-stub.o) does not
/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-memcpy-stub.o)
/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-strlen.o) does not/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-strlen.o)

It may be a problem with Yagarto not using VFP register arguments, but it may be fixable by not using that on examples/stm32/f4/stm32f4-discovery/usb_cdcacm/ (which is the part that fails).

Contributor

ksarkies commented Nov 5, 2012

On 05/11/12 12:08, Pedro Vanzella wrote:

I'm trying to compile libopencm3 under Mountain Lion, with the Yagarto
arm-none-eabi gcc distribution, but make fails with

|/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-memcpy-stub.o) does not
/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-memcpy-stub.o)
/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-strlen.o) does not/usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/local/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/lib/thumb/v7m/libc.a(lib_a-strlen.o)
|

It may be a problem with Yagarto not using VFP register arguments, but
it may be fixable by not using that on
|examples/stm32/f4/stm32f4-discovery/usb_cdcacm/| (which is the part
that fails).


Reply to this email directly or view it on GitHub
#59.

It looks like the C library being used in the examples needs to be fixed
to handle hard floating point which is what the stm32f4 lib and examples
are using?

nagromo commented Nov 10, 2012

I had the exact same error, but I'm using the latest version of summon-arm-toolchain under Ubuntu 12.10.

I ran arm-none-eabi-gcc -print-multi-lib and I do see what appears to be floating point support. Any idea why it isn't using the right library? I checked the makefile and both the GCC and LD flags use all the flags listed for the cortex-m4.

$ arm-none-eabi-gcc -print-multi-lib
.;
thumb/arm7tdmi-s;@mthumb@mcpu=arm7tdmi-s
thumb/cortex-m0;@mthumb@mcpu=cortex-m0
thumb/cortex-m3;@mthumb@mcpu=cortex-m3
thumb/cortex-m4;@mthumb@mcpu=cortex-m4
thumb/cortex-m4/float-abi-hard/fpuv4-sp-d16;@mthumb@mcpu=cortex-m4@mfloat-abi=hard@mfpu=fpv4-sp-d16

The usb_cdcacm project fails but the mandelbrot project succeeds (although I can't see the results as I don't have UART2 hooked up).

Here's the exact messages I got from make:

/home/morgan/sat/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /home/morgan/sat/bin/../arm-none-eabi/lib/libc.a(lib_a-memcpy.o) does not
/home/morgan/sat/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /home/morgan/sat/bin/../arm-none-eabi/lib/libc.a(lib_a-memcpy.o)
/home/morgan/sat/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: error: cdcacm.elf uses VFP register arguments, /home/morgan/sat/bin/../arm-none-eabi/lib/libc.a(lib_a-strlen.o) does not
/home/morgan/sat/lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /home/morgan/sat/bin/../arm-none-eabi/lib/libc.a(lib_a-strlen.o)
collect2: ld returned 1 exit status
make: *** [cdcacm.elf] Error 1
Owner

esden commented Apr 26, 2013

As @nagromo said in the issue #65 this issue is resolved by compiling from the toplevel directory. Closing the issue. :) (also I am not sure yagarto supports multilib the way we expect it to be used) please try to use gcc-arm-embedded if in doubt and let us know. It definitely works for me using that toolchain.

@esden esden closed this Apr 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment