2026-05-17 2:32 PM
If I add a new .c file to my project in core/src it does not get recognized and is not complled. How do I get it into the make list?
Thanks
Solved! Go to Solution.
2026-05-18 12:57 AM
Hi @fritz3917,
There is no managed build, so you must define your new source file manually, preferably by editing the top-level CMakeLists.txt file:
# Add sources to executable/library
target_sources(<PROJECT_NAME> PRIVATE
# User defined sources
core/src/newFile.c
)<PROJECT_NAME> to be replaced according to your project (see used value from the cmake files).
2026-05-18 12:57 AM
Hi @fritz3917,
There is no managed build, so you must define your new source file manually, preferably by editing the top-level CMakeLists.txt file:
# Add sources to executable/library
target_sources(<PROJECT_NAME> PRIVATE
# User defined sources
core/src/newFile.c
)<PROJECT_NAME> to be replaced according to your project (see used value from the cmake files).
2026-05-18 9:03 AM
2026-05-18 9:10 AM
@Julien D wrote:There is no managed build
Seems like a retrograde step from CubeIDE ?
Will you be adding that (or equivalent) in the future ?
2026-05-18 12:43 PM
Seems like a retrograde step from CubeIDE ?
It depends on what you are looking for. A CubeIDE Eclipse/CDT project is primarily designed to be managed within that IDE, with the build and project configuration driven by the IDE’s project model. This makes it easy to support features such as managed build.
A CMake project, on the other hand, is intended to be more IDE-agnostic and is generally easier to integrate into a CI/CD environment. That said, I admit that CMake’s learning curve can make it seem more complicated at first.
For some developers, managed build is an advantage; for others, it is a drawback. In the end, it is a tradeoff between explicit control and IDE-managed convenience.
Will you be adding that (or equivalent) in the future ?
Having additional facilities on top of CMake is something we are considering.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.