[En-Nut-Discussion] Nut/OS ARM eCross-EABI toolchain

Ulrich Prinz ulrich.prinz at googlemail.com
Mon Jun 11 22:19:18 CEST 2012


Hi Dieter,

Be sure to have the eCross toolchain installed somewhere.
I recommend either ~/toolchains/arm-eCross or /opt/arm-eCross.

If not installed or the installed version does not work:
You seem to have a 64bit Ubuntu running like myself. To avoid 
complications with the 32bit libraries the host needs to supply to the 
precompiled eCross, I recompiled it from scratch using the script from 
Oles homepage:
http://www.embedded-it.de/bsp/eCross.php

1) Download "Sourcen ARM eCross EABI Toolchain-Builder inkl. Patches"
(I don't give a hard link as this link might change if updates are applied.)

2) untar with tar xzf what_you_downloaded_before.tar.gz will create a 
directrory named eCross

3) cd eCross/downloads, chmod +x download_sources.sh

4) Download all needed sources by ./download_sources.sh

5) cd .. and DO NOT run ./toolchain-builder.sh...
As I said we have a 64bit host system and the toolchain needs to be 
aware of that while building it. So edit the above mentioned script and 
fins all places where it calls configure ABI="32" and replace it with 
ABI="64"

Then call ./toolchain-builder.sh and get yourself a cup of tea and a book.

[Trick]
If you have a multi-core CPU in your host computer you might like to 
find all lines calling $MAKE || echo "some error printing here" and 
replace the beginning with $MAKE $NCPU || ...
Then add at the beginning of the file:
export $NCPU -j5
where 5 is the number of cores that should be used by the compiler for 
making +1... So if you have 4 cores you can set -j5.
This speeds up building of the toolchain very much.
[/Trick]

Now a few minutes later the compiler is ready to be installed by you.
The directory arm-eCross-eabi could be moved wherever you like, I moved 
it to /opt/ and renamed it to arm-eCross

Now you do something like export
CROSS_COMPILE=/opt/arm-eCross/bin/arm-eCross-eabi-
and compile a kernel for your android tablet (like I do) or do a make of 
your preferred arm or cortex project with Nut/OS

The benefit of this somewhat complicated way of creating the toolchain 
is, that you can use the compiler without having the old bridge libs 
installed, that connect 32 and 64 bits worlds and it is slightly faster.

Feel free to ask any questions if there is something broken or missing.

Best regards
Ulrich

Am 09.06.2012 12:33, schrieb diek:
> Hallo Ole,
>
> Thanks for the quick response.
>
> I've done:
>
>> You could try to open qnutconf from within a terminal window.
>> Anyway you have to logout and re-login first after the changes
>> of .bashrc take effekt.
>>
>> If you want to be sure:
>>
>> Just add the same line at the end of
>>
>> /etc/profile
> this is without effect.
>
>> Have you tried to call the compiler by hand from within a terminal
>> window?
>>
>> e.g.:
>>
>> ~/arm-eCross-eabi/bin/arm-eCross-eabi-gcc --version
>
> diek at diek-X39:~$ arm-eCross-eabi/bin/arm-eCross-eabi-gcc --version
> bash: arm-eCross-eabi/bin/arm-eCross-eabi-gcc: Datei oder Verzeichnis
> nicht gefunden
>
>> If it does not start:
>>
>> Are the attributes set correctly (the x-bit set for the user / group?)?
>> This should be ok, when just extracting the archive with tar.
> -rwxr-xr-x 1 diek diek  228876 Jan  8  2011 arm-eCross-eabi-cpp
>
>> Later down I see that you are using a 64bit system. The toolchain is
>> compiled for 32bit systems. Have you installed the 32bit compatibility
>> layer / libraries? Perhaps there is any library missing?
>>
>
> This could be the problem, I have nothing installed.
> what are the names for the 32bit compatibility layer ?
> I hope the libs are in the package for 64bit.
>
>>
>> If you can _not_ start the binary directly by calling
>>
>> ./arm-eCross-eabi-gcc
>>
>> from within
>>
>> ~/arm-eCross-eabi/bin
>>
>>
>> then please call
>>
>>
>> ldd ~/arm-eCross-eabi/bin/arm-eCross-eabi-gcc
> diek at diek-X39:~$ ldd arm-eCross-eabi/bin/arm-eCross-eabi-gcc
>           \tdas Programm ist nicht dynamisch gelinkt
>> and send me the output. I can than tell you which libraries are missing
>> on your system and should be installed.
> I hope this information will help to solve the problem.
>
> Thanks and best regards,
> Dieter
>
>
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list