Hello sparkee,
Sorry, it seems I have missed your previous comment, thanks for the reminder. I must agree that it does not seem to be an issue from MathWorks' side, but more a setup issue.
Could you move your example closer to the root of your drive? I'm shooting in the blank here as I've not seen this error before, and I can't reproduce it.
The exception
Exception id MATLAB:FileIO:InvalidFid message Invalid file identifier
clearly states that there is an invalid file ID; this might happen due to multiple reasons - not found in path, not a correct name (looking for a nonexistent file), too long path (windows limitation) and maybe other reasons that don't come to mind now. I'd first try to clear out the posibility of a path that is too long. This should be easily verifiable - just move your model closer to the root of your drive and try building it from there. As for the path, you can try running these commands to get a clean path for our toolbox:
restoredefaultpath;
mbd_s32k_path;
Note: if you run these 2 commands, you'll loose paths to other add-on you might have. You might consider first saving the current path by using this command:
savepath mysavedpath
Please let me know if either works.
Kind regards,
Razvan.