Post-generation hook in STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-28 5: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?
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-28 7:08 AM
Just use the Pre-build step?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-28 9: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-28 9:55 AM
In the script, check if the post-generation is already done, then skip the lengthy things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-29 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 4: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...
