Building ARM in big-endian mode

Joel Sherrill joel.sherrill at OARcorp.com
Wed Feb 26 14:25:17 UTC 2003



Ralf Corsepius wrote:
> 
> Am Mon, 2003-02-24 um 21.34 schrieb Charles Steaderman:
> > I would like to rebuild RTEMS and my application for ARM in big-endian mode.
> 
> Meanwhile, having investigated a bit further, I found that
> 
> 1.
> * arm-rtems-gcc and arm-rtems-binutils both support big-endian arm.
> * arm-rtems-newlib currently is only built for little-endian.
> 
> => The current arm-rtems-gcc+newlib toolchain only supports
> little-endian arm.
> 
> Extending arm-rtems-gcc+newlib to support big-endianness would be
> trivial, but doesn't make much sense unless 2. below can be resolved.
> 
> 2. The arm port in RTEMS currently only supports little-endian arm, but
> probably can extended to big-endian arm without too much effort by
> someone actually using big-endian arm.
> 
> So the crucial questions would be:
> * Why do you want to use ARM in big-endian mode?
> * What is it that prevents you from using little endian arm?
> * Would you be willing to extend RTEMS arm port to big endianness?

I would add that I don't expect it to be difficult to fix the ARM
port to switch.  Once the multilib for big and little endian is in
place,
then there should be a gcc cpp predefine to indicate which mode to
use.  Then the endianness setting in score/cpu/arm/rtems/... must
be switched to a conditional.

It is also possible that newlib has some endianness tests in its header
files.  I recall having seen some there before.

It won't take much to fix it.  Just a few lines of code in the right
place.

> Ralf

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list