New IT forum Follow us on Twitter
21 May 2012, 04:52:14 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Using MinGW to Cross-Compile for the Sheevaplug  (Read 876 times)
interlocked
Newbie
*
Posts: 3


« on: 23 May 2011, 04:31:29 pm »

Hello,

New Sheevaplug owner here!  I'm quite pleased with my box, although I do have plans to take it out of its ill-fitting plastic shell and enclose it in a nice piece of steel with a couple full serial ports for company. Wink

However, to get the ball rolling, what I would like to do is set up MinGW to cross-compile for the plug so that I can build existing apps/write my own.  I'd rather not do any of this on the plug itself.
So far I've managed the following:-
  • Installed the latest version of MinGW with the MSYS Development Kit;
  • Obtained a copy of the latest binutils source (binutils-2.21.tar.bz2);
  • Obtained gcc-core-4.6.0.tar.bz2 and its dependencies: gmp-5.0.2.tar.bz2, mpfr-3.0.1.tar.bz2 and mpc-0.9.tar.gz;
  • Obtained newlib-1.19.0.tar.gz for standard library support.

I've built binutils successfully (using the "arm-elf" target), as well as GCC and its dependencies (--with-cpu=arm9e), but cannot get newlib to build.
The error I get is:-
Code:
arm-elf-gcc -B/mingw/arm-elf/newlib/arm-elf/fpu/newlib/ -isystem /mingw/arm-elf/
newlib/arm-elf/fpu/newlib/targ-include -isystem /d/mingw/newlib-1.19.0/newlib/li
bc/include -B/mingw/arm-elf/newlib/arm-elf/fpu/libgloss/arm -L/mingw/arm-elf/new
lib/arm-elf/fpu/libgloss/libnosys -L/d/mingw/newlib-1.19.0/libgloss/arm  -mfloat
-abi=hard -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSI
ON=\"1.19.0\" -DPACKAGE_STRING=\"newlib\ 1.19.0\" -DPACKAGE_BUGREPORT=\"\" -DPAC
KAGE_URL=\"\" -I. -I/d/mingw/newlib-1.19.0/newlib/libc/stdlib -DARM_RDI_MONITOR
-fno-builtin      -g -O2 -pipe  -mfloat-abi=hard -c -o lib_a-__adjust.o `test -f
 '__adjust.c' || echo '/d/mingw/newlib-1.19.0/newlib/libc/stdlib/'`__adjust.c
{standard input}: Assembler messages:
{standard input}:23: Error: selected processor does not support ARM mode `stfe f4,[sp,#-12]!'
{standard input}:30: Error: selected processor does not support ARM mode `ldfd f0,.L11'
{standard input}:31: Error: selected processor does not support ARM mode `ldfd f4,.L11+8'
{standard input}:38: Error: selected processor does not support ARM mode `mvfned f4,f0'
{standard input}:42: Error: selected processor does not support ARM mode `mvfd f0,f4'
{standard input}:43: Error: selected processor does not support ARM mode `ldfe f4,[sp],#12'
{standard input}:51: Error: selected processor does not support ARM mode `ldfd f4,[r1,#0]'
{standard input}:56: Error: selected processor does not support ARM mode `mnfned f4,f4'
{standard input}:68: Error: selected processor does not support ARM mode `mufd f4,f4,f0'
{standard input}:78: Error: selected processor does not support ARM mode `mvfd f4,#0'
{standard input}:87: Error: selected processor does not support ARM mode `dvfd f4,f4,f0'
make[8]: *** [lib_a-__adjust.o] Error 1
Can anyone help me with where I go from here?
Logged
Confusticated
New IT customer
Hero Member
*
Posts: 511


« Reply #1 on: 23 May 2011, 09:34:15 pm »

I cant see the switch that sets the cpu type in the arguments.
Check that you have run './configure' with the correct switches (in case you are unaware, it is this that creates the 'Makefile').
Logged

Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
interlocked
Newbie
*
Posts: 3


« Reply #2 on: 24 May 2011, 06:03:41 am »

Here is the line I used to configure GCC:-
Code:
configure --enable-languages=c --with-cpu=arm9e --enable-interwork --enable-multilib --with-gcc --with-gnu-ld --with-gnu-as --with-stabs --disable-shared --disable-threads --disable-win32-registry --disable-nls --target=arm-elf --with-gmp-include=/mingw/gmp-5.0.2 --with-gmp-lib=/mingw/gmp-5.0.2/.libs --with-mpfr-include=/mingw/mpfr-3.0.1 --with-mpfr-lib=/mingw/mpfr-3.0.1/.libs --with-mpc-include=/mingw/mpc-0.9/src --with-mpc-lib=/mingw/mpc-0.9/src/.libs --with-newlib --prefix=d:/mingw/cross-gcc/arm-elf -v 2>&1 | tee gcc_configure.log
Logged
sfzhi
Jr. Member
**
Posts: 54


« Reply #3 on: 24 May 2011, 06:42:44 pm »

I believe you need "--with-arch=armv5te" rather than "--with-cpu=arm9e".
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!