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/TMS320F28335: Linker takes a long time to link.

Part Number: TMS320F28335

Tool/software: TI C/C++ Compiler

Hi,

We have a linker command file with a large number of sections and the linker takes more than 5 minutes to complete the linking.  The linked result seems to work just fine.

Is there anything we can do the decrease the link time?

Thanks.

  • What version of the compiler tools (not CCS) do you use?  Do you use the build option --opt_level=4?

    Thanks and regards,

    -George

  • Hi, George,

    The compiler version is TI v6.20 [TIv15.12.3.LTS]
    --opt_level is off
    --opt_for_speed is 3

    Thanks.
  • You may be experiencing the same issue discussed in this forum thread.  We never got a test case, so we don't know the root cause.  The workaround in that case is to use --no_sym_merge.  That may be the case for you as well.  No matter what, I'd appreciate if we could get a test case from you.  Is your code organized as a CCS project?  If so, please package it into a .zip file as described in the article Project Sharing, and attach that to your next post.

    Thanks and regards,

    -George

  • George,

    Yes, I read that thread and tried the --no_sym_merge option but it didn't help. The linking time is about 3 to 4 minutes!

    Unlikely I can get the permission to share the project at this time! I do appreciate your help though.

    Thanks.

    Eric
  • Rather than post a test case here, you can send it to me privately.  Is that possible?

    Thanks and regards,

    -George

  • George,

    I can send you the link cmd file in private and see if that helps. Unlikely I will get an OK to send the entire project.

    Sorry about that and thank you for your help.

    Eric
  • Eric Sun said:
    I can send you the link cmd file in private and see if that helps.

    I appreciate the offer.  Unfortunately, having only that one file will not help.

    Eric Sun said:
    Unlikely I will get an OK to send the entire project.

    I don't need the entire project.  I can reproduce the link if I have the following:

    • All the object files
    • All the libraries, except the compiler RTS library
    • The command file(s)
    • Exactly how the linker is invoked

    Is that something you can put into a zip file and send to me privately?  If so, here is how the send step works.  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

  • Thank you for sending in a test case.  I can reproduce the problem.  I filed CODEGEN-4078 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

  • I've looked at the test case briefly. You are correct that it is caused by having a large number of sections as well as a large number of distinct MEMORY ranges. (Here consider "large number" to be over 300.) This slowdown is a bug, and we should be able to do something about it, but I'm sorry, I don't think there is a practical workaround that we can suggest with the current version.