Showing results for 
Search instead for 
Did you mean: 

[bug] Cube MX : Freeze when launching after code generation script

Associate II


When I add a .bat script to:

Project-Manager -> Code Generator -> User Actions -> Before/After code generation

I figure out that CubeMX freezes when the Outputs window is disabled.
It is especially problematic when launching a CubeMx script.

Do you know where it comes from? And how to avoid this undesirable behavior?

Thank you for your answer

PS: Is it possible to run scripts other than .bat files ?

ST Employee

Hello @dletinaud 

And welcome to the community!

Could you please provide more information about the version of CubeMX ,the MCU and the .bat file you use.

Thank you


Hi @Souhaib MAZHOUD,
I tested it with the version 6.9.2.
I tested it with multiple .bat scripts, the last ones were just an echo or writing a string to a file. They worked well when launched manually.
Script name had no special characters, it was named "patch.bat".

Associate II

Hello @Souhaib MAZHOUD,

The project was for a STM32F745VGT6.
Do you have any information for this bug ?
Did I make a mistake ? Do you succeed to repeat the bug ?
Can it be reported to the dev team ?

Thanks for your response


Pavel A.
Evangelist III

> CubeMX freezes when the Outputs window is disabled.

@dletinaud  If the Outputs window is shown, the problem won't occur?


Yes indeed

Hello @dletinaud,

Actually, the issue has been escalated to the dev team and is currently under investigation.

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

Thank you,


Hello @Souhaib MAZHOUD,
Thank you for your reply and your support 👍