2024-01-30 2:09 PM
Hi there! This might be a silly question, but I'm truly having trouble to find any documentation concerning the new User Actions feature, what are its functionalities, and how does it work. Unfortunally, it is not even mentioned in the UM1718 User manual
Also, the only mention I even found of this feature is in this forum question
Could anyone please refer me to some documentation on the topic?
Thanks in advance!
2024-09-28 1:23 PM
I'd also love an answer for this. This could be a very useful features but there doesn't seem to be any documentaiton about it; only a few users here on the forums attempting to use it (using .bat files?) and invariably running into problems along the way, asking for help.
Could ST produce a tutorial for this feature, or point to documentation about how to use it?
2025-07-31 9:09 AM
I don't have a good answer or a source for a tutorial, but I can at least share a couple discoveries I made while fiddling with this recently. For reference I am doing this on MacOS Sequoia 15.5.
It appears that whatever file name is put into the user actions box is run from its directory (not the directory of the `.ioc` project file) using some kind of restricted native shell. Path and environment variables appear to be missing, but it's unclear to me exactly what the nature of the shell is.
I first attempted to use a python script to make the post-generation steps platform agnostic, but it just failed silently, giving me no output in the Output pane at the bottom of CubeMX. The script was executable and should have been able to run as it had the if __name__ == "__main__" hook, so it might be that there was no python on the path for the terminal executing the script.
I switched over to a .sh script and got success. The stdout (unsure about stderr) terminal output appeared in the Output pane of CubeMX, as did what appeared to be the exit value of the script, (e.g. ErrorLevel:0)
Hopefully this helps for anyone still looking to use this feature, but an official tutorial would certainly be better than my speculation :)