2023-09-06 03:04 PM
STM32CubeMX release 6.9.0 contained support for processing before and after code generation. The documentation does not appear to be updated to describe how this works.
What kind of file and scripting is expected for this feature?
2023-10-04 02:18 PM
Any luck with this? I also couldn't find any documentation from STM about this feature, despite them advertising it on the home page of STM32CubeMx.
I tried making both a powershell script and a shell script that would just echo a string into a file. When I set the After Code Generation path to either of these scripts, it caused CubeMX to freeze up and I had to kill it from the task manager.
2024-01-09 08:05 AM
I also really need this functionality but I find the current implementation pretty useless:
2024-01-09 08:08 AM
@oskar what language is your script in?
2024-01-09 09:34 AM
I wrote it in bash. It's on a linux laptop.
2024-01-27 11:25 AM - edited 2024-01-28 07:19 AM
If the script is within the project, begin the script with the lines below, these will set the current directory to where the script is:
Windows
set SCRIPT_DIR=%~dp0%
cd %SCRIPT_DIR%
Linux
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd ${SCRIPT_DIR}
The *BAD* news is that the script path must be absolute on Windows (eg C:\Users...) even though is is within the project directory.
Using the Windows utility procmon.exe, I can see that when using relative path, the script is noticed but it is not executed