big-endian and embOS ARM/GNU

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • 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
  • 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
  • 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.
  • 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