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.
Your observations are completely valid but the behavior is expected according to [1]. Unfortunately, it's not much we can do...
Thanks,
Adrian
Unfortunately, it's not much we can do...
This is not true. You can file a bug upstream (https://bugs.eclipse.org/bugs/enter_bug.cgi), which is is the expected way to escalate such problems in (commercially used) open-source projects.
Have a look here: 481284 – Provide an option to fail build if pre-build fails. (eclipse.org)
Thanks,
Adrian
This is a problem for me as well. Pre- (and post-) build script errors should be observed. I imagine this would be a quick and easy fix for the eclipse team. Please would you raise this with them, because a case coming from NXP is more likely to yield results.
The bug report from the link above is dated 2015 and eclipse has migrated to GitHub since then, so it is worth submitting a new request.
Many thanks.