cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use STM32CubeMX2 to generate an STM32CubeIDE project? How?

TDK
Super User

The STM32CubeIDE project output setting is not present in STM32CubeMX2. Is there a way to generate a project that STM32CubeIDE can use? How do I do this?

I did try the "CMake" option but wasn't able to get a project to import correctly.

If you feel a post has answered your question, please click "Accept as Solution".
1 ACCEPTED SOLUTION

Accepted Solutions
Oussama_TROUDI
ST Employee

Hello  @TDK ,

This is the recommended way to use an STM32CubeMX2 CMake project with STM32CubeIDE (v2.1.1 recommended):

  • In STM32CubeIDE, go to File → STM32 Project Create/Import.
  • Under Import STM32 Project, select STM32 CMake Project, then click Next.
  • Enter a project name and select the source folder, then click Next.
  • Choose the correct STM32 MCU and click Finish.

The project will then appear as an STM32 CMake project, and the normal Build option will be available.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

7 REPLIES 7
Radosław
Senior III

I  only do small try, but you can import cmake project, 

Karl Yamashita
Principal

I believe ST is focusing more on VS Code and moving away from Eclipse IDE.  

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

Nawres GHARBI
ST Employee

Hi @TDK 

in stm32cubemx2 Cmake project is usable for both stm32cubeide eclipse and vscode 

if you encounter issues please share it and we will be happy to help

@Nawres GHARBI 

This post is me encountering issues and asking for assistance.

Is there a workflow? The "File -> Import -> Existing Projects..." option imports a project but there is no "build" option.

Screenshot 2026-03-17 192114.png

 

If you feel a post has answered your question, please click "Accept as Solution".
Oussama_TROUDI
ST Employee

Hello  @TDK ,

This is the recommended way to use an STM32CubeMX2 CMake project with STM32CubeIDE (v2.1.1 recommended):

  • In STM32CubeIDE, go to File → STM32 Project Create/Import.
  • Under Import STM32 Project, select STM32 CMake Project, then click Next.
  • Enter a project name and select the source folder, then click Next.
  • Choose the correct STM32 MCU and click Finish.

The project will then appear as an STM32 CMake project, and the normal Build option will be available.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

There should be notes, unless I skipped over it on the STM32CubeMX2 documentation, that when using STM32CubeMX2 and want to import the CMake project with STM32CubeIDE, that you need a minimum of V2.x.x. I'm still on 1.19.0 because of the V2.0.0 bugs. I don't see the STM32 CMake Project option you've mentioned.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

@Oussama_TROUDI 

Thanks. I was running into the same difficulty that @Karl Yamashita mentions below. With the stop in development in STM32CubeIDE, I didn't expect the file options to be changing.

Once updated to the latest version, the instructions work and I can build a CMake based STM32CubeMX2 project.

Older versions don't have a STM32C5 chip to be able to select, so updating seems to be the only choice.

Screenshot 2026-03-17 224428.png

If you feel a post has answered your question, please click "Accept as Solution".