cancel
Showing results for 
Search instead for 
Did you mean: 

Importing STM32CubeMX project into STM32CubeIDE - Missing Build Options

alw
Senior

Hi,

I created a project in STM32CubeMX 6.17.0 targeting the NUCLEO-G491RE and successfully generated the code. I then imported the project into STM32CubeIDE 2.1.1 and as far as I can tell it looks ok. The only apparent issue was that when I clicked on the .ioc file I thought that the STM32CubeMX project was supposed to open inside STM32CubeIDE but instead I get an error saying:

Screenshot 2026-04-29 at 15.01.07.png

So that's one issue. But when I come to build the project in STM32CubeIDE there is no Build All (CMD+B) option available, or indeed any other build options available.

IMG_0674.png

This is the folder structure:

Screenshot 2026-04-29 at 15.07.37.png

What is missing from this workflow to create a project that can be built in STM32CubeIDE please?

Kind regards,

Al

 

 

 

12 REPLIES 12

Hi @Ghofrane GSOURI 

I created several different projects in STM32CubeMX targeting a variety of Discovery and NUCLEO boards, what I found was that I needed to have 'Generate Under Root' checked with the STM32CubeIDE project toolchain selected for the Build All option to be available when a project is imported into STM32CubeIDE.

Having created a project in STM32CubeMX and imported into STM32CubeIDE, what is the recommended workflow for making changes in STM32CubeMX and then updating STM32CubeIDE please (without overwriting existing user code in main.c)?

Kind regards,

Al 

 

You selected EWARM as an IDE in STM32CubeMX, not STM32CubeIDE.

unsigned_char_array_0-1778059371726.png

I always generate under root.
This is the difference in project structure:

Not under root:

project.ioc
.mxproject
Core/
Drivers/
STM32CubeIDE/
.project
.cproject
.settings
STM32*_FLASH.ld

under root:

project.ioc
.mxproject
Core/
Drivers/
.project
.cproject
.settings
STM32*_FLASH.ld

If you generate not under root you need to open the STM32CubeIDE folder in STM32CubeIDE, not the root folder.

Additionally I recommend this setting:

unsigned_char_array_1-1778060202837.png

This is easier with version control. Only peripherals that are changed will have changed files.

 


@alw wrote:
what is the recommended workflow for making changes in STM32CubeMX and then updating STM32CubeIDE please (without overwriting existing user code in main.c)?

By writing all user code in the appropriate user code sections. Sometimes this can be tricky. I can help you with that. All the user code we write is never overwritten. Our policy is that regenerating in STM32CubeMX doesn't lead to changes.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
alw
Senior

Hi @unsigned_char_array 

Thanks very much, I've got all the above working now.

Kind regards,

Al