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.

File level compilation options

Hi,

I have some specific compilation options set on some files in my project that are different from the project's global options.

How can I quickly see which files in my project have overriden options? In IAR for instance, such files have a specific icon, and it is easy to reset the file settings to global settings. Did I miss something?

 

Thanks.

  • The project file is a text file with a .pjt extension. You can view that file in a simple ASCII-only text editor like NotePad. Making changes can cause problems if you alter the syntax that CCS uses, so only do that if you are an advanced user.

    At the bottom of the pjt file, you will find the file specific options that you have added. Each file will be listed in a section label like

    ["main.c" Settings: "Debug"]

    The file-specific options will be on the line or lines after that label.

    The cleanest solution to resetting to the original options is to create a new configuration before adding the file-specific options.

    • Project->Configurations command
    • Click on the configuration to start from, like Debug
    • Click Add
    • Enter a name for the new configuration, like DebugWithOpt, then click OK
    • Click on the new configuration and click Set Active

    Your file-specific options will be applied only to this configuration. If you want to go back to the original, you can repeat the steps above.

    Be sure to save the Project by using Project->Save from the file menu.

    And please be aware that each time you close CCS and open it again, the active configuration will be the first one alphabetically. You can take advantage of that in your name selection, or change to the desired configuration when you start CCS by using the drop-down box with the configuration names.

  • Are you running CCSv3.3, CCSv4 or CCE?

    CCSv3.3: The colour of the icon in the Project Manager is different

    CCSv4: You will see a little ^ on the icon in the Project View

    CCE: Doesn't show a difference (upgrade to CCSv4 [;)] )

    John

  • I'm running CCSV4 beta 5.

    In fact i did not notice this subtle ^ mark because I have this mark on all files...

    So now I'm digging into the project file to see why this happened. My project has been initially developped in CCE, then imported into CCSV4.

    I think this is due to the compiler version; I decided to keep version 3.1 stable rather than 3.2beta.

     

    I'll do some clean-up and see if the problem has disappeared.

     

    Thank you anyway.

     

  • Hi again,

    I still have a problem in beta 5. When .c files are placed in a subfolder, ccsv4 IDE automatically sets the "object directory" compiler option, (which is always greyed by the way). As a result the file appears with a "^" mark in the project view. This is a little disturbing since I cannot check easily which files have relevant specific options (such as different optimization levels) and which files do not.

    To replay the issue: create a new C/C++ project, then create a .c module in the root folder. The file has no "^" as expected. Now create a folder and move the .c file into it. Then a "^" will appear on the file.

    Is there any possibility to circumvent this behaviour?

    Thank you.

  • Dive,

    I am trying to reproduce this but for me when I move a file into a subfolder I don't see a "^".  I am wondering if it is specific to some options set in the top level project that need to be adjusted if the source file is in a different directory.  I basically just create a simple project with a main.c and then create a source folder and drag the file in.  Could you send me the options set at the project level for the compiler and linker?  It should be possible to click on the "ISA Compiler" in the C/C++ Build setttings and select everything under "All Options:"  same for the linker settings.

    Thanks,

    John

     

  • Here they are. I've also included the incriminated file options (this file is in subfolder "test"'. The highlighted option appears automatically...

    Thank you.

    =========================

    Project level compilation options:

    --silicon_version=msp -g --include_path="C:/Program Files/Texas Instruments beta4/ccsv4//msp430/include" --include_path="C:/Program Files/Texas Instruments beta4/ccsv4/tools/compiler/msp430/include" --sat_reassoc=off --fp_reassoc=off --plain_char=unsigned --printf_support=minimal $(GEN_OPTS_QUOTED)

     

    Project level linker options:

    --stack_size=80 --heap_size=80 --use_hw_mpy=16 --warn_sections -i"C:/Program Files/Texas Instruments beta4/ccsv4/tools/compiler/msp430/lib" -i"C:/Program Files/Texas Instruments beta4/ccsv4/tools/compiler/msp430/include" --reread_libs --rom_model

     

    File specific compilation options:

    --silicon_version=msp -g --include_path="C:/Program Files/Texas Instruments beta4/ccsv4//msp430/include" --include_path="C:/Program Files/Texas Instruments beta4/ccsv4/tools/compiler/msp430/include" --sat_reassoc=off --fp_reassoc=off --plain_char=unsigned --printf_support=minimal --obj_directory="test" $(GEN_OPTS_QUOTED)

  • Thanks.  I changed my project level options to match.  Might didn't have the double // in my path in front of msp in the one include path so I added that in.  However when I drag my source into the test directory I don't see that --obj_directory option get set.  It stays blank for me, and hence I don't get the ^.  Not sure what is triggering that for your project.  I will have to check with others for more ideas.

     

    john

     

     

     

  • Puzzling.

    In a previous post you said that you created a "source folder". Do you confirm this is done with "Right-click on project / New / Folder"? Or is there a specific folder type? Anyway I don't have any other option.

     

    dive

  • Yes I did it the same way context menu -> New -> Folder

     

     

  • Dive,

    This problem will be fixed in the CCSv4 full release version, where the version you are using now is a beta release. With the full release version, you will no longer see the --obj_directory build-option being automatically set on a file when it's added into a folder.

    - Baltasar.