title: ARM v5 shared library (ftd2xx) on ARM v7 platform - hard vs soft float issue
body: <p>I need to run a program that uses ftd2xx on my BeagleBoard xM rev C running Ubuntu 12.04. I am trying to use the ARM library libftd2xx.so provided <a href="http://www.ftdichip.com/Drivers/D2XX.htm" rel="nofollow">here</a>. libFTDI is not an option.</p>
  
  <p>The difference that I noticed comes from running <code>readelf -hA</code> on libftd2xx.so vs other libraries on the BeagleBoard that work. The arch-specific section gives OS name as "ARM926EF-S" for ftd2xx instead of "7-A" for other libraries and CPU_arch as "v5TEJ" instead of "v7".</p>
  
  <p>I'm assuming this means that the library is meant for the ARM v5 instruction set, and the BeagleBoard is running ARM v7. Is there some way to get ftd2xx to work?</p>
  
  <p>Edit: I've been told ARM7 is backward compatible with ARM5, but that does not solve my problem.</p>
  
  <p>Another thing to note is that running <code>ldd libftd2xx.so</code> on the BeagleBoard does not list the dependencies, but prints out <code>not a dynamic executable</code>, whereas it works on other libraries.</p>
  
  <p>EDIT 2: </p>
  
  <p>The issue seems to be with a soft vs hard float ABI. I have a gnueabihf image on the BeagleBoard xM. When I try to compile an example program with the static libftd2xx.a, I get many of these:</p>
  
  <p><code>
  /usr/bin/ld: error: static_link_uses VFP register arguments, libftd2xx.a(file.o) does not<br>
  /usr/bin/ld: failed to merge target specific data of file libftd2xx.a(file.o)</code></p>
  
  <p>If I try to compile with <code>mfloat-abi=soft</code> or <code>mfloatabi=softfp</code>, I get </p>
  
  <p><code>In file included from /usr/include/stdio.h:28:0,<br>
             from main.c:12:<br>
  /usr/include/features.h:324:26 fatal error: bits/predef.h: No such file or directory<br>
  compilation terminated</code></p>
  
  <p>I also tried to cross compile with <code>arm-linux-gnueabi</code> instead of <code>arm-linux-gnueabihf</code>, but the resulting program does not execute on the BeagleBoard. Is there anything I can do or is it impossible?</p>
  
  <p>--------- SOLUTION ----------------</p>
  
  <p>After some trouble, FTDI provided me with a hard float version of their library which works. I am providing it here after many people have individually requested it:</p>
  
  <p><a href="https://s3.amazonaws.com/hayk-public/arm926-hf.zip" rel="nofollow">https://s3.amazonaws.com/hayk-public/arm926-hf.zip</a></p>