2022-05-28 05:13 AM
In our workflow around the code generation and building firmware using STM32CubeIDE, we have certain manual steps after code generation.
Is there a place to hook in a script to be run after code generation completes? Similar to the "Build Steps" which can be configured in Eclipse CDT projects?
2022-05-28 07:08 AM
Just use the Pre-build step?
2022-05-28 09:44 AM
Yeah I'm aware of that option, but "just" using it isn't that simple. Code generation happens in the order of "once in a while", while building is done in the order of "always".
Our post-generation steps are rather lengthy, and also can't be repeated. E.g. applying patches shouldn't be repeated.
2022-05-28 09:55 AM
In the script, check if the post-generation is already done, then skip the lengthy things.
2022-05-28 10:03 AM
So how do you suppose to do that in a general case, if you don't know nothing about whether and when code generation has happened or not? By the timestamp of a known generated file? Is there a specific candidate file you would have in mind?
2022-05-29 03:27 AM
Yes, this can be a timestamp of a generated file (aka modification time), or some content in a file. I don't know which files your post-generation alters and how.
2022-06-08 04:44 AM
Set this up as an external tools configuration. Execute it before build when you need it. Only difficulty is to remember to launch the ext tools cfg before between MX re-generation and build operation...