Skip to main content
Raymond Buck
Senior
June 23, 2026
Question

STM32CUBEMX2 and STM32CubeIDE 2.1.1 how to generate release file

  • June 23, 2026
  • 5 replies
  • 76 views

I have ordered the Nucleo-C542C board. I am waiting on the board to arrive so I thought I would setup a blinky project to test on the board. i used MX2 to setup the GPIO, clock, etc. I then imported the project int CubeIDE using the CMAKE option.

Apparently there is no way to build a release file. This means I will not be able to program the board. The build hammer only shows the debug build option.

Also, I do not see the .ioc file in the project tree. Apparently I don’t understand how MX2 and CubeIDE link together. If I am able to ever find the .ioc file, will it be updated if I make changes in MX2? The old version of CubeMX linked the.ioc files together. If changes were made by CubeMX, those changes were reflected in CubeIDE.

As a side note, there is one aggravating minor issue with CUBEMX2. Why are all the screens so washed out and difficult to see?. Everything that should be solid black is a barely visible light colored grey. This is particularly annoying in the GPIO chip pinout view. The oscillator clock setup is even worse.

At this point my main issue is not being able to generate a Release file. It would also be nice to be able to view the .ioc file.

5 replies

Andrew Neil
Super User
June 23, 2026

Apparently there is no way to build a release file. This means I will not be able to program the board. The build hammer only shows the debug build option

Not sure what you mean by that ?

You can certainly program the board with the Debug build!

 

Does your hammer button not give you the option to choose ‘Release’ ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Raymond Buck
Senior
June 23, 2026

Andrew, that is correct. The only option under the hammer is Debug.

I have spent the last 4 hours using ChatGPG and Gemini trying to find a solution. According to both AI engines, there is no option to build a release file when using CubeMX2. Both of them say files have to be manually modified to have the Release option. So far, none of their suggestions have worked.

I don’t like the idea of using a debug file to program the board. If I look at the C/C++ build options for a debug file, there is no Post Build option so you can’t generate a hex file. If fact, there are not any options available to control the build steps. It appears if the project is built with MX2, no options are no longer available.

Andrew Neil
Super User
June 24, 2026

I don’t like the idea of using a debug file to program the board

I still don’t understand why this is an issue?

 

If I look at the C/C++ build options for a debug file, there is no Post Build option so you can’t generate a hex file. If fact, there are not any options available to control the build steps

Is this a result of using CMAKE ?

Do you get those options if you use a CubeIDE managed project instead ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Sara BEN HADJ YAHYA
ST Technical Moderator
June 24, 2026

Hi ​@Raymond Buck

Thanks for your feedback,

At the moment, the release build configuration cannot be added via the STM32CubeMX2 GUI, but it is possible using the CLI.

For example, you can use a command similar to:

cube mx ide-project generate -p ./test.ioc2 --build-target .release_IAR+NUCLEO-C562RE --destination test_ewarm --format EWARM --source include-packs-from-local --force

An internal ticket has already been submitted to add the Release build configuration in the GUI and the team is currently working on it. I will keep you posted.

This thread STM32CubeMX2 Release Build Configuration also raises the same discussion regarding the Release/ Debug options in the UI.

Internal ticket number: CDM0061318 (This is an internal tracking number and is not accessible or usable by customers).

 

Regards,

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Raymond Buck
Senior
June 24, 2026

Sara, thank you for confirming there is an issue. Hopefully the update will be available soon.

I normally build in the Release mode as I rarely need the debug mode.

You are showing IAR+ but I assume the same thing would work with STM32CubeIDE.

Can you explain why I can’t see the ioc file in the project tree? With the earlier versions of CubeMX generated projects, the ioc file was always at the bottom of the file list in the left panel.

Sara BEN HADJ YAHYA
ST Technical Moderator
June 24, 2026

Yes, with STM32CubeIDE you need to specify GCC rather than IAR.

Regarding the project tree and the .ioc2 file placement, by default the IDE project and the .ioc2 file are placed under the same workspace directory. For example:

 

Workspace
├── MyProject.ioc2
└── MyProject_cmake

However, you can use the Project Settings in STM32CubeMX2 to customize the project tree. For example, if you want to change the destination of the IDE project, simply click the folder icon, select the workspace, and adjust the path from the default location.

Please refer to the attached example:

I created a MyProject.ioc2 project under C:\projects\C562\Test. By default, the IDE project would be placed in C:\projects\C562\Test\MyProject_cmake, but I changed it to C:\projects\C562\Test

 

Regards,

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Raymond Buck
Senior
June 24, 2026

Sara,

Thank you, that helps. I will move mine to my root project folder so it is easily accessible.

Regards,

Ray