When we are importing an example project to the STM32CubeIDE, it probably uses .cproject
and .project
files present in the project directory to import required drivers and middleware. For example, here's a list of source files for an example project import into the IDE:

How can I automatically add the set of sources part of Middleware
and Drivers
folder above to a new project's .project
and .cproject
files, so that they are properly added to the build configuration?