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.

Compile a selected file first in the project

Hello,

I was looking into building 2 files first (following  http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/163076.aspx) since it takes more than half-an hour to compile it on my system while the other cores are busy building the rest of the files, if these files gets to be built first then the total building time would be reduced to this time, but there was an issue using Pre-build steps that it wouldn't compile on multiple cores if they were being used, I don't know in CCS5.5.00077 if is still the case (http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/286101/997927.aspx#997927)

Is there a way to select which files to be built first on separate cores?

Best regards,

David.

  • Hi David,

    I tried this out with CCSv5.5 and don't see the pre-build steps impacting the multi-core builds. You can try 5.5 and see if that helps.

    David Luca said:
    Is there a way to select which files to be built first on separate cores?

    Another suggestion for this is to create another project for the files to be built first that generates a library and then have it as a dependent project of the first project which will also link in the library. That way when you build the first (main) project, it will build the dependent project first and then the main project.

    Thanks

    ki

  • Hi Ki,

    If I move that file into a library then the system will build it first and wait until it's built on one core and not use the remaining cores to build the rest of the program increasing the total time instead. The pre-build step sounds like a good idea however I think it could be the same issue, that the compiler doesn't progress until this file is built. So this has to be solved through makefiles to make sure it gets picked first. 

    Best regards,

    David.

  • Ok, I get what you are trying to do.

    The pre-build step won't help you for what you want to do. CCS waits until the pre-build steps have finished executing before continuing on. It is not an asynchronous step.

    This is no way to control the compiler order via the project properties. Link order, yes. Compile order, no. You can modify the generated makefile to reorder the compiler order manually. But if you are going to do that, might as well just create and manage your own makefile.

    Thanks

    ki

  • Hi Ki,

    I tried again in CCS5.5 to use a pre-build step that calls 'rm main.obj' but it builds on one core only so I don't know why you don't see the issue, it is easily reproducible, unless you didn't clean the project. I removed that and builds on all cores.

    Best regards,

    David.

  • Is your issue that the pre-build step is compiling on just one core? This is expected. Or is it that once you use a pre-build step, the entire project also uses just one core?

  • Hi Ki,

    Yes, once I use a pre-build step, the entire project uses one core until I remove it.

    Best regards,

    David.

  • I can't seem to reproduce that. Let me try on another system or environment.