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.

TMS470 Compilation very slow

Hi,

      In our project we have around 40 simple projects. And we are supporting 3 tool chains.

           1. TMS470 (4.9.1) = compile time for 40 projects ~90 min

           2. Code Sourcery GCC = Compile time for 40 projects = < 5 min

           3. IAR  = compile time for 40 projects  =  < 10 min

TMS470 takes very long time for the same set of code which compiles very quickly in other compilers. Am i missing any settings because of which my compilation is slow or is the tool is slow.

If the tool is slow, this needs to be looked into.

 

Regards

baskaran

  • Can you tell if the bulk of the comple time is actually in the link step?  (For that matter, are you actually doing linking or just compiling?)

    Are you using ELF (--abi=eabi) or COFF object format?

     

  • i am compiling and linking usinh ELF.

    Seems much of the compile time is in the link setup.

  • Well then I'm no help.  I had a thought if you were having slow COFF-based links.  Hopefully someone else will have something to offer.

     

  • Make sure the temporary directory is on a local hard disk, and not some network drive.  I highly doubt this is the problem.  But it is easy to check.  The temp directory is given by the --temp_directory option, or the TMP environment variable.  I presume this will check out OK.

    40 projects is more than we can work with.  Please narrow this down to one project that builds too slowly.  Whatever the problem is with this one project is likely to be the problem for all of them.  Then try to figure out what part of the build for this one project is taking the most time.

    If you think the linker is the issue, please consider what is in this wiki article.

    Thanks and regards,

    -George

  • George,

                  I cleared the temp location and the behavior is still the same.

                  Is it possible for you to download and use our package from http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/02_00_00_04/index_FDS.html.

                  If so i can guide to to try with specific projects from that to see the behavior.

    Regards

    Baskaran

     

     

  • Baskaran Chidambaram said:
    Is it possible for you to download and use our package

    I have it installed.

    Baskaran Chidambaram said:
    If so i can guide to to try with specific projects from that to see the behavior.

    Please do.

    Thanks and regards,

    -George

  • George,

             You can import the grlib project from "StarterWare\build\armv7a\cgttms470_ccs\grlib" and try building it. This project will compile the sources and create a library. In GCC the same example takes 5 sec to compile. So i feel this should be a good starting point.

     

    Regards

    Baskaran

  • I don't think this is a problem with the TI ARM compiler.  It might be a problem with the CCS build process.  But there are settings you can change to improve build speed.

    I copied all the source and header files for this project into a single directory.  From there I timed both gcc and cl470 building everything with similar options.  And they both finish in about 45 seconds on my low spec laptop.

    So, I timed the build in CCSv5.1.  It takes about 75 seconds.  I made a change which reduces the time to about 55 seconds.

    The change is to add two options to the invocation of gmake.  Here are directions, for CCSv5.1, to make that change.

    • Right-click the project name and choose Build Options
    • In the lower left corner click on Show Advanced Settings
    • Highlight C/C++ Build
    • Remove the check next to Use default build command

    Now you can edit the Build command text box.

    • Add these two options to the text box: -j ${NUMBER_OF_PROCESSORS} -s

    The -j ${NUMBER_OF_PROCESSORS} tells gmake it can split processes across the number of CPU cores on your PC.  I only have 2 cores.  On machines with more, you can expect even more speedup.  

    The -s tells gmake to be silent.  Sending messages to the console is expensive in terms of time.  This option reduces the output of gmake, but not as much as I would like.  This is probably due to a large number of echo statements in the auto-generated makefiles.  I don't think there is a way to change that.

    Thanks and regards,

    -George

  • Thanks George,

                   with out these options it took 48 sec on my machine (4 core). With the suggested options it took 24 sec. Good improvements, but still it is not near to GCC where it takes 5 sec.

     

    Thanks

    Baskaran