MCUXpresso allows for custom commands to be executed before (and also after) builds via the project settings "C/C++ Build/Settings/Build Steps". However, the exit value of the command is not checked but intentionally(?) ignored, e.g., with simply "false" the beginning of the build log is the following:
12:42:33 **** Incremental Build of configuration Release for project proj_name ****
make -r -j16 all
false
make[1]: [makefile:64: pre-build] Error 1 (ignored)
It then continues normally. I consider this a bug. At least the final/overall exit value of the command(s) should be checked. If a user actually wants to ignore that he/she can easily do so by chaining the commands, e.g., by appending "|| true".
I assume this applies to all architectures but just in case: This is a project for an RT1020.