2024-08-29 08:02 AM
I am using STM32 Project with CubeIDE.
When I select "Automatically generate Makefile" in the project properties, it seems that I cannot change the build location.
Is there a way to specify the output directory for the build artifacts?
Solved! Go to Solution.
2024-08-30 01:58 PM - edited 2024-09-01 09:02 AM
These debug config screens are not related to build directory. Edit the makefile, find any definitions/macros that can be changed in make command line or environment.
Choosing makefile as the project type usually means that developer is comfortable with makefiles [and is smarter than IDE & mouse clicking folks].
2024-08-29 08:33 AM
Not in the CubeMX GUI - but you can do this by tweaking the generated makefile in the post-build command.
2024-08-30 09:52 AM
Thank you for your response.
Is there a way to change the build directory by modifying the settings in CubeIDE or the project configuration, without directly editing the Makefile?
2024-08-30 11:13 AM
Just make/edit a new debug or run configuration and set it to....what you want:
2024-08-30 12:36 PM
Thank you for the information.
How exactly should I set this up?
Aren't the build configurations and run configurations meant for setting up how the build artifacts are debugged or run?
I am specifically looking to designate an output directory for the build artifacts.
For example, I would like to create a build directory under the project root, and within that, have separate release and debug directories for the output. In the future, I also plan to create separate directories under build for unit test build artifacts.
2024-08-30 01:11 PM
Come on... read the manuals and the how-to-use ...
then right click and create a new configuration...as you like, set it. Thats it. Try...
2024-08-30 01:58 PM - edited 2024-09-01 09:02 AM
These debug config screens are not related to build directory. Edit the makefile, find any definitions/macros that can be changed in make command line or environment.
Choosing makefile as the project type usually means that developer is comfortable with makefiles [and is smarter than IDE & mouse clicking folks].
2024-08-30 04:17 PM
Thank you.
I usually use CMake, so I'm not very familiar with Makefile, but I'll give it a try and read through it.
2024-08-31 04:50 PM - edited 2024-08-31 04:52 PM
Newer CubeMX versions can produce Cmake project as well. There's no reason to suffer.