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.

Run-Time-Suport-Library

I have a qusstion.

Please tell me what difference about this?

 

C:\ti\ccsv5\tools\compiler\arm_5.0.4\lib\rtsv7M4_T_le_v4SPD16_eabi.lib

C:\ti\ccsv5\tools\compiler\arm_5.0.4\lib\rtsv7M4_T_le_v4SPD16_xo_eabi.lib

Thank.

  • Sorry for bumping this old thread up but I have the same question as OP. What's the difference about those two libs?

  • Nhan Ly said:
    What's the difference about those two libs?

    Looking in the lib/mklib.c source file in the compiler installation directory shows the Makefile options used to compile each run time library file:

        { "rtsv7M4_T_le_v4SPD16_eabi.lib", { "THUMB_MODE","FPV4SPD16","AEABI_THUMB_MODE","SETJMP_MEMSET_T2_ASM","AEABI","PERFCRIT_1_T2_ASM","THUMB2_MODE","EABI","_T2_NON_AEABI","AEABI_UNALIGNED_T2_ASM","V7M4","VFP","AEABI_VFP_WRAPPERS","AEABI_NFE_T2_ASM","LITTLE_ENDIAN","THUMB_ONLY","THUMB2","THUMB2_ONLY","PERFCRIT_2_T2_ASM","ANYABI_T2_ASM","COFF_OR_THUMB_ONLY","AEABI_T2_ASM" } },
        { "rtsv7M4_T_le_v4SPD16_xo_eabi.lib", { "THUMB_MODE","FPV4SPD16","AEABI_THUMB_MODE","SETJMP_MEMSET_T2_ASM","AEABI","XO","PERFCRIT_1_T2_ASM","THUMB2_MODE","EABI","_T2_NON_AEABI","AEABI_UNALIGNED_T2_ASM","V7M4","VFP","AEABI_NFE_T2_ASM","AEABI_VFP_WRAPPERS","LITTLE_ENDIAN","THUMB_ONLY","THUMB2","THUMB2_ONLY","PERFCRIT_2_T2_ASM","ANYABI_T2_ASM","COFF_OR_THUMB_ONLY","AEABI_T2_ASM" } },
    

    Looking at the Makefile within the lib/rtssrc.zip within the compiler installation directory shows that the Makefile XO option controls the compiler embedded_constants option:

    #-----------------------------------------------------------------------------
    # Group XO
    #-----------------------------------------------------------------------------
    ifeq ($(XO),1)
    UNIVERSAL_FLAGS += --embedded_constants=off
    endif
    

    The description of the embedded_constants option in the  ARM Optimizing C/C++ Compiler v5.0 User's Guide SPNU151H is:

    --embedded_constants={on|off}

    By default the compiler embeds constants in functions. These constants can include literals, addresses, strings, etc. This is a problem if you wants to prevent reads from a memory region that contains only executable code. To enable the generation of "execute only code", the compiler provides the --embedded_constants=[on|off] option. If the option is not specified, it is assumed to be on. The option is available on the following devices: Cortex-A8, Cortex-M3, Cortex-M4, and Cortex-R4.

    Therefore, the rtsv7M4_T_le_v4SPD16_eabi.lib will have constants embedded in functions, whereas the rtsv7M4_T_le_v4SPD16_xo_eabi.lib won't have constants embedded in functions.