This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: Cortex R4 runtime library

Part Number: TMS570LS3137


Tool/software:

Hi,

I have just noticed that the ARM-mode runtime library "rtsv7R4_A_be_v3D16_eabi.lib" is not present in my installation (v. 20.2.7.LTS). Only the Thumb-mode one is there.

PS C:\ti\ccs1270\ccs\tools\compiler\ti-cgt-arm_20.2.7.LTS\lib> ls


    Directory: C:\ti\ccs1270\ccs\tools\compiler\ti-cgt-arm_20.2.7.LTS\lib


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         4/19/2024   4:41 PM                src
-a----          8/7/2022   7:42 PM          70090 libc.a
-a----          8/7/2022   7:42 PM           2901 lnk.cmd
-a----          8/7/2022   7:42 PM        1761708 mklib
-a----          8/7/2022   6:33 PM         129151 mklib.c
-a----          8/7/2022   6:33 PM         431728 mklib.exe
-a----          8/7/2022   7:42 PM       27171858 rtsv5_A_le_eabi.lib
-a----          8/7/2022   7:42 PM       27132908 rtsv7A8_T_le_n_v3_eabi.lib
-a----          8/7/2022   7:42 PM       26734526 rtsv7M3_T_le_eabi.lib
-a----          8/7/2022   7:42 PM       26739346 rtsv7M3_T_le_xo_eabi.lib
-a----          8/7/2022   7:42 PM       26740806 rtsv7M4_T_le_eabi.lib
-a----          8/7/2022   7:42 PM       27021634 rtsv7M4_T_le_v4SPD16_eabi.lib
-a----          8/7/2022   7:42 PM       27047234 rtsv7M4_T_le_v4SPD16_xo_eabi.lib
-a----          8/7/2022   7:42 PM       26745466 rtsv7M4_T_le_xo_eabi.lib
-a----          8/7/2022   7:42 PM       27288528 rtsv7R4_A_le_v3D16_eabi.lib
-a----          8/7/2022   7:42 PM       26367286 rtsv7R4_T_be_eabi.lib
-a----          8/7/2022   7:42 PM       26597046 rtsv7R4_T_be_v3D16_eabi.lib
-a----          8/7/2022   7:42 PM       26962172 rtsv7R4_T_le_v3D16_eabi.lib

In the following thread e2e.ti.com/.../10008-d-cannot-find-file-rtsv7r4_a_be_v3d16_eabi-lib
we see that the file was present in version 20.2.1.LTS.

Is this due to some installation option or the library has been removed?

Thanks!

  • Hi Varban,

    You are correct, i too can see it in 20.2.5LTS

    rtsv7R4_A_be_v3D16_eabi

    And didn't find in 20.2.7LTS

    Let me check with compiler team, i will provide my update ASAP.

    --
    Thanks & regards,
    Jagadish.

  • Hi Varban,

    Here is the compiler team feedback for the questions:

    Yes, it is intentionally removed in newer compiler versions.

    The compiler no longer ships with all libraries pre-compiled. They only ship with a few common ones. However, all the source for the RTS comes with the compiler so if determines that it needs an RTS that is not pre-compiled, then it will build it then and there.

    That is what happened in your 20.2.5 install. Notice in your screenshot that the library has a different (newer) timestamp than the others. It's because it was not pre-compiled like the others.

    The compiler team did this, to reduce the download size of the compiler packages.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Alright, but the "rtsv7R4_T_be_v3D16_eabi.lib " is a precompiled library and we are linking against it.

    Building target: "GIO.out"
    Invoking: Arm Linker
     .... "../GIO/source/sys_link.cmd"  -lrtsv7R4_T_be_v3D16_eabi.lib 
    <Linking>
    Finished building target: "GIO.out"
     
    
    **** Build Finished ****

    And as a result of this, the stdlib/string/stdio function calls will end up being executed in Thumb mode instead of pure ARM mode.

    Using 20.2.7.LTS, when I compile my example and disassemble it, I get the things like those (all in .thumb sections):

    012a7e:              memcpy:
    012a7e:               .thumb
    012a7e: 2A00             CMP             R2, #0
    012a80: D04A             BEQ             _ret2_ [0x12b18]
    012a82: EA5F0C00         MOVS.W          R12, R0
    012a86: 078B             LSLS            R3, R1, #30
    012a88: D11C             BNE             _unaln [0x12ac4]
    012a8a: 0783             LSLS            R3, R0, #30
    012a8c: D122             BNE             _saln [0x12ad4]
    012a8e:              _aln:

    012bb4:               .thumb
    012bb4:              .text:fputc:
    012bb4: 4A21             LDR             R2, $C$CON1 [0x12c3c]
    012bb6: B5F8             PUSH            {R3, R4, R5, R6, R7, LR}
    012bb8: 6812             LDR             R2, [R2]
    012bba: 460C             MOV             R4, R1
    012bbc: 4605             MOV             R5, R0
    012bbe: 4790             BLX             R2
    012bc0: 4620             MOV             R0, R4
    012bc2: F000FA3B         BL              __TI_wrt_ok [0x1303c]
    012bc6: 2800             CMP             R0, #0
    012bc8: 4E1D             LDR             R6, $C$CON2 [0x12c40]

    012cbe:               .thumb
    012cbe: 2200             MOVS            R2, #0
    012cc0:              __aeabi_memset4:
    012cc0:              __aeabi_memset8:
    012cc0:              __aeabi_memset:
    012cc0: 4613             MOV             R3, R2
    012cc2: 460A             MOV             R2, R1
    012cc4: 4619             MOV             R1, R3
    012cc6:              memset:
    012cc6: B571             PUSH            {R0, R4, R5, R6, LR}
    012cc8: F0100F03         TST.W           R0, #3
    012ccc: D00B             BEQ             _word_aligned [0x12ce6]

    I still cannot understand the motives of the compiler team - having in mind that the little-endian RTS is there, I can't figure out why the BE lib is not there as well. And as far as I remember, I installed CCS with only Hercules support, which is a "hardwired" big endian-only device.

    But... never mind. Let's summarise my request this way: in case I want a pure ARM (Thumb-free) executable, is there a way to achieve it? I won't mind compiling everything from source, without linking against any .libs, as long this is a "stable" and recommended approach in the context of the Hercules toolchain.

    Thanks,

    Varban

  • Hi Varban,

    I am discussing your questions again with our compiler team experts and will try to provide my updates as soon as possible.

    --
    Thanks & regards,
    Jagadish.

  • For discussion of a very similar situation, and how it was resolved, please see this forum thread.

    Thanks and regards,

    -George

  • Hi George,

    So... in case I need an RTS in ARM mode instead of Thumb, I need to manually compile it by myself? Because the current version of the toolchain does not come with that one as a precompiled .lib.

    Do I understand you correctly?

  • Update:

    After setting the "<automatic>" option inside Runtime support library, the CCS created the _A_ library for me.

    warning #10366-D: automatic library build: using library "C:\...\lib\rtsv7R4_A_be_v3D16_eabi.lib" for the first time, so it must be built.  This may take a few minutes.

    Thank you once again, and sorry for the confusion!