Skip to main content
JKut
Associate
May 28, 2022
Question

Post-generation hook in STM32CubeIDE

  • May 28, 2022
  • 2 replies
  • 1696 views

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?

This topic has been closed for replies.

2 replies

Pavel A.
Super User
May 28, 2022

Just use the Pre-build step?

JKut
JKutAuthor
Associate
May 28, 2022

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.

Pavel A.
Super User
May 28, 2022

In the script, check if the post-generation is already done, then skip the lengthy things.

JKut
JKutAuthor
Associate
May 28, 2022

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?