cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 CubeMX V6.12.1 remove PostBuild command line in IAR

Makarand
Associate II

Hello, 

I recently upgraded my CubeMX to V6.12.1 from V6.6.1. All of a sudden, I have realised that when I generate code from the updated CubeMX, it removes my Post build command line from my IAR EWARM project. 

Is there a new setting or such that I am missing that does not do that? Or is it a CubeMX problem? 

I thank you in advance!

Makarand

2 REPLIES 2
Ghofrane GSOURI
ST Employee

Hello @Makarand 

First let me thank you for posting.

1- In STM32CubeMX, ensure that the option "Backup previously generated files when re-generating" is checked. This setting can help preserve your previous configurations, including build steps, although it may not guarantee complete retention of custom commands.

2- Scripted Backup: Create a script that automatically saves your current post-build commands to a separate file before each code generation.

3- Check the project settings in IAR and ensure that the post-build commands are correctly configured under Project > Options >  Build Actions > Post-build Command. Sometimes, reconfiguring these settings can help maintain them during regeneration.

THX

Ghofrane

Hello, 

Thank you for the solutions, however, it did not work. I was using 6.6.1 earlier where this problem was not there. 

For solution 1 - Along with backing up the files, I also unchecked the "Delete previously generated files if not re generated" option, but that did not help either. 

As for no. 3, I did check the configuration, and it looks okay when I add the post build command into it manually. However, on generating code from CubeMX, it is removed.

I can see that in the code generator, there is an option of user actions before and after code generation. 

Makarand_0-1735043037075.png

Is there any literature available on how to use this feature? Could something be done in this feature that prevents my project settings from changing?

I thank you in advance!

 

Makarand