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.

ARM-CGT: Intrinsic Function

Part Number: ARM-CGT


Hello All,

I have an Controller with TI Cortex M3 core now I am checking the TI guide ARM Optimizing C/C++ Compiler v20.2.0.LTS SPNU151V, Table 5-3. ARM Intrinsic Support by Target gives the supported Intrinsic based on the target.

Now in my code i want to use the intrinsic _norm but druing linking Compiler is saying "../aa/main.c", line 138: warning #225-D: function "_norm" declared implicitly and then throw error on the linking phase.

Compilation string is 

'Invoking: ARM Compiler'
"C:/ti_ccsv5.5/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" --abi=ti_arm9_abi --include_path="C:/ti_ccsv5.5/ccsv5/tools/compiler/arm_5.1.1/include" -g --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="aa/main.pp" --obj_directory="aa" "../aa/main.c"

Now I have compiler version arm_5.1.1 and also ti-cgt-arm_16.9.6.LTS

can someone tell me which header file Ii need to use and which Lib I need to add in the project.

Br

Deepak Joshi

  • You do not use the option -mv7m3 to tell the compiler to build for a Cortex-M3 CPU.  So, the compiler uses the default.  The default is to build for a ARM7 CPU.  That CPU does not support the CLZ instruction used to implemented the _norm intrinsic.  So, the solution is to add the option -mv7m3.

    Thanks and regards,

    -George

  • Thanks George,

    i have another set of followup question, May you please be kind in answering those

    1. Do I need to add any header files to use this intrinsic sets and also if I want to use e ARM C Language Extensions (ACLE) specification, only including the arm_acle.h along with correct core selection like -mv7m3 (for m3 ) and -mv7r4 (for R4 ) will work?
    2. I am facing one strange issue in compilation,
      1. When I select the R4 core with Big endianess(along with the correct lib rtsv7R4_T_be_eabi.lib) the compilation is successful 

    'Building target: aaa_M4.out'
    'Invoking: ARM Linker'
    "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7R4 --code_state=32 -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -m"aaa_M4.map" --heap_size=0x800 --stack_size=0x800 -i"E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib" -i"E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="aaa_M4_linkInfo.xml" --rom_model --be32 -o "aaa_M4.out" "./IntMathLib/IntMathLib.obj" "./aaa/aaa_NoiseEstimation.obj" "./aaa/aaa.obj" "./mss_data.obj" "./main.obj" "./Unit_Test_aaa.obj" "./FileRead.obj" -l"rtsv7R4_T_be_eabi.lib"
    <Linking>
    warning #10247-D: creating output section ".text" without a SECTIONS specification
    warning #10247-D: creating output section ".const" without a SECTIONS specification
    warning #10247-D: creating output section ".data" without a SECTIONS specification
    warning #10247-D: creating output section ".bss" without a SECTIONS specification
    warning #10247-D: creating output section ".cinit" without a SECTIONS specification
    warning #10247-D: creating output section ".sysmem" without a SECTIONS specification
    'Finished building target: aaa_M4.out'

    b. When I change the endianess to my targeted one little endianess with the lib rtsv7R4_T_le_v3D16_eabi.lib my compilation fails

    "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7R4 --code_state=32 -me -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -m"aaa_M4.map" --heap_size=0x800 --stack_size=0x800 -i"E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib" -i"E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="aaa_M4_linkInfo.xml" --rom_model -o "aaa_M4.out" "./IntMathLib/IntMathLib.obj" "./aaa/aaa_NoiseEstimation.obj" "./aaa/aaa.obj" "./mss_data.obj" "./main.obj" "./Unit_Test_aaa.obj" "./FileRead.obj" -l"rtsv7R4_T_le_v3D16_eabi.lib"
    <Linking>
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<boot.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<ll_lsl_t2.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<memcpy_t2.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<memset_t2.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<u_div32.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<_printfi.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<_scanfi.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<s_frexp.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<s_scalbn.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<strtod.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<ull_div32.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<ll_mul_t2.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    error #16004-D: file "E:/workspace_v5_5/ti-cgt-arm_16.9.6.LTS/lib/rtsv7R4_T_le_v3D16_eabi.lib<s_copysign.obj>" has a Tag_ABI_VFP_args attribute value of "1" that is different than one previously seen ("0"); combining incompatible files
    warning #10247-D: creating output section ".text" without a SECTIONS specification
    warning #10247-D: creating output section ".const" without a SECTIONS specification
    warning #10247-D: creating output section ".data" without a SECTIONS specification
    warning #10247-D: creating output section ".bss" without a SECTIONS specification
    warning #10247-D: creating output section ".cinit" without a SECTIONS specification
    warning #10247-D: creating output section ".sysmem" without a SECTIONS specification
    error #10010: errors encountered during linking; "aaa_M4.out" not built

    >> Compilation failure
    gmake: *** [aaa_M4.out] Error 1
    gmake: Target `all' not remade because of errors.

    For Point there is no change in code except the correct endianess and corresponding Lib change which is intended and for this I intend to use ti-cgt-arm_16.9.6.LTS compiler.

    Thanks again for your continued support