2026-04-29 12:14 AM
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:
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.
This is the folder structure:
What is missing from this workflow to create a project that can be built in STM32CubeIDE please?
Kind regards,
Al
Solved! Go to Solution.
2026-05-06 12:36 AM
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
2026-05-06 2:20 AM - edited 2026-05-06 2:43 AM
You selected EWARM as an IDE in STM32CubeMX, not STM32CubeIDE.
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:
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.
2026-05-17 7:24 PM