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.

unresolved symbol __TI_Unwind_Resume

Other Parts Discussed in Thread: HALCOGEN, TM4C129ENCPDT

Hi,

i am trying to cross-compile the CppUTest framework for the TMS570. Therefor I compiled an static lib.

Right now I am trying to link against this lib. But I am getting some unresolved symbols errors.

unresolved symbol __TI_Unwind_Resume, first referenced in C:/Programme/ti/ccsv5/tools/compiler/tms470_4.9.5

The CppUTest framework uses exception. Therefor I enabled exception handling.

Are there any issues related to enabling exceptions and linking against the rtsv7R4_T_be_v3D16_eabi.lib.

So I am open for some advices.

Constantin



  • Hi Constantin,

    this type of message is typical, if for example, the include paths/variables for you library are not set up.

    Please doulbe check this, as shown in the below wiki and keep us informed.

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Best Regards,

    Lisa

  • ok, i double checked and I didn't find something related..

    The build of the library was also done using the same compiler and the same flags. And it was build without any errors or warnings.

    Here is linker output:

    <Linking>
    warning #10247-D: creating output section ".ARM.exidx" without a SECTIONS
       specification
    warning #10247-D: creating output section ".ARM.extab" without a SECTIONS

       specification
    warning #10247-D: creating output section ".intvecs" without a SECTIONS
       specification
    warning #10247-D: creating output section ".sysmem" without a SECTIONS
       specification
    warning #10210-D: creating ".sysmem" section with default size of 0x800; use
    >> Compilation failure
       the -heap option to change the default size

     undefined                  first referenced                                                                                      
      symbol                        in file                                                                                           
     ---------                  ----------------                                                                                      
     __TI_Unwind_RaiseException C:/Programme/ti/ccsv5/tools/compiler/tms470_4.9.5/lib/rtsv7R4_T_be_v3D16_eabi.lib<tdeh_uwentry_t2.obj>
     __TI_Unwind_Resume         C:/Programme/ti/ccsv5/tools/compiler/tms470_4.9.5/lib/rtsv7R4_T_be_v3D16_eabi.lib<tdeh_uwentry_t2.obj>
     __TI_cxa_end_cleanup       C:/Programme/ti/ccsv5/tools/compiler/tms470_4.9.5/lib/rtsv7R4_T_be_v3D16_eabi.lib<tdeh_uwentry_t2.obj>
     __aeabi_unwind_cpp_pr0     ./source/AccuHandler/AccuHandlerTest.obj                                                              
     __aeabi_unwind_cpp_pr1     C:/ccs_workspace/CppUTest/Debug/CppUTest.lib<SimpleString.obj>                                        
     __cxa_allocate_exception   C:/ccs_workspace/CppUTest/Debug/CppUTest.lib<Utest.obj>                                               
     __cxa_begin_catch          C:/ccs_workspace/CppUTest/Debug/CppUTest.lib<Utest.obj>                                               
     __cxa_end_catch            C:/ccs_workspace/CppUTest/Debug/CppUTest.lib<Utest.obj>                                               
     __cxa_throw                C:/ccs_workspace/CppUTest/Debug/CppUTest.lib<Utest.obj>  

    Maybe this helps. I've already googled but didn't find something related to the linker

    So I am open for more advices... ;-).

    Thanks

    C.

  • HI Constantin,

    have you double checked the File Search Path in the linker options to ensure a proper path to all libraries?  Are you using a custom linker command file?  If you are using an unmodified example, would you be able to point me to it in order to try reproducing things here?

    Best Regards,
    Lisa

  • abeat said:
    Are there any issues related to enabling exceptions and linking against the rtsv7R4_T_be_v3D16_eabi.lib.

    You must link against rtsv7R4_T_be_v3D16_eabi_eh.lib.  The only difference between  rtsv7R4_T_be_v3D16_eabi_eh.lib and  rtsv7R4_T_be_v3D16_eabi.lib is that the former supports C++ exception handling, and the latter does not.

    You should consider letting the linker pick the library for you by either linking against libc.a or by enabling automatic library selection in the linker options.

  • Hi Archaeologist,

    the annotation of "eh" solved the most unresolved symbols. Thanks a lot for this advice.

    Maybe it is useful to add an information to the manual.

    The last remaining unresolved symbol is the following:

     undefined first referenced       
      symbol       in file            
     --------- ----------------       
     _undef    ./source/sys_intvecs.obj

    The following code was generated using the halcogen:

        .sect ".intvecs"
        .arm

    ;-------------------------------------------------------------------------------
    ; import reference for interrupt routines

        .ref _c_int00
        .ref _undef
        .ref _dabort


    ;-------------------------------------------------------------------------------
    ; interrupt vectors

            b   _c_int00
            b   _undef
    svcEntry
            b   svcEntry
    prefetchEntry
            b   prefetchEntry
            b   _dabort
    reservedEntry
            b   reservedEntry
            ldr pc,[pc,#-0x1b0]
            ldr pc,[pc,#-0x1b0]

       Maybe you have some advice regarding this problem.

    C.

  • abeat said:
    Maybe it is useful to add an information to the manual.

    This is documented in the ARM Optimizing C/C++ Compiler v4.9 User's Guide (spnu151 revision G) in section 5.6 "C++ Exception Handling"

    See: http://www.ti.com/lit/ug/spnu151g/spnu151g.pdf

    abeat said:
    Maybe you have some advice regarding this problem.

    Sorry, I'm not familiar with the function "_undef".  It is very likely the problem is one of the following:

    1. The function's name is actually "undef".  In EABI, you should not add an underscore prefix to refer to C functions from assembly code.
    2. The function's name is actually "_undef", and you have not successfully added a definition to the project.  I do not know where this function comes from.
  • Hi Archaelogists,

    ok I found it too, but it wasn't that obvious that you have to build a certain library for exception handling.

    I mean I do understand, that you have to enabel the compile flag for C++ exception handling. But I missed, that I than had to

    use a special type of library. But anyway thanks a lot for your help.

    I could solve the last problem using the halcogen there i had to disable the connection for undefined exceptions in the interrupts menu.

    Now its compiling an linking without errors and warnings.

    Thanks a lot and cheers.

    C.

  • hi Archaeologist,

    I met the same problem. my target processor F28M35, and the compiler is arm_5.0.1. But i can't find the exception enabled version run-time support library in the compiler directory.

    there is only two lib file.  rtsv7M3_T_le_eabi.librtsv7M3_T_le_xo_eabi.lib

    Could you help me on this ?

  • eric meng said:
    I met the same problem. my target processor F28M35, and the compiler is arm_5.0.1. But i can't find the exception enabled version run-time support library in the compiler directory.

    When the ARM compiler is installed only some of runtime support libraries are present.

    CCS will build other versions of the runtime support library as required.

    E.g. set the Runtime support library to <automatic>

    Under language options select "Enable C++ exception handling":

    When the project using C++ is compiled the exception handling version of the runtime support library will be built it it doesn't already exist:

    'Building target: TIVA_cpp_exceptions.out'
    'Invoking: ARM Linker'
    "C:/ti_ccs6_0/ccsv6/tools/compiler/arm_5.0.8/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --diag_warning=225 --display_error_number --diag_wrap=off -z --stack_size=512 -m"TIVA_cpp_exceptions.map" --heap_size=0 -i"C:/ti_ccs6_0/ccsv6/tools/compiler/arm_5.0.8/lib" -i"C:/ti_ccs6_0/ccsv6/tools/compiler/arm_5.0.8/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="TIVA_cpp_exceptions_linkInfo.xml" --rom_model -o "TIVA_cpp_exceptions.out" "./tm4c129encpdt_startup_ccs.obj" "./main.obj" "../tm4c129encpdt.cmd" -l"libc.a"
    <Linking>
    warning #10366-D: automatic library build: using library "C:\ti_ccs6_0\ccsv6\tools\compiler\arm_5.0.8\lib\rtsv7M4_T_le_v4SPD16_eabi_eh.lib" for the first time, so it must be built. This may take a few minutes.

  • Thanks.... it works when i use the <automatic> lib