GCC ARM linking third party library

Asked by Sid Price

I am working with a Xilinx Zynq SOC, it has dual core ARM A9. The application I am writing needs to use the FTDI D2xx library supplied from their web site. The library uses "hard float", so I added the following options to the compiler on the "Optimization" TAB of Eclipse:

-mfloat-abi=soft -mfpu=neon

However when I build the application I see many errors like the following:

Invoking: ARM Linux gcc linker
arm-xilinx-linux-gnueabi-gcc -L"C:\Data_Root\Projects\theProject\bin" -o"CDR_ISP.elf" ./src/CDR_ISP.o -lftd2xx -lrt -lpthread -ldl
c:/xilinx/14.4/sdk/sdk/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.3/../../../../arm-xilinx-linux-gnueabi/bin/ld.exe: error: ./src/CDR_ISP.o uses VFP register arguments, CDR_ISP.elf does not

Being fairly new to GCC ARM I would appreciate some pointers of how to resolve this issue, thanks,
Sid

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Sid Price
Solved:
Last query:
Last reply:
Revision history for this message
Roman Došek (formatsh) said :
#1

If the library uses hard float, you have to compile the rest of your project as hard float too.

That means you have to use options: -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon

That forces compiler to generate instructions for floating point unit (hard float), instead of emulating them (soft float).

Let me know if I can help more,
Roman

Revision history for this message
Sid Price (sidprice) said :
#2

Roman, thanks for the input. I had previously tried those options and still could not get the application and library linked. In the end the vendor was able to supply a version of the library using soft float. Pressure to move the project forward means that my client accepted that as a solution.

Again, many thanks for responding, it is much appreciated,
Sid