MATLAB: How to stop a build process based on some flags in the custom TLC code in Rea-Time Workshop

buildcoderembeddedEmbedded Coderprocessstoptlc

I would like to be able to conditionally stop a RTW build process using flags in a custom TLC.

Best Answer

You can use TLC code as shown in the example below to conditionally stop the build process with appropriate message:
%if ISEQUAL(SFcnParamSettings.FCN_INNAME,"#void")
%warning "My value is bad:=%<SFcnParamSettings.FCN_INNAME>"
%stop
%else
%%do nothing
%endif