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.

TI Arm Clang Compiler Tools User's Guide v1.3 description of run time library selection seems incorrect

Other Parts Discussed in Thread: TMS570LC4357

In the TI Arm Clang Compiler Tools User's Guide v1.3 the 4.1.8. Library Naming Conventions section appears to be a copy of section 7.1.8 Library Naming Conventions from the ARM Optimizing C/C++ Compiler v20.2.0.LTS User's Guide

However, the TI Arm Clang compiler ti-cgt-armllvm_1.3.0-beta.1 seems to use a different naming convention to that described in the TI Arm Clang Compiler Tools User's Guide v1.3. E.g.

  1. ti-cgt-armllvm_1.3.0-beta.1 uses the .a suffix for library files, not the .lib suffix described in the User's Guide.
  2. ti-cgt-armllvm_1.3.0-beta.1 uses separate directories for run time libraries compiled with different options, not the different filename components in the library described in the User's Guide.

Is there a description of how the TI Arm Clang Compiler Library Name Conventions compares to the TI / GCC ARM toolchains?

The reason for asking is was curious to see if the TI Arm Clang provided support for Cortex-R5 big-endian, due to the packaged GCC ARM compilers not containing big-endian run time libraries (e.g. see TMS570LC4357: CCS/TMS570LC4357: compile with ARM compiler 9.3.1)

While the TI Arm Clang Compiler Tools 1.3.0-beta.1 Release Notes shows support for "Cortex-R5 (Thumb) with VFPv3D16", if create a project in CCS 10.3.0 for a TMS570LC4357 and select the ti-cgt-armllvm_1.3.0-beta.1 then fails with an error indicating big-endian targets aren't supported:

