Support for TMS570 Cortex-R4F Big-Endian
It doesn't appear the toolchain supports the big endian mode of the TI TMS570 series microcontrollers. What would be required to add this support? Is it possible to add the big endian configuration and rebuild from source?
Thank you,
Ed
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Ed Carter
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
Hi Ed Carter,
Thanks for using the tool and report this issue.
For now, big endian support for armv7-r can be done by easily modifying the build-toolchain.sh, then rebuild the whole tool step by step as the pdf document described.
As for the modification to build-toolchain.sh:
1, add "--with-endian=big" to gcc configuration options, for both gcc-first and gcc-final (also for mingw part if you need it);
2, add "-mbig-endian" to newlib's CFLAGS_FOR_TARGET environment.
You can download the source package from this project website, build-toolchain.sh can be found in top level directory after you extracting it using 7z and tar.
Hoping this will help, please let us know for any further questions.
Thanks.
Revision history for this message
![]() |
#2 |
Sorry, please ignore the previous answer for now, I just noted that "--with-endian=big" does not work as I expected.
I will investigate it and come up an answer tomorrow.
Sorry for disturbing.
Revision history for this message
![]() |
#3 |
I was hoping it was that easy. Thank you for the help, I will give it a shot.
--- a/build-
+++ b/build-
@@ -125,6 +125,7 @@ $SRCDIR/
--
--with-gnu-as \
--with-gnu-ld \
+ --with-endian=big \
--
--
--
@@ -151,7 +152,7 @@ popd
echo Task [1-10] /$HOST_
saveenv
prepend_path PATH $INSTALLDIR_
-saveenvvar CFLAGS_FOR_TARGET '-g -O2 -fno-unroll-loops'
+saveenvvar CFLAGS_FOR_TARGET '-g -O2 -fno-unroll-loops -mbig-endian'
rm -rf $BUILDDIR_
pushd $BUILDDIR_
@@ -207,6 +208,7 @@ $SRCDIR/
--with-gnu-ld \
--with-newlib \
--
+ --with-endian=big \
--
--
--
@@ -429,6 +431,7 @@ $SRCDIR/
--with-gnu-ld \
--
--with-newlib \
+ --with-endian=big \
--
--
--
Revision history for this message
![]() |
#4 |
Thanks chengbin, that solved my question.
Revision history for this message
![]() |
#5 |
Did you have the built tool worked for big endian, or just have it built with the patch?
It seems "--with-endian=big" does not work for me, since libgcc.a, etc. are still built with little endian.
I will investigate it.
Revision history for this message
![]() |
#6 |
The following patch works for me to build big endian program for armv7-r.
Please verify. I will look into the --with-endian=big issue tomorrow.
*** ./build-
--- ./build-
***************
*** 104,109 ****
--- 104,111 ----
popd
echo Task [1-9] /$HOST_
+ saveenv
+ saveenvvar CFLAGS_FOR_TARGET '-mbig-endian -g -O2'
rm -rf $BUILDDIR_
pushd $BUILDDIR_
$SRCDIR/
***************
*** 134,146 ****
-
"
"
! --with-
make -j$JOBS all-gcc
make htmldir=
popd
pushd $INSTALLDIR_LINUX
rm -rf bin/arm-
--- 136,150 ----
-
"
"
! --with-
! --with-endian=big
make -j$JOBS all-gcc
make htmldir=
popd
+ restoreenv
pushd $INSTALLDIR_LINUX
rm -rf bin/arm-
***************
*** 151,157 ****
echo Task [1-10] /$HOST_
saveenv
prepend_path PATH $INSTALLDIR_
! saveenvvar CFLAGS_FOR_TARGET '-g -O2 -fno-unroll-loops'
rm -rf $BUILDDIR_
pushd $BUILDDIR_
--- 155,161 ----
echo Task [1-10] /$HOST_
saveenv
prepend_path PATH $INSTALLDIR_
! saveenvvar CFLAGS_FOR_TARGET '-mbig-endian -g -O2 -fno-unroll-loops'
rm -rf $BUILDDIR_
pushd $BUILDDIR_
***************
*** 182,187 ****
--- 186,193 ----
restoreenv
echo Task [1-11] /$HOST_
+ saveenv
+ saveenvvar CFLAGS_FOR_TARGET '-mbig-endian -g -O2'
rm -f $INSTALLDIR_
ln -s . $INSTALLDIR_
***************
*** 216,222 ****
-
"
"
! --with-
if [ "x$DEBUG_
make CFLAGS=
--- 222,229 ----
-
"
"
! --with-
! --with-endian=big
if [ "x$DEBUG_
make CFLAGS=
***************
*** 225,230 ****
--- 232,238 ----
fi
make htmldir=
+ restoreenv
pushd $INSTALLDIR_LINUX
rm -rf bin/arm-
Revision history for this message
![]() |
#7 |
Sorry, I replied before I saw your update. I am still working on getting the build environment setup. I will get back to it this evening.
Is there a way to do this with the multilib configuration for gcc to build both big and little endian versions of newlib?
Revision history for this message
![]() |
#8 |
Hi Ed Carter,
I am sorry for the misleading "--with-endian=big" option. This configuration option is not working for arm, so we can not make use of it.
Anyway, I think there are three potential methods, all need to rebuild from source:
1) specify CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET when building gcc and newlib. you can simply apply following patch to build-toolchain.sh:
-------
diff --git a/build-
index 73a7663..f731d1b 100755
--- a/build-
+++ b/build-
@@ -104,6 +104,9 @@ rm -rf ./lib
popd
echo Task [1-9] /$HOST_
+saveenv
+saveenvvar CFLAGS_FOR_TARGET "-mbig-endian -g -O2"
+saveenvvar CXXFLAGS_FOR_TARGET "-mbig-endian -g -O2"
rm -rf $BUILDDIR_
pushd $BUILDDIR_
$SRCDIR/
@@ -141,6 +144,7 @@ make -j$JOBS all-gcc
make htmldir=
popd
+restoreenv
pushd $INSTALLDIR_LINUX
rm -rf bin/arm-
@@ -151,7 +155,7 @@ popd
echo Task [1-10] /$HOST_
saveenv
prepend_path PATH $INSTALLDIR_
-saveenvvar CFLAGS_FOR_TARGET '-g -O2 -fno-unroll-loops'
+saveenvvar CFLAGS_FOR_TARGET '-mbig-endian -g -O2 -fno-unroll-loops'
rm -rf $BUILDDIR_
pushd $BUILDDIR_
@@ -182,6 +186,9 @@ popd
restoreenv
echo Task [1-11] /$HOST_
+saveenv
+saveenvvar CFLAGS_FOR_TARGET '-mbig-endian -O2 -g'
+saveenvvar CXXFLAGS_FOR_TARGET '-mbig-endian -O2 -g'
rm -f $INSTALLDIR_
ln -s . $INSTALLDIR_
@@ -238,6 +245,7 @@ popd
rm -f $INSTALLDIR_
popd
+restoreenv
echo Task [1-12] /$HOST_LINUX/gdb/
rm -rf $BUILDDIR_LINUX/gdb && mkdir -p $BUILDDIR_LINUX/gdb
-------
2) build armeb-none-eabi target toolchain, which is big endian arm target. Unfortunately, both build-toolchain.sh and newlib do not support armeb-none-eabi target right now.
3) modify the multilib definition to build big endian version of libgcc/libstdc++ and newlib. In this way, you need to understand the multilib infrastructure and modify the part of gcc makefile defining multilib, which I believe in file gcc/config/
Hoping this will help.
Revision history for this message
![]() |
#9 |
Hello,
I was able to successfully build a big-endian toolchain using method 1. I haven't run any code on a real processor yet, but it is compiling without any issues.
I would really like to know how to accomplish method 3, enabling both little endian and big endian support in a single toolchain. I think this could be a valuable feature for this gcc distribution. I haven't found any other that includes big-endian libraries, other than the commercial version of CodeSourcery.
Any suggestions for how to make the change in the multilib configuration would be appreciated. I will start doing some research as well.
Are you familiar with the --enable-biendian option for ARM targets? I was hopeful that option would accomplish #3, but it appears to be unsupported (toolchain compiled with it only included little endian libraries).
Thank you,
Ed
Revision history for this message
![]() |
#10 |
It's a little difficult to support big endian in multilib, I am trying this. You can refer to gcc/gcc/
We will support it in the future. Just for clarification, Is it ok for you to have big endian supported only for cortex-R profile? Or you need to have it for all profiles?
I am not familiar "--enable-
Given the bi-endian version of multilib are already supported by writing multilib configuration codes, then you can use "--enable/
Revision history for this message
![]() |
#11 |
Hi Ed Carter,
I scratched a patch to build both big/little endian libraries for armv7-r from the release source package. Please:
1) replace gcc/gcc/
-------
#Build below library for ARM armv7-r architecture.
# armv7-r/thumb -mthumb -march=armv7-r
# armv7-r/thumb/eb -mthumb -mbig-endian -march=armv7-r
# armv7-r/thumb/fpu -mthumb -march=armv7-r -mfpu=vfpv3-d16
# armv7-r/
# armv7-r/
# armv7-r/
# armv7-r/
# armv7-r/
MULTILIB_OPTIONS += mbig-endian march=armv7-r mfpu=vfpv3-d16
MULTILIB_DIRNAMES += mbig-endian armv7-r vfpv3-d16
MULTILIB_EXCEPTIONS += marm*
MULTILIB_EXCEPTIONS += mfloat-abi*
MULTILIB_EXCEPTIONS += mbig-endian*
MULTILIB_EXCEPTIONS += march*
MULTILIB_EXCEPTIONS += mfpu*
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb
MULTILIB_EXCEPTIONS += mthumb/mbig-endian
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/mfpu=*
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
-------
2) make sure change gcc configuration options in build-toolchain as following:
Change the option "--with-
Because armv7-r is the only profile covered by 1).
I tested this method by building from the release source package, all libraries are generated as expected.
Hope this will help.
Thanks.
Revision history for this message
![]() |
#12 |
Thank you for your support, I was able to build the toolchain using this modification.
I believe all the ARM architectures can be configured for little and big endian modes. The default is little endian, and it seems nearly all manufacturers use the little endian configuration. The only example of a big endian Cortex device I am aware of is the TMS570 series from TI (Cortex-R4F), but I'd be surprised if there weren't others.
Thanks again,
Ed
Revision history for this message
![]() |
#13 |
Thanks for your feedback, we will support big endian in future releases.
Thanks.
Revision history for this message
![]() |
#14 |
Hi
in order to get big-endian support work along with the other targets plus v5te, I modified the t-armv* files. Now I get these targets:
armv5te/
armv5te/
armv5te/
armv5te;
armv6-m;
armv6-m;
armv7e-
armv7e-
armv7e-
armv7-m;
armv7-r/
armv7-r/
armv7-r/
armv7-r;
armv7-r/
armv7-r/
armv7-r/
armv7-r/
armv7-r/
armv7-r/
armv7-r/
armv7-r/
If someone likes to have the modified files (including config.gcc to know about t-armv5te), drop me an email:
<email address hidden>
Cheers,
42Bastian
Revision history for this message
![]() |
#15 |
Could somebody please, share with me a makefile example for the TMS570 cortex-r4f?
I get the code compiled, but I'm having some issues trying to link it.
Thanks in advance!
Revision history for this message
![]() |
#16 |
Hello Sebastian,
you can try following ones:
#######
** Mekefile:
#######
LD=gcc
MODE= -mcpu=cortex-r4 -mbig-endian -mthumb -mthumb-interwork -mfpu=vfpv3-d16 -mfloat-abi=hard
LDFLAGS= $(MODE) -nostartfiles -Wl,-Map,
$(EXECS).elf : depend $(OBJ) $(LDSCRIPT)
@echo Linking $@
@$(LD) -o $($@ $(LDFLAGS) $(OBJ)
#######
** linkdesc.ld (I guess made by TI HalCoGen):
#######
ENTRY(_intvecs)
/*-----
/* Memory Map */
MEMORY
{
FLASH0 (RX) : org = 0x00000000, len = 0x00180000
FLASH1 (RX) : org = 0x00180000, len = 0x00180000
STACKS (RW) : org = 0x08000000, len = 0x00004000
RAM (RW) : org = 0x08008000, len = 0x0003EB00
}
/*-----
/* Section Configuration */
SECTIONS
{
.text :
{
*(.text*)
*(.rodata*)
} > FLASH0
.bss : {} > RAM
.data : {} > RAM
}
Good luck,
JiriJ
Revision history for this message
![]() |
#17 |
I'm getting the following error when linking my code:
Installed Multilib:
arm-none-eabi-gcc -print-multi-lib
.;
armv7-r/
armv7-r/
armv7-r/
armv7-r/
Configured Multilib option before build GCC
#######
MULTILIB_OPTIONS = mthumb/marm
MULTILIB_DIRNAMES = thumb arm
MULTILIB_OPTIONS += mbig-endian march=armv7-r mfpu=vfpv3-d16
MULTILIB_DIRNAMES += mbig-endian armv7-r vfpv3-d16
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_EXCEPTIONS += marm*
MULTILIB_EXCEPTIONS += mfloat-abi*
MULTILIB_EXCEPTIONS += mbig-endian*
MULTILIB_EXCEPTIONS += march*
MULTILIB_EXCEPTIONS += mfpu*
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb
MULTILIB_EXCEPTIONS += mthumb/mbig-endian
MULTILIB_EXCEPTIONS += mthumb/
MULTILIB_EXCEPTIONS += mthumb/mfpu=*
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REQUIRED += mthumb/march=armv7
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
#######
Makefiel information:
Compiling and linking with -mcpu=cortex-r4 or r4f
MODE= -mcpu=cortex-r4 -mbig-endian -mthumb -mthumb-interwork -mfpu=vfpv3-d16 -mfloat-abi=hard
Through this error:
.../arm-
In the other hand, if I compile and Link with the following $(MODE)
MODE = -march=armv7-r -mthumb -mthumb-interwork -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian
The output error is:
error: baremetal-
What am I doing wrong?? Any idea?
BTW: this is how GCC was configured:
Configured with: ../gcc-
Revision history for this message
![]() |
#18 |
In addition, for one specific source file I get the following information.
arm-none-eabi-gcc -Wall -O2 -g -march=armv7-r -mthumb -mthumb-interwork -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -std=c++11 -c -o canasResource.cpp.o canasResource.cpp -print-
armv7-r/
So, it seems to be right when compiling, but gcc can not find the right libraries for linking.
Revision history for this message
![]() |
#19 |
Sebastian
try compiling with -mfloat.abi=softfp
abi=hard Jeans passing parameters in CPU registers
Revision history for this message
![]() |
#20 |
The following error appears with -mfloat-abi=softfp
gcc-arm-
Isn't it TMS570 a cortext-r4f processor?, shouldn't I use -mfloat-abi=hard ?
Revision history for this message
![]() |
#22 |
*hmpf*, I thought the latest pre-built binaries meanwhile support TMS570, but no :(
I tried _my_ version which has these multi-libs:
.;
thumb;@mthumb
fpu;@mfloat-
armv7-r;
armv7-r/
armv7-m;
armv6-m;
armv7e-
armv7-r/
armv7e-
armv7-r/
armv7-r/
armv7-r/
armv7-r/
armv7-r/
I made a simple C++ example and it compiles and links.
I see this in my map file:
c:/compiler/
So with my setup it seems to work.
Revision history for this message
![]() |
#23 |
Another question:
Are you using the source file generated with HalCoGen? Or did you created your own drivers ?
Revision history for this message
![]() |
#24 |
Here there are the key points of my makefile:
#SYS_LIBS = -lstdc++_s -lsupc++_s -lm -lgcc -lc_s -lgcc -lc_s -lnosys --->> what does _s means?
SYS_LIBS = -lstdc++ -lsupc++ -lm -lgcc -lc -lgcc -lc
LIBS += $(SYS_LIBS)
...
MODE = -mcpu=cortex-r4f -mthumb -mthumb-interwork -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian
...
LD = arm-none-eabi-g++ --->> I also try using gcc but nothing changes
LDFLAGS = $(MODE) -nostartfiles -O$(OPTIMIZATION) -Wl,-Map=
$(PROJECT).elf: $(LSCRIPT) $(OBJECTS)
@echo Linking $@
$(Q) $(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(PROJECT).elf
-------
All files were compiled successfully.
I get the following errors while linking:
/gcc-arm-
fflush.
../TMS570/
same error with _cleanup and __aeabi_uidivmod
gcc-arm-
gcc-arm-
Seems tu be the right lib... I don know what happens!
Any idea?
Revision history for this message
![]() |
#25 |
Why are you linking against the CCS libraries? Either GCC or CGT, not both.
If you use C++, you always should use g++ for linking.
Normaly there is no need to specify -lgcc and -lc.
Regarding HalCoGen: No, we do not use it at all.
Also: The current launchpad compiler does still not support big endian!
Revision history for this message
![]() |
#26 |
I made a project using Code Composer Studio and HalCoGen, and now I want to port it and compile it with GCC/GNU. That is why I'm using the drivers generated by HalCoGen, and it is also the reason why I'm trying to link CCS library.
As can see, it doesn't mind if you change t-arm-elf with big-endian support and re-build the toolchaing, The generated libraries located in the multilib directories are Little-endian, so when I try to link my BE code against them, it fails.
Should I change anywhere else to achieve this?
Thanks in advance!
Revision history for this message
![]() |
#27 |
does anyone build success for R4 or R5?
Revision history for this message
![]() |
#28 |
We use GCC for Cortex-R4 (TI RM4x) without problems. Still no support for TMS570 (big endian).
Revision history for this message
![]() |
#29 |
thank you, I am using tms570lc43 which has arm r5f core, still have problems when building with gcc
Revision history for this message
![]() |
#30 |
What do you mean by "building the gcc". Do you succeed to build it from the instructions on this site?
If yes, than you need to change the source to add big-endian support to the multi-lib files.
I don't think you'll need a special r5 handling.
Revision history for this message
![]() |
#31 |
sorry, I mean build c code by gcc, I am using gcc-arm-
Revision history for this message
![]() |
#32 |
Sounds more like a general problem of understanding GCC and BINUTILS. Only hint I can give is google, reading, doing ...
Revision history for this message
![]() |
#33 |
Hi all, I'm also trying to build for TMS570. Where does support for big-endian Cortex-R4F stand in the latest release (2016q1)? I saw that the files in src/gcc/
MULTILIB_OPTIONS += mlittle-
MULTILIB_DIRNAMES += le be
MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
However, when build had completed, there was no big-endian library to be found in install-
Revision history for this message
![]() |
#34 |
Doug,
I managed to patch this version:
5.2.1 20151202 (release) [ARM/embedded-
for big-endian support.
IIRC I did only change t-baremetal (after hours and hours of trying).
The biggest problem was to get also the FPU multi-libs
arm-none-eabi-gcc --print-multi-lib
.;
thumb;@mthumb
softfp;
fpu;@mfloat-
armv6-m;
armv7-m;
armv7e-
armv7-ar/
armv8-m.
armv8-m.
armv7e-
armv7e-
armv7e-
armv7e-
armv7e-
armv7e-
armv7-ar/
armv7-ar/
armv7-ar/
armv7-ar/
armv7-ar/
armv8-m.
armv8-m.
armv8-m.
armv8-m.
Here my t-baremetal:
# A set of predefined MULTILIB which can be used for different ARM targets.
# Via the configure option --with-
# final MULTILIB implementation.
comma := ,
with_multilib_list := $(subst $(comma), ,$(with_
MULTILIB_OPTIONS = mthumb/marm
MULTILIB_DIRNAMES = thumb arm
MULTILIB_OPTIONS += march=armv7
MULTILIB_DIRNAMES += armv7-ar
#MULTILIB_OPTIONS += march=armv6s-
#MULTILIB_DIRNAMES += armv6-m armv7-m armv7e-m armv7-ar armv8-m.base armv8-m.main
MULTILIB_OPTIONS += mfloat-
MULTILIB_DIRNAMES += softfp fpu
#MULTILIB_OPTIONS += mfpu=fpv5-
#MULTILIB_DIRNAMES += fpv5-sp-d16 fpv5-d16 fpv4-sp-d16 vfpv3-d16
MULTILIB_OPTIONS += mfpu=vfpv3-d16
MULTILIB_DIRNAMES += vfpv3-d16
MULTILIB_OPTIONS += mbig-endian/
MULTILIB_DIRNAMES += be le
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
ifneq (,$(filter armv7 armv7-r armv7-a,
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
endif
ifeq (0,1)
MULTILIB_MATCHES = march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv7-
MULTILIB_MATCHES += march?armv7e-
MULTILIB_MATCHES += march?armv7e-
MULTILIB_MATCHES += march?armv7e-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
endif
MULTILIB_EXCEPTIONS =
MULTILIB_REUSE =
MULTILIB_REQUIRED =
MULTILIB_REQUIRED = mthumb
MULTILIB_REQUIRED += marm
MULTILIB_REQUIRED += mfloat-abi=hard
MULTILIB_REQUIRED += mfloat-abi=softfp
MULTILIB_OSDIRNAMES = mthumb=!thumb
MULTILIB_OSDIRNAMES += marm=!arm
MULTILIB_OSDIRNAMES += mfloat-
MULTILIB_OSDIRNAMES += mfloat-
ifneq (,$(findstring armv6-m,
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv8-m.
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv7-m,
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv7e-
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv8-m.
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(filter armv7 armv7-r armv7-a,
MULTILIB_REQUIRED += mthumb/march=armv7
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
endif
Revision history for this message
![]() |
#35 |
Thanks very much Bastian! I built with that against the 2016q1 release source I had already downloaded, and all appears to be in order. It's producing working binaries for the TMS570 and LPC2929 (ARM9 chip), and compiles and links OK for the STM32F10x (don't have one of them on hand to test at the moment).
I don't get all the libraries you did (it's missing armv6-m, armv7-m, armv7e-m, and armv8-m) but it seems I'm just failing over to the base and thumb builds. When I get a chance I'll try the patch against the version you used.
Revision history for this message
![]() |
#36 |
Doug, I am sorry,
I check my gcc-build VM and the t-baremetal is different. Here the correct one:
# A set of predefined MULTILIB which can be used for different ARM targets.
# Via the configure option --with-
# final MULTILIB implementation.
comma := ,
with_multilib_list := $(subst $(comma), ,$(with_
MULTILIB_OPTIONS = mthumb/marm
MULTILIB_DIRNAMES = thumb arm
MULTILIB_OPTIONS += march=armv7
MULTILIB_DIRNAMES += armv7-ar
MULTILIB_OPTIONS += march=armv6s-
MULTILIB_DIRNAMES += armv6-m armv7-m armv7e-m armv7-ar armv8-m.base armv8-m.main
MULTILIB_OPTIONS += mfloat-
MULTILIB_DIRNAMES += softfp fpu
MULTILIB_OPTIONS += mfpu=fpv5-
MULTILIB_DIRNAMES += fpv5-sp-d16 fpv5-d16 fpv4-sp-d16 vfpv3-d16
#MULTILIB_OPTIONS += mfpu=vfpv3-d16
#MULTILIB_DIRNAMES += vfpv3-d16
MULTILIB_OPTIONS += mbig-endian/
MULTILIB_DIRNAMES += be le
ifneq (,$(filter armv7 armv7-r armv7-a,
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
MULTILIB_MATCHES += march?armv7=
endif
ifneq (,$(filter armv6s,
MULTILIB_MATCHES = march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
MULTILIB_MATCHES += march?armv6s-
endif
ifneq (,$(filter armv7-m,
MULTILIB_MATCHES += march?armv7-
endif
ifneq (,$(filter armv7e-
MULTILIB_MATCHES += march?armv7e-
MULTILIB_MATCHES += march?armv7e-
MULTILIB_MATCHES += march?armv7e-
endif
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_MATCHES += mfpu?vfpv3-
MULTILIB_EXCEPTIONS =
MULTILIB_REUSE =
MULTILIB_REQUIRED =
MULTILIB_REQUIRED = mthumb
MULTILIB_REQUIRED += marm
MULTILIB_REQUIRED += mfloat-abi=hard
MULTILIB_REQUIRED += mfloat-abi=softfp
MULTILIB_OSDIRNAMES = mthumb=!thumb
MULTILIB_OSDIRNAMES += marm=!arm
MULTILIB_OSDIRNAMES += mfloat-
MULTILIB_OSDIRNAMES += mfloat-
ifneq (,$(findstring armv6-m,
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv8-m.
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv7-m,
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv7e-
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(findstring armv8-m.
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
endif
ifneq (,$(filter armv7 armv7-r armv7-a,
MULTILIB_REQUIRED += mthumb/march=armv7
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_REQUIRED += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_OSDIRNAMES += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
MULTILIB_REUSE += mthumb/
endif
Revision history for this message
![]() |
#37 |
Thanks Bastian - I was wondering why some of the options were unconditionally disabled with the ifeq (0,1). Earlier I merged the file you previously sent and the unmodified one from the 2016q1 release, and it looks like I ended up with something that does mostly the same thing as this file. The only differences are that your file conditionally enables the MULTILIB_MATCHES based on the with_multilib_list, and doesn't include the Cortex-R8 support that was apparently added for 2016q1.
Revision history for this message
![]() |
#38 |
Hi!
In which version does the MULTILIB (big endian + little-endian) library support?
Revision history for this message
![]() |
#39 |
Hi Roman,
We don't have multilib support for BE yet in our releases. Any particular core you're looking for BE support for?
Thanks,
Tejas.
Revision history for this message
![]() |
#40 |
I was looking for a Toolchain with Big Endian libraries (TMS570 Cortex-R4F).
Revision history for this message
![]() |
#41 |
+1 for building this as part of the release.
Roman, if you can use 5.3-2016q1, I have toolchains built for Windows and Linux with multilib support for the TMS570's BE CR4F and all the regularly supported cores. Testing the patch on the latest release has been on my list of things to do for a while but I have no idea when I'll get to it. Message me if you can use the 5.3-2016q1 binary package.
Revision history for this message
![]() |
#42 |
Doug, yes, I can use 5.3-2016q1.
Thank you!
Revision history for this message
![]() |
#43 |
On my companies FTP is an older version (5.2.1) for Windows and Linux (including the patch):
http://
Revision history for this message
![]() |
#44 |
Roman,
Sorry for the delay. The builds are now up at http://
Revision history for this message
![]() |
#46 |
http://
Revision history for this message
![]() |
#47 |
Sorry about that - copied into the wrong install folder. Fixed now.
Revision history for this message
![]() |
#48 |
Thank you very much!
I have build and debug.
...
Building target: TMS570LS1227_
Invoking: Cross ARM GNU C Linker
arm-none-eabi-gcc -mcpu=cortex-r4f -march=armv7-r -mbig-endian -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 ...
Finished building target: TMS570LS1227_
Revision history for this message
![]() |
#49 |
Could any one send me a copy of makefile source for compiling armv7-r ?
Revision history for this message
![]() |
#50 |
I met following issues
Could anyone can help ?
=======
**** Build of configuration Debug for project armeb ****
"D:\\ti\
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
../source/
../source/
printf("hi this task2\n");
^~~~~~
../source/
../source/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building file: "../source/
Invoking: GNU Compiler
"D:/ti/
Finished building: "../source/
Building target: "armeb.out"
Invoking: GNU Linker
"D:/ti/
makefile:186: recipe for target 'armeb.out' failed
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
d:/ti/ccsv8/
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [armeb.out] Error 1
gmake[1]: Target 'secondary-outputs' not remade because of errors.
gmake: *** [all] Error 2
makefile:182: recipe for target 'all' failed
**** Build Finished ****
Revision history for this message
![]() |
#51 |
This is the error: compiled for a little endian system and target is big endian. You will first need to build multilibs for big-endian, then use those multilibs to build your project. Have you re-built the tools from sources for big-endian?
Revision history for this message
![]() |
#52 |
You mean I need to re-built the toolchain to support big-endian ?
It does not support by default ?
Revision history for this message
![]() |
#53 |
No, after many many years still the tool chain does not support big-endian out of the box.
So maybe use the free TI compiler instead of gcc.