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.

Unhandled exception in armlnk.exe version 15.12.1.LTS

Hi,

we want to migrate to Code Generation Tools version 15.12.1.LTS (until now we are using version 5.1.6). However, when building an existing application using the new tools the linker stops with the following error:

INTERNAL ERROR: C:\TI\TI ARM Code Generation Tools 15.12.1.LTS\bin\armlnk.exe experienced an unhandled exception

We are calling the linker using the following options (among others):

  • -l "C:\TI\TI ARM Code Generation Tools 15.12.1.LTS\bin/../lib/rtsv7R4_T_be_v3D16_eabi.lib"
  • --reread_libs
  • --rom_model
  • --warn_sections
  • --be32
  • --issue_remarks
  • --display_error_number
  • --disable_auto_rts
  • --fill_value=0
  • --minimize_trampolines

What we encountered so far: When removing the --minimize_trampolines option the application can be linked without any problems.

Please let me know if you need additional information.

Many thanks in advance,

Stefan

  • This is almost certainly a new bug we have not seen before.  The only way to understand what happened is to reproduce it.  And for that, we need everything the linker sees.  Is this organized as a CCS project?  If so, I'd appreciate if you would submit that project.

    Thanks and regards,

    -George

  • Hi George,

    unfortunately I can't provide you a CCS project but a Makefile project:

    unhandled_exception_armlnk.zip

    Note that the archive is password protected. I'll send you the password via a private message.

    Best regards,

    Stefan

  • Thank you for sending in a test case.  I realize that is particularly difficult with linker issues.  I can reproduce the same failure.  I filed SDSCM00052861 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • As a workaround, use the option --trampolines=off and do not use the option --minimize_trampolines
  • Thanks guys!

    Until the bug is fixed the workaround is fine :)

    Best regards,
    Stefan
  • Archaeologist,

    are you sure that this is a valid workaround?
    In my understanding the workaround should be to just remove the '--minimize_trampolines' and nothing else.

    With using the '--trampolines=off', it would prohibit the linker to generate any trampolines. From what I know, those trampolines are needed for any PC-related branch instruction that cannot be represented with a 24-bit offset. So if we would have a far call somewhere (e.g. if a function resides in the RAM) it would fail to link...

    Please give feedback.
    Thanks a lot.

    Regards,
    Michael
  • You are correct, the precise workaround is to avoid using --minimize_trampolines=postorder

    I presumed the test case provided wanted to minimize trampolines, and using --trampolines=off certainly minimizes trampolines.

    I suggested using --trampolines=off as the closest match to what I perceived the intent to be. The test case provided does link successfully without trampolines. If you have another test case which does not link successfully without trampolines you could stick to just avoiding --minimize_trampolines=postorder

    [ Edited to fix a mistake -- Archaeologist ]