Hi Victor,
Apologies for the (very) late reply. Here are the details you asked for:
- Matlab R2020a
- Version 1.2 of the S32K3xx toolbox
- These are the key settings for model protection:

- I'm afraid I can't share the model. There are, no S32K3xx blocks anywhere. The protected model is meant to be shipped to a customer and the unprotected "wrapper" has no logic besides it and the inports and outports.
In the meanwhile, I've managed to figure out the cause of those error messages: the path of the arm-none-eabi toolchain needed to be added to the PATH environment variable. Now I'm able to successfully generate code from the unprotected wrapper and it correctly copies the library and header files from the .slxp file.
This works as long as I'm using the same computer for protecting the model and for code-generating from the wrapper. If I try to code-generate from a different computer (which is the main way this is going to be used), I get these types of errors:

I suspect this is caused by the folder path to those files having a space in it in "Matlab Add-Ons" (note how it quotes a path starting with Add-Ons, which is only part of that folder's name). But that folder was automatically created when I installed the toolbox, so I don't know what I can about it.
Is this something you've encountered before?
Many thanks once again for your help!
Cosmin