title: Buildroot ARM Toolchain for arm7tdmi to compile SourceForge Archopen
body: <p>I'm interested in compiling the sourceforge project <a href="https://svn.code.sf.net/p/archopen/code/ArchOpen/trunk/" rel="nofollow">https://svn.code.sf.net/p/archopen/code/ArchOpen/trunk/</a>, and more especifically the app AOnes, which is a NES emulator for Archos Gmini 400 (Inactive old project)</p>
  
  <p>Analyzing the source code, I saw that the Gmini400 is an arm7tdmi device, no MMU and the toolchain used to compile was a buildroot one named arm-linux-nofpu.
  I supposed (according to the buildroot-2009-02 menuconfig) that no-fpu means soft floating point, so i tried to build such a toolchain.</p>
  
  <p>I build a toolchain with buildroot-2013-02 (both year 2009 and 2010 don't work for me) with the following options:</p>
  
  <ul>
  <li>arm7tdmi </li>
  <li>no MMU</li>
  <li>Software Floating Point</li>
  <li>Enable elf2flt support (i saw there were such a reference in the
  Makefile of ArchOpen)</li>
  </ul>
  
  <p>I let the other options as they were and made the build.</p>
  
  <p>I made a checkout of ArchOpen, launch the configuration script to choose Gmini4XX as the target (and not Gmini 402 chich is quite different), selected to defaut.rules and edit the resulting Makefile.conf to adapt the tools paths and names (as my generated toolchain name is different)</p>
  
  <p>First error:</p>
  
  <pre><code>[thread.o]
  {standard input}: Assembler messages:
  {standard input}:1236: Error: Rn must not overlap other operand -- swpb r0,r3,[r0] 
  </code></pre>
  
  <p>Well, this code is supposed to be working, but i opened thread.h and corrected the source to pass through (adding a "&amp;")</p>
  
  <p>Second error:</p>
  
  <pre><code>undefined reference to __aeabi_idivmod and undefined reference to __aeabi_ldivmod
  </code></pre>
  
  <p>As google says, it seems to be a -lgcc missing problem.
  I edited the wav folder makefile to add -lgcc and specified <code>-L/lib_folder_of_my_toolchain_containing_libgcc.a</code></p>
  
  <p>Third error: </p>
  
  <pre><code>in gcc/config/arm/lib1funcs.asm : multiple definition of __divsi3
  in gcc/config/arm/lib1funcs.asm : undefined reference to raise
  in libgcc.a (some .o inside) : undefined reference to __aeabi_unwind_cpp_pr0
  </code></pre>
  
  <p>I've no idea to solve this... </p>
  
  <p>Does anyone have an idea? Does anyone can help me to get a working arm7 toolchain compatible with this archopen code?</p>
  
  <p>Thanks!</p>