RTEMS GCC BIG ENDIAN SUPPORT

Aby Tom abythayil at gmail.com
Fri Aug 2 05:37:42 UTC 2019


Dear Joel Sherrill, Sebastian Huber,  Pavel Pisa, and enthusiastic  RTEMS
community,

I am working on Texas board TMS570LC4357 in RTEMS version 4.11.
I have managed to make the board support package and my sample application
worked perfectly on board.

Currently, I have started working on an application project which
includes *RTEMS
Makefile as a child Makefile* in my project. I use Eclipse IDE.
I was able to link RTEMS libraries and sources required for the application
into my project.

After this, I came across an error which is quite confusing for me.

*“**/opt/rtems/4.11/bin/arm-rtems4.11-ld: **rpc**.o: compiled for a
big-endian system and target is little-endian**”* which is a strange error
because the target is definitely big-endian(TMS570).

rpc is a source file used for my application.

Note that *I am using the RTEMS toolset to compile my project** and build
binaries for the application.*
My project does contain many other source files which should be compiled as
per big-endian configuration.

The CFLAGS script I used inside the Makefile for target configuration is as
follows:

-march=armv7-r -mthumb -mbig-endian -D__ARMEB__ -D__VFP_NOFP__
-mfpu=vfpv3-d16 -mfloat-abi=hard

This configuration is for ARM Cortex-R5F processor, floating-point
disabled, and big-endian target.
TMS570 series are big-endian variants and hence I have configured it in
such a way.  (Texas Instruments TMS570LC4357 )

I have configured the RTEMS toolchain as per the official RTEMS
documentation. I build the TMS570 BSP with the same CFLAGS script for a
sample RTEMS application as mentioned above and it worked like a charm.
(Here I used *RTEMS Makefile as the parent makefile*)

While going through RTEMS mailing lists, I could not find adequate
information on this issue.

So my questions are:


   1. What is the reason for above-described error “*compiled for a big
   endian system and target is little endian*” ?

Is it because the RTEMS GCC by default doesn’t support big-endian?


   1. If so, how to make the RTEMS GCC compiler to support big-endian
   targets?

Should I re-build RTEMS toolchain with big-endian supported GCC?

I have found a thread (
*https://lists.rtems.org/pipermail/devel/2014-June/007232.html*
<https://lists.rtems.org/pipermail/devel/2014-June/007232.html>  ) from
Pavel Pisa regarding this.
Can I use the experimental GCC found at
*https://rtime.felk.cvut.cz/debian/pool/main/g/gcc-4.9.3/*
<https://rtime.felk.cvut.cz/debian/pool/main/g/gcc-4.9.3/> for my project
or should I configure GCC by myself?


   1. Is there any other RTEMS toolchain components need to be configured
   (for example *binutils* )?


I really need some help to make any further progress.

Thank you for your time and consideration.

Best regards,
Aby Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190802/4e33bbc6/attachment.html>


More information about the users mailing list