Wednesday, April 25th 2018, 12:44am UTC+2

You are not logged in.

  • Login
  • Register

klaux

Beginner

Date of registration: Jan 25th 2008

Posts: 6

1

Thursday, February 7th 2008, 2:28pm

big-endian and embOS ARM/GNU

Using the Yagarto toolchain I try to build a project for a big-endian target. Therefor "-mbig-endian" is passed both to the compiler and the linker.
According to embOS's manual the project is linked with the embOS library "osA4BDP".

Unfortunately linking fails with the linker complaining:

BFD (GNU Binutils) 2.18 assertion fail ../../binutils-2.18/bfd/elf32-arm.c:6532
C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OS_CreateTask.o)(OS_CreateTask_DP): warning: interworking not enabled.
C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OS_HandleTick.o)(OS_HandleTick): warning: interworking not enabled.
-- snipped --
OS_DeactivateP.c: dangerous relocation: (null) GettingStarted line 0
-- snipped --

Has anyone an idea, what is wrong here ?

Thanks in advance
Karsten

SEGGER - Souhail

Super Moderator

Date of registration: Nov 15th 2007

Posts: 19

2

Thursday, February 7th 2008, 7:16pm

Karsten,

you are compiling your files with interworking switch (-mthumb-interworking) enabled, whereas the embOS libraries are not using interworking.
Temporarily you can remove interworking switch in your Makefile and rebuilt your ELF-file.
We will add additional embOS libraries for different modes in the future.

Regards,

Souhail

klaux

Beginner

Date of registration: Jan 25th 2008

Posts: 6

3

Friday, February 8th 2008, 9:53am

Hello Souhail,

As you suggested, I re-compiled the project with the options "-mbig-endian -mno-thumb-interwork". The list of linker-errors is unchanged compared to the build without passing "-mno-thumb-interwork"

While examing the list of linker-errors more closely, I found the following line:

C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(rtos.o)(OS_EnableInt): warning: interworking not enabled.
first occurrence: C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OSMX.o): thumb call to arm

From this I read, that both object files are part of the embOS library. Therefor I think that the problem is the build-configuration of embOS library itself.

May this be the problem ?

Regards
Karsten.

PS: Building the project in little-endian configuration works fine and it even works on the target.

klaux

Beginner

Date of registration: Jan 25th 2008

Posts: 6

4

Friday, February 8th 2008, 10:20am

Additional informations on the big-endian problem

Something is wrong, either with the Yagarto-toolchain or with the embOS big-endian libraries:Here some more linker-errors from the long list. It seems that the embOS library contains - at least partially - thumb-code. Comparing the file-sizes of the library shows that all "big-endian" libraries are smaller than the "little-endian" counterparts ... :huh:

C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(rtos.o): compiled for a little endian system and target is big endian

C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OSKERN.o)(OS_InitKern): warning: interworking not enabled.
first occurrence: CMakeFiles/GettingStarted.dir/main.cpp.obj: arm call to thumb

c:/programme/yagarto/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/be\libc.a(lib_a-strlen.o)(strlen): warning: interworking not enabled.
first occurrence: C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OSSEND.o): thumb call to arm

c:/programme/yagarto/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/be\libc.a(lib_a-memset.o)(memset): warning: interworking not enabled.
first occurrence: C:\workspace-yagarto\GettingStarted\rtos\libosA4BDP.a(OSTIME.o): thumb call to arm

SEGGER - Souhail

Super Moderator

Date of registration: Nov 15th 2007

Posts: 19

5

Monday, February 11th 2008, 7:31pm

Klaus,

we will upload a new version of embOS GNU ARM Trial tomorrow, where the big endian linking problem is fixed.
Additionally we also have added a new BSP for TI TMS470R1B1M.


Regards,

Souhail

Similar threads