How to import existing C/C++ source files into STM32CubeIDE
In STM32CubeIDE, first create a folder for your source files to reside in. In order to do this, right click on your project and select New -> Folder:
Step 1: Create folder

In the dialog that opens, select the correct location (project & optionally subfolder) where the folder will be created. For this example, we’ll use occutils .
Step 2: Import files
Right click on the folder where you want to import the files intoand click Import:
Now click General -> File system.

In the dialog that opens, select the From directory where you want to import the files from.
and click Finish. After that, your files will be included in the project.
Check out similar posts by category:
STM32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow