cancel
Showing results for 
Search instead for 
Did you mean: 

Query related to Debug folder

Monika_02
Associate II

Is it possible to get the .o files i.e. the output files in the same folder because whenever I build the code the output files gets saved in the Debug folder.

Monika_02_0-1690539104679.png

 

5 REPLIES 5
Bob S
Principal

Same folder as what?  As the source files?

The output files (.o, .d, etc.) as well as the executable (hex, bin, map, etc.) are put in the "Debug" folder because that is the name of the build configuration you are using.  Should you use the "Release" configuration, that would store those files under the "Release" directory.  That way, the intermediate files from a "debug" build never get mixed up with files from a "release" build.

Monika_02
Associate II

Yeah, I am understanding it.  But I want the output files(.o, .d ) in the same directory.

Monika_02_0-1690781564553.png

If I have these c files in a directory while executing it the output files gets stored in Debug directory but What my requirement is, it needs to be saved in this same directory where the c source files are there.  Is it possible?

Bob S
Principal

WHY is that a requirement?  And is it really a requirement, or just something you like/want to have?

If that just something you "like to have" then it is time for you to learn a new trick and let the intermediate/executable files live outside your source folders.  Don't fight the IDE.  Your life will be much easier.

If this is some requirement for your company's development procedures or something for which you really have no choice, you MIGHT be able to change the build system's "CWD" and/or "PWD" setting.  But backup your entire project tree before trying this - it may well cause the build system to delete your source code when doing a "clean" operation.  I haven't tried this and really don't recommend it.  Open the project properties dialog, expand "C/C++ Build" in the left panel and then click on "Environment".  In the right hand panel, change the "CWD" and "PWD" values to remove the trailing "\Debug" (or "/Debug" if you are on Linux/Mac).

Again - I don't know that this will work and it may trash your project.  You've been warned.

Monika_02
Associate II

Hi,

As, I am doing unit testing for a stm32 project, I want to know which tool is invoking automatic makefile.  where is the path of the tool in local disk.

Monika_02_0-1695214903528.png

 

Thanks

Monika

Bob S
Principal

This has nothing to do with the rest of this thread.  Create a new thread with an appropriate subject line will be your best bet to get this answered.