on
2026-04-14
7:03 AM
- edited on
2026-04-20
4:31 AM
by
Laurids_PETERSE
This guide explains how to take an existing STM32CubeMX2 project, generate a CMake project from it, and then import it into STM32CubeIDE.
When generation completes, verify that the destination folder contains:
Figure 1. IDE project generation
Figure 2. Import STM32 project
Figure 3. Import STM32CubeMX2 project
You are now on the Project with existing CMake sources page. Fill in the fields as follows:
Figure 4. Point the project to the existing CMake sources
The wizard opens the "Configure default tool‑chain settings for the project" page.
Figure 5. Configure the toolchain and MCU
In "Project Explorer", the new STM32 CMake project should be visible:
[Right‑click] the project → [Build Project].
STM32CubeIDE runs CMake, configures the build system, and compiles the code.
Minor typo in section 4. The image show STM32C562VETx and the description says "Example used: STM32C562RETx"
Thanks for catching that @Tom_pm. I have updated the article accordingly.