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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • 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
  • 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
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.