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.

Compiler: C2000 Linker v16.9.4.LTS performance

Other Parts Discussed in Thread: TMS320C28346

Tool/software: TI C/C++ Compiler

We are thinking about switching from CCS5 to CCS7, but the current linker takes more than 40 minutes on linking a project that takes 2 minutes to link on CCS5.

My compile target is the TMS320C28346.

TMS320C2000 Linker v6.1.0: ~135s

TMS320C2000 Linker v16.9.4.LTS: ~ 2700s

TMS320C2000 Linker v16.9.5.LTS: ~ 2700s

I tried to fiddle with some linker options like --reread_libs, but nothing seems to have an impact on the link time.

  • I'm not aware of any such problem in the 16.9.4.LTS version of the C2000 linker.  I think this is something we have not seen before.  I'd appreciate if you would send us a test case, so we can investigate.  In this case, we need the full CCS project.  I'd appreciate if you would package it up as described in the article Project Sharing, then attach it to your next post.

    Thanks and regards,

    -George

  • Are you using any of the following options?

    • -O4
    • --no_sym_merge (also known as "-b")
    • --compress_dwarf[=on,off]

  • -O4

    Does not work for us, the linker thinks an overload is an incompatible redefinition.

    --no_sym_merge / -b

    No.

    I just turned it on and it reduced the build time on CCS5 to ~3s and ~10s on CCS7. This is perfectly acceptable. Are there any disadvantages to this (I assume the main side effect is that the debugging info takes more disk space).

    BTW, we have lots of leaky abstractions (most headers include a dozen other headers etc.) and all legacy code (which is the majority) is in the global namespace.

  • I meant to say link time.
  • It should not be possible for a C++ overloaded function to have a type merging failure, even at -O4, due to name mangling. Are either of these functions declared with 'extern "C"' ? If so, by the "one definition rule," you are not technically allowed to have more than one distinct definition of this function. If not, could you please show us the prototypes for these functions, including whatever class or namespace they are in?
  • I'm not aware of any linker performance issues remaining on 16.9.4.LTS that could be worked around by --no_sym_merge. This may be a new problem. If so, it would be very helpful to see the whole project so that we can analyze it. Are you linking against any libraries which might still be using COFF STABS debug? Could you show us your complete compilation and linking options? It would be easiest if you rebuild your project and send us the entire build console window.

    Yes, the main side effect of using --no_sym_merge is that the debugging info is larger, and this means it takes longer for the debugger (CCS) to parse it.
  • No, they aren't `extern "C"`. But I'll report that problem when I get around to making a reproducible test case.

  • Sorry, I don't have permission to send you the project and I certainly won't get it.

    We are using --symdebug:dwarf/-g, but I don't know about the libraries.

    Compiler flags:
    -v28 -ml -mt --float_support=fpu32 -O3 -g --optimize_with_debug=on --include_path="C:/devel/Servo/ServoApplication/SHARED_LIB/ISD" --include_path="C:/devel/Servo/ServoApplication/platform/servo/common" --include_path="C:/devel/Servo/ServoApplication/platform/servo" --include_path="C:/devel/Servo/ServoApplication/platform/servo/isd" --include_path="C:/devel/Servo/ServoApplication" --include_path="C:/devel/Servo/ServoApplication/ServoLibrary" --include_path="C:/devel/Servo/ServoApplication/ServoLibrary/hal/TMS320C28346/include" --include_path="C:/devel/Servo/ServoApplication/platform/servo/common/object_dictionary/DS402" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.4.LTS/include" --relaxed_ansi --define=CONFIG_APPL_MODULE --define=DSP_APP --define=NDEBUG --diag_warning=225 --display_error_number --diag_suppress=176 --no_rpt

    Linker flags:
    -v28 -ml -mt --float_support=fpu32 -O3 -g --optimize_with_debug=on --relaxed_ansi --define=CONFIG_APPL_MODULE --define=DSP_APP --define=NDEBUG --diag_warning=225 --display_error_number --diag_suppress=176 --no_rpt -z --stack_size=0x300 -m"ISD510.map" --warn_sections -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.4.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.4.LTS/include" --reread_libs --xml_link_info="ISD510_linkInfo.xml" --no_sym_merge --rom_model
  • Dominic Fandrey said:
    Sorry, I don't have permission to send you the project and I certainly won't get it.

    I understand.  Perhaps it would help if you knew you can send it directly to me.  Hover your mouse over my screen name or avatar. A box will pop up. Click on Send a private message. In the message compose interface which comes up, use the paper clip icon to attach the zip file.

    Thanks and regards,

    -George