Skip to main content
RPatt.11
Associate II
July 26, 2023
Solved

How undo "exclude from build" for a file?

  • July 26, 2023
  • 4 replies
  • 4518 views

Hi,

In STM32CubeIDE 1.12.1 I right-clicked on a .c file in the Project Explorer view and excluded it from build.  Now I want to include it back in my build.  How do I do that from the IDE?

thanks,

russ

    Best answer by JP_ama

    Go to the "Exclude from build" dialog again, uncheck the boxes for Debug and Release and hit OK to include the file back into the build.

    4 replies

    JP_ama
    JP_amaBest answer
    Associate III
    July 27, 2023

    Go to the "Exclude from build" dialog again, uncheck the boxes for Debug and Release and hit OK to include the file back into the build.

    RPatt.11
    RPatt.11Author
    Associate II
    July 27, 2023

    The file I excluded disappeared from the Project Explorer window.  When I excluded it I right-clicked on it then Resource Configurations->Exclude from build.    How do I get back to the "Exclude from build" window for a file that is missing from the Project Explorer window?

    thank you

    RPatt.11
    RPatt.11Author
    Associate II
    July 27, 2023

    Wow, never mind.  I see it greyed out at the bottom of the Project Explorer window.  Sorry I wasted your time. :|

    Explorer II
    September 5, 2024

    Answer to this question totally depends on what kind of file you want to undo " exclude the build ".

    1) for header files (xxx.h) --> go to header file, left-click and select properties (Alt + enter), navigate to resource section, select  C/C++ build tab. click on configuration tab and select [all configurations]. Uncheck the box Exclude resource from build. Apply and Close. 

    2) for source files (xxx.c)  --> left click on .c file and click Resource Configuration and select Reset to Default. 

     

    I hope that helps for you, 

    Thanks:grinning_face: