0

I'm interested in compiling the sourceforge project https://svn.code.sf.net/p/archopen/code/ArchOpen/trunk/, and more especifically the app AOnes, which is a NES emulator for Archos Gmini 400 (Inactive old project)

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.

I build a toolchain with buildroot-2013-02 (both year 2009 and 2010 don't work for me) with the following options:

  • arm7tdmi
  • no MMU
  • Software Floating Point
  • Enable elf2flt support (i saw there were such a reference in the Makefile of ArchOpen)

I let the other options as they were and made the build.

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)

First error:

[thread.o]
{standard input}: Assembler messages:
{standard input}:1236: Error: Rn must not overlap other operand -- swpb r0,r3,[r0] 

Well, this code is supposed to be working, but i opened thread.h and corrected the source to pass through (adding a "&")

Second error:

undefined reference to __aeabi_idivmod and undefined reference to __aeabi_ldivmod

As google says, it seems to be a -lgcc missing problem. I edited the wav folder makefile to add -lgcc and specified -L/lib_folder_of_my_toolchain_containing_libgcc.a

Third error:

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

I've no idea to solve this...

Does anyone have an idea? Does anyone can help me to get a working arm7 toolchain compatible with this archopen code?

Thanks!

Cheloute
  • 783
  • 2
  • 11
  • 27
  • 1
    Just a thought, did you try `-fno-exceptions`? I am not sure, but I think exceptions aren't that popular for embedded systems. – a3f Mar 19 '15 at 23:45
  • Try with a more recent Buildroot. However, the ARM noMMU support is clearly not great in Buildroot right now, so you should expect some issues. But patches are welcome! – Thomas Petazzoni Mar 20 '15 at 12:33
  • @a3f : nope, no change... – Cheloute Mar 20 '15 at 19:23
  • @ThomasPetazzoni : I'm going to... But this project was made between 2006 and 2008, so I imagine it should work with a 200X buildroot, shouln't it? Anyway, I chose the 2013 buildroot because 1- it compiles :) 2- It allows me to choose the arm7tdmi as a target. The 2015-02 buildroot version does not... – Cheloute Mar 20 '15 at 19:29
  • The toolchain seems to work if it's built on ubuntu 5.04 with buildroot 0.9.27 (the oldest I found), choosing a generic ARM processor no MMU. The buildroot build will fail asking for libfloat. Nevertheless the final GCC (3.3.5) is ready to work, so it's possible to compile yours from libfloat-990616.orig.tar.bz2. Once it's compiled we just have to copy in $PREFIX/lib directory and relaunch the buildroot make. MediOS compile with such a toolchain, I'll test it before making this question as resolved. – Cheloute Apr 13 '15 at 16:43

1 Answers1

0

Well, in this particular case, back to 2005 was a good solution...

With a ubuntu 5.04, buildroot has been built with the defaut generic ARM (little endian) configuration, except for the following options:

  • GCC 3.3.5
  • No use the daily uClibc snapshot
  • The processor has no MMU
  • No support large file
  • Use softfloat by default
  • No install busybox (as I only wanted the toolchain)
  • No create an Ext2 filesystem (same reason than above)

The build fail just after having compiled the last GCC phase. At this point, add the buildroot/build_arm_nofpu/staging_dir/bin in the PATH env. variable, download the libfloat source (libfloat-990616.orig.tar.bz2) tarball, edit the Makefile changing gcc, ld and as repectively by arm-linux-uclibc-gcc, arm-linux-uclibc-ld and arm-linux-uclibc-as and build libfloat (make clean & make). Copy libfloat.a into buildroot/build_arm_nofpu/staging_dir/lib and run the buildroot make again (without cleaning). The build should end successfully. With this toolchain, mediOS will compile without any warning.

Cheloute
  • 783
  • 2
  • 11
  • 27