MATLAB: SimParseCustomCode Not Working as Intended Upgrading to R2018b

changescodecoder.updatebuildinfoconfigurationcustomEmbedded Coderparameterr2018bsimparsecustomcodesimulink

In upgrading to MATLAB R2018b from R2018a, Simulink throws an error regarding a 'missing' header file. No folder structures have changed, and the file should be available. In R2018a, the SimParseCustomCode configuration parameter was turned on, and is also on in R2018b under the new name of "Import custom code". When turning this setting off, the model was able to successfully build and compile the code in R2018b, further showing that the header file is available to the compiler. The header file is included through a MATLAB function block with the "coder.updateBuildInfo('addIncludePaths',…)" function call. No additional changelog information is available for this configuration parameter in the release notes. What has changed?

Best Answer

Linked below is the most up-to-date documentation page for the "Import custom code" configuration parameter. In the description for the usage of the "Off" option, the first bullet point in the documentation now specifies the following:
Split custom code dependencies between Simulation Target and other means of specifying custom code dependencies (coder.cinclude, coder.updateBuildInfo, and coder.ExternalDependency) in Stateflow charts that use MATLABĀ® as the action language, MATLAB Function block, or the MATLAB System block.
Since the "coder.updateBuildInfo" function was invoked, the R2018b workflow is to set the configuration parameter to "Off". Bulleted below is the URL to the current documentation page and the second bullet will show the R2018a version of the correspondence documentation page for referencing the changes.