Maverick Crunch toolchain for Linux apps on Cirrus'
EP93xx:
If somebody wants to compile and link Linux applications that
makes use of Maverick Crunch co-processor, they will first need
a proper toolchain. This is because vanilla gcc-3.4 is
producing bad code which has no chance to run on the silicon.
Ever. We've tried to put together a patch against gcc-3.4.x,
which hopefully should work. It is essential to realize that
there is two sides of the problem - kernel and user level.
The standard ARM Linux kernel requires a patch that recognize
Crunch instructions and to do the usual housekeeping, like
saving the FP registers, turning the FPU on and off, depending
on whether the application is using the co-processor or not (in
order save power), etc.
The other side is the assembler and the C compiler. As of now,
Maverick Crunch apps for Linux can be linked only statically.
Well, technically you can link them dynamically too, but don't
expect them to work with Glibc that is not compiled for Maverick
Crunch. :-) The mandatory flags to use with Crunch GCC are
"-mcpu=ep9312 -mfix-crunch-d[01]". Select 0 or 1 depending on
the silicon revision you're targeting. Use "-mfix-crunch-d0"
for D0 and "-mfix-crunch-d1" for D1, E0 and newer chips. Don't
forget "-mcpu=ep9312" - this flag triggers the actual Maverick
Crunch FP code generation. Attempts to mix Crunch-GCC generated
code with one generated by standard GCC for any other ARM
compliant FPUs, will fail miserably. Don't do it even for soft
FP - it won't work anyway.
In the download section you'll find patch against the latest (as of
March 15, 2005) linux-2.6.11.3 kernel from
bk://linux-cirrus.bkbits.net/linux-2.5 and patches against binutils-2.15
and gcc-3.4.3 along with build scripts. These scrips may or may not
work for you, but they contain enough information for you to do it
manually or build your own srcipt(s).
Click
here
to download the latest toolchain patches and
here
for the Linux 2.6 kernel patches.