Hi All,
I am hoping to use GCC to compile code for the TMS570LS3137 or TMS570LS43x processor which are big endian Cortex-R4 and Cortex-R5F respectively.
I have found some old instructions here: TMS570LS and GCC compiler - Hercules safety microcontrollers forum - Hercules ︎ safety microcontrollers - TI E2E support forums. I will attempt to follow them today.
Can anyone provide some explanation of how to build GCC including the libraries for big endian? Is there a recent, pre-build set of tools that support these processors?
Thanks!
I've not tested with these devices, but do you not just need to add "-mbig-endian" to the compiler command line?
Which gcc release are you using? Arm provides the below:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
Hi,
I'm afraid the binary releases for the RM profile builds of GCC do not contain big-endian multilibs.
So while the compiler may be able to generate code using -mbig-endian it would be able to link this to an executable.
Some headers will also likely be missing.
Kind Regards,
Tamar
This has been my experience.
Are there any instructions to build the big-endian multilibs?
engineerofspace
Not that I am aware of, if you just require a cross build you have two options:
Use a tool such as https://github.com/crosstool-ng/crosstool-ng which allows you to generate a compiler for a specific target.
You can then just create a big endian target using this. Otherwise you could download the source for the GNU releases and modify the multilibs list to include a big endian multilib.
We did build a version with big-endian support:https://www.sciopta.de/ftp/
Not sure if anyone else
I recently struggled through this problem. It is easy to compile big endian using -mbig-endian, but the program cannot be linked if only little-endian libraries are provided.
After much toil in trying to build a GCC cross-compiler and search the internet for solution, I found binaries for a big-endian cross compiler (armeb) on linaro.org here:
https://releases.linaro.org/components/toolchain/binaries/latest-7/armeb-eabi/
If you are using Microsoft Windows, unzip gcc-linaro-7.5.0-2019.12-i686-mingw32_armeb-eabi.tar.xz somewhere on your computer. If you are using CCS you can then add the toolchain in your preferences. You will have to manually configure all of the compiler options (endianness, architecture, CPU, FPU, etc). I was able to build, link and execute the whole thing on TMS570LS1224 with no problems.
You must compile everything with option -mbig-endian; however, if the big endian libraries are not present in the toolchain, then the linker will fail due to the built-in libraries being incompatible with the compiled code.
Thanks, I will check this out. I'll report back if it works for me.
Thanks, I will check it out and report back if it works for me.
engineerofspaceDid you end up going with the linaro cross-compiler? I'm in a similar boat (toolchain setup to use arm gcc, but link stage fails due to no big endian gcc libs). Curious how you addressed the big-endian issue. Thanks!