Building file: "../main.c"
Invoking: Arm Compiler
"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mbig-endian -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -MMD -MP -MF"main.d_raw" -MT"main.o"   -o"main.o" "../main.c"
subdir_rules.mk:7: recipe for target 'main.o' failed
tiarmclang: error: big endian not supported for subtarget.

  • Hi Chester,

    You are correct that the content in the TI Arm Clang Compiler User's Guide in Chapter 4 is currently based on the content from the ARM Optimizing C/C++ Compiler User's Guide in Chapter 7. We are in the process of reviewing and updating the information in the user guide prior to the upcoming LTS release.

    For your specific question about support for big-endian in combination with Cortex-R5F, tiarmclang does provide that support.

    In addition to the "-mbig-endian" option, you should include the "-mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16" options in the tiarmclang compilation command. These options can be set via the CCS build settings user interface if you are building a project on CCS.

    You can find additional details about what Arm processor variants are supported and the options to select those variants in the Getting Started Guide included with the tiarmclang user's guide (in section 6).

    With regards to the naming conventions and location of the runtime libraries that are included with the tiarmclang toolchain installation ...

    You are correct that the file extension for tiarmclang runtime libraries is ".a". For each Arm processor variant that is supported in the tiarmclang toolchain, there are the following runtime libraries:

    libc.a

    libsysbm.a

    libsys.a

    libclang_rt.builtins.a

    libclang_rt.profile.a

    libc++.a

    libc++abi.a

    You can find library information file versions of these in <install area>/lib. The library information file provides an index of the available processor-specific versions of the libraries. For example, the libc.a library information file contains an index to the Cortex-R5F, big-endian version of the libc.a library that points to its location in the installation: <install area>/lib/armv7reb-ti-none-eabihf/c/libc.a

    As described in the Getting Started Guide (section 2), when you link from the tiarmclang command line, tiarmclang will implicitly include the list of runtime libraries in the link via the --start-group/--end-group linker option: 

    --start-group -llibc++.a -llibc++abi.a -llibc.a -llibsys.a
    -llibsysbm.a -llibclang_rt.builtins.a -llibclang_rt.profile.a --end-group

    The reference to libc.a will resolve to the appropriate processor-specific version of the C runtime library at link time.

    Hope this helps.

    ~ Todd Snider
  • In addition to the "-mbig-endian" option, you should include the "-mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16" options in the tiarmclang compilation command.

    Thanks, that allowed a program to be compiled for a big-endian target.

    You can find library information file versions of these in <install area>/lib. The library information file provides an index of the available processor-specific versions of the libraries.

    The attached project created in CCS 10.3 using TI Clang v1.3.0-beta.1 has some C++ code and two build configurations:

    1. Debug_no_exceptions has exceptions disabled, and that links and runs OK.

    2. Debug_exceptions has -fxceptions enabled in the compiler options. There is conditional compilation on #ifdef __EXCEPTIONS in main.cpp for a simple test of exceptions. This produces linker errors about unresolved symbols:

    **** Build of configuration Debug_exceptions for project TMS570LC4357_TI_CLANG_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 all -O 
     
    Building file: "../HL_sys_intvecs.asm"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -xti-asm  -o"HL_sys_intvecs.o" "../HL_sys_intvecs.asm"
    tiarmclang: warning: argument unused during compilation: '-Og' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gstrict-dwarf' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gdwarf-3' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-fexceptions' [-Wunused-command-line-argument]
    Finished building: "../HL_sys_intvecs.asm"
     
    Building file: "../HL_sys_phantom.c"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"HL_sys_phantom.d_raw" -MT"HL_sys_phantom.o"   -o"HL_sys_phantom.o" "../HL_sys_phantom.c"
    Finished building: "../HL_sys_phantom.c"
     
    Building file: "../main.cpp"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"main.d_raw" -MT"main.o"   -o"main.o" "../main.cpp"
    Finished building: "../main.cpp"
     
    Building target: "TMS570LC4357_TI_CLANG_hello.out"
    Invoking: Arm Linker
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -gstrict-dwarf -gdwarf-3 -fexceptions -Wl,-m"TMS570LC4357_TI_CLANG_hello.map" -Wl,--heap_size=0x70000 -Wl,--stack_size=0x2000 -Wl,-i"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="TMS570LC4357_TI_CLANG_hello_linkInfo.xml" -Wl,--rom_model -Wl,--be32 -v -o "TMS570LC4357_TI_CLANG_hello.out" "./HL_sys_intvecs.o" "./HL_sys_phantom.o" "./main.o" "../HL_sys_link.cmd"  
    makefile:140: recipe for target 'TMS570LC4357_TI_CLANG_hello.out' failed
    TI Arm Clang Compiler 1.3.0-beta.1
    Target: arm-ti-none-eabi
    Thread model: posix
    InstalledDir: /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin
     "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmlnk" -I/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib -o TMS570LC4357_TI_CLANG_hello.out -mTMS570LC4357_TI_CLANG_hello.map --heap_size=0x70000 --stack_size=0x2000 -i/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info=TMS570LC4357_TI_CLANG_hello_linkInfo.xml --rom_model --be32 ./HL_sys_intvecs.o ./HL_sys_phantom.o ./main.o ../HL_sys_link.cmd --start-group -llibc++.a -llibc++abi.a -llibc.a -llibsys.a -llibsysbm.a -llibclang_rt.builtins.a -llibclang_rt.profile.a --end-group --cg_opt_level=g
     
     undefined                first referenced  
      symbol                      in file       
     ---------                ----------------  
     _Unwind_Resume           ./main.o          
     __aeabi_unwind_cpp_pr0   ./HL_sys_phantom.o
     __cxa_allocate_exception ./main.o          
     __cxa_begin_catch        ./main.o          
     __cxa_end_catch          ./main.o          
     __cxa_free_exception     ./main.o          
     __cxa_throw              ./main.o          
     __gxx_personality_v0     ./main.o          
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "TMS570LC4357_TI_CLANG_hello.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [TMS570LC4357_TI_CLANG_hello.out] Error 1
    gmake: *** [all] Error 2
    makefile:136: recipe for target 'all' failed
    
    **** Build Finished ****
    

    When the CCS build invokes tiarmclang for the link, -fexceptions is passed but the linker doesn't seem to resolve the C++ run time libraries with exception support.

    Not sure if I made a mistake in creating the project, or this is a bug in the run-time library selection.

    TMS570LC4357_TI_CLANG_hello.zip

  • Unfortunately, I'm having problems getting the CCS project to build.  I'm getting some help with that.  I expect to get back to you tomorrow.

    Thanks and regards,

    -George

  • When the CCS build invokes tiarmclang for the link, -fexceptions is passed but the linker doesn't seem to resolve the C++ run time libraries with exception support.

    I have a go at trying to resolve the linker errors for the build configuration with exceptions.

    First added the following libraries as inputs:

    ${CG_TOOL_SEARCH_PATH}/armv7reb-ti-none-eabihf/c++/except/libc++abi.a

    ${CG_TOOL_SEARCH_PATH}/armv7reb-ti-none-eabihf/c++/except/libunwind.a

    Which resolved the initial unresolved symbols for exceptions, but then got:

    **** Clean-only build of configuration Debug_exceptions for project TMS570LC4357_TI_CLANG_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 clean -O 
     
    rm -rf  "TMS570LC4357_TI_CLANG_hello.hex"  "TMS570LC4357_TI_CLANG_hello.out" 
    rm -rf "HL_sys_intvecs.o" "HL_sys_phantom.o" "main.o" 
    rm -rf "HL_sys_phantom.d" 
    rm -rf "main.d" 
    rm -rf "HL_sys_intvecs.d" 
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug_exceptions for project TMS570LC4357_TI_CLANG_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 all -O 
     
    Building file: "../HL_sys_intvecs.asm"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -xti-asm  -o"HL_sys_intvecs.o" "../HL_sys_intvecs.asm"
    tiarmclang: warning: argument unused during compilation: '-Og' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gstrict-dwarf' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gdwarf-3' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-fexceptions' [-Wunused-command-line-argument]
    Finished building: "../HL_sys_intvecs.asm"
     
    Building file: "../HL_sys_phantom.c"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"HL_sys_phantom.d_raw" -MT"HL_sys_phantom.o"   -o"HL_sys_phantom.o" "../HL_sys_phantom.c"
    Finished building: "../HL_sys_phantom.c"
     
    Building file: "../main.cpp"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"main.d_raw" -MT"main.o"   -o"main.o" "../main.cpp"
    Finished building: "../main.cpp"
     
    Building target: "TMS570LC4357_TI_CLANG_hello.out"
    Invoking: Arm Linker
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -gstrict-dwarf -gdwarf-3 -fexceptions -Wl,-m"TMS570LC4357_TI_CLANG_hello.map" -Wl,--heap_size=0x70000 -Wl,--stack_size=0x2000 -Wl,-i"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="TMS570LC4357_TI_CLANG_hello_linkInfo.xml" -Wl,--rom_model -Wl,--be32 -v -o "TMS570LC4357_TI_CLANG_hello.out" "./HL_sys_intvecs.o" "./HL_sys_phantom.o" "./main.o" "../HL_sys_link.cmd"  -Wl,-l"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libc++abi.a" -Wl,-l"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a" 
    makefile:142: recipe for target 'TMS570LC4357_TI_CLANG_hello.out' failed
    TI Arm Clang Compiler 1.3.0-beta.1
    Target: arm-ti-none-eabi
    Thread model: posix
    InstalledDir: /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin
     "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmlnk" -I/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib -o TMS570LC4357_TI_CLANG_hello.out -mTMS570LC4357_TI_CLANG_hello.map --heap_size=0x70000 --stack_size=0x2000 -i/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info=TMS570LC4357_TI_CLANG_hello_linkInfo.xml --rom_model --be32 ./HL_sys_intvecs.o ./HL_sys_phantom.o ./main.o ../HL_sys_link.cmd -l/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libc++abi.a -l/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a --start-group -llibc++.a -llibc++abi.a -llibc.a -llibsys.a -llibsysbm.a -llibclang_rt.builtins.a -llibclang_rt.profile.a --end-group --cg_opt_level=g
    error #16004-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersSave.S.obj>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files
    warning #16016-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersSave.S.obj>" was built for VFPv3 coprocessor support while a previously seen file was built for VFPv3-D16 coprocessor support
    warning #16016-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<libunwind.cpp.obj>" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    error #16004-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersRestore.S.obj>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files
    warning #16016-D: file "stdexcept.cpp.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/libc++.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "cxa_guard.cpp.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/libc++abi.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "printf.c.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c/libc.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "write.c.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c/libsysbm.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "divsi3.S.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/clang/12.0.0/lib/armv7reb-ti-none-eabihf/libclang_rt.builtins.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
     
     undefined     first referenced                                                                                                                                 
      symbol           in file                                                                                                                                      
     ---------     ----------------                                                                                                                                 
     __exidx_end   /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<libunwind.cpp.obj>
     __exidx_start /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<libunwind.cpp.obj>
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "TMS570LC4357_TI_CLANG_hello.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [TMS570LC4357_TI_CLANG_hello.out] Error 1
    gmake: *** [all] Error 2
    makefile:138: recipe for target 'all' failed
    
    **** Build Finished ****
    

    The unresolved symbols __exidx_start and __exidx_end could be fixed by adding the following symbol aliases in the linker command file:

        .ARM.exidx  align(32) :
        {
         	__exidx_start = __TI_UNWIND_TABLE_START;
    		__exidx_end = __TI_UNWIND_TABLE_END;
        } > FLASH0 | FLASH1
    

    But that still left the following linker errors, which appear to due to the libraries for exceptions having different settings for floating point support:

    **** Clean-only build of configuration Debug_exceptions for project TMS570LC4357_TI_CLANG_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 clean -O 
     
    rm -rf  "TMS570LC4357_TI_CLANG_hello.hex"  "TMS570LC4357_TI_CLANG_hello.out" 
    rm -rf "HL_sys_intvecs.o" "HL_sys_phantom.o" "main.o" 
    rm -rf "HL_sys_phantom.d" 
    rm -rf "main.d" 
    rm -rf "HL_sys_intvecs.d" 
    Finished clean
     
    
    **** Build Finished ****
    
    **** Build of configuration Debug_exceptions for project TMS570LC4357_TI_CLANG_hello ****
    
    /home/mr_halfword/ti/ccs1030/ccs/utils/bin/gmake -k -j 12 all -O 
     
    Building file: "../HL_sys_intvecs.asm"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -xti-asm  -o"HL_sys_intvecs.o" "../HL_sys_intvecs.asm"
    tiarmclang: warning: argument unused during compilation: '-Og' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-I /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gstrict-dwarf' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-gdwarf-3' [-Wunused-command-line-argument]
    tiarmclang: warning: argument unused during compilation: '-fexceptions' [-Wunused-command-line-argument]
    Finished building: "../HL_sys_intvecs.asm"
     
    Building file: "../HL_sys_phantom.c"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"HL_sys_phantom.d_raw" -MT"HL_sys_phantom.o"   -o"HL_sys_phantom.o" "../HL_sys_phantom.c"
    Finished building: "../HL_sys_phantom.c"
     
    Building file: "../main.cpp"
    Invoking: Arm Compiler
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -I"/home/mr_halfword/workspace_v10/TMS570LC4357_TI_CLANG_hello" -I"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/include" -gstrict-dwarf -gdwarf-3 -fexceptions -MMD -MP -MF"main.d_raw" -MT"main.o"   -o"main.o" "../main.cpp"
    Finished building: "../main.cpp"
     
    Building target: "TMS570LC4357_TI_CLANG_hello.out"
    Invoking: Arm Linker
    "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmclang" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -Og -gstrict-dwarf -gdwarf-3 -fexceptions -Wl,-m"TMS570LC4357_TI_CLANG_hello.map" -Wl,--heap_size=0x70000 -Wl,--stack_size=0x2000 -Wl,-i"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="TMS570LC4357_TI_CLANG_hello_linkInfo.xml" -Wl,--rom_model -Wl,--be32 -v -o "TMS570LC4357_TI_CLANG_hello.out" "./HL_sys_intvecs.o" "./HL_sys_phantom.o" "./main.o" "../HL_sys_link.cmd"  -Wl,-l"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libc++abi.a" -Wl,-l"/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a" 
    makefile:142: recipe for target 'TMS570LC4357_TI_CLANG_hello.out' failed
    TI Arm Clang Compiler 1.3.0-beta.1
    Target: arm-ti-none-eabi
    Thread model: posix
    InstalledDir: /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin
     "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/bin/tiarmlnk" -I/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib -o TMS570LC4357_TI_CLANG_hello.out -mTMS570LC4357_TI_CLANG_hello.map --heap_size=0x70000 --stack_size=0x2000 -i/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info=TMS570LC4357_TI_CLANG_hello_linkInfo.xml --rom_model --be32 ./HL_sys_intvecs.o ./HL_sys_phantom.o ./main.o ../HL_sys_link.cmd -l/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libc++abi.a -l/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a --start-group -llibc++.a -llibc++abi.a -llibc.a -llibsys.a -llibsysbm.a -llibclang_rt.builtins.a -llibclang_rt.profile.a --end-group --cg_opt_level=g
    error #16004-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersSave.S.obj>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files
    warning #16016-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersSave.S.obj>" was built for VFPv3 coprocessor support while a previously seen file was built for VFPv3-D16 coprocessor support
    warning #16016-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<libunwind.cpp.obj>" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    error #16004-D: file "/home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/except/libunwind.a<UnwindRegistersRestore.S.obj>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files
    warning #16016-D: file "stdexcept.cpp.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/libc++.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "cxa_guard.cpp.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c++/libc++abi.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "printf.c.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c/libc.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "write.c.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/armv7reb-ti-none-eabihf/c/libsysbm.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    warning #16016-D: file "divsi3.S.obj in /home/mr_halfword/ti/ccs1030/ccs/tools/compiler/ti-cgt-armllvm_1.3.0-beta.1/lib/clang/12.0.0/lib/armv7reb-ti-none-eabihf/libclang_rt.builtins.a" was built for VFPv3-D16 coprocessor support while a previously seen file was built for VFPv3 coprocessor support
    error #10010: errors encountered during linking; "TMS570LC4357_TI_CLANG_hello.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [TMS570LC4357_TI_CLANG_hello.out] Error 1
    gmake: *** [all] Error 2
    makefile:138: recipe for target 'all' failed
    
    **** Build Finished ****
    

  • Unfortunately, I also cannot build C++ code with exceptions enabled.  So, I filed the entry EXT_EP-10343 to have this investigated.  You are welcome to follow it with that link.

    Thanks and regards,

    -George

  • So, I filed the entry EXT_EP-10343 to have this investigated. 

    I see you were able to repeat the issue with a simpler program than my test case for a Cortex-R5, and also on a Cortex-M0.