Hello @nikolayyakovenk,
The license for the S31K1 toolbox, won't work on S32K3, you have to generate a license for each of our toolboxes. The error you get, the -5, means that the license is in the right place, but it is invalid, so you have to generate another one. We have previously discussed this topic in the thread below.
https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K34-build-error/m-p/1371545#M6704
Please generate a license for the S32K3 toolbox as described above.
For the K3, the location can be found here winopen(fullfile(mbd_find_s32k3_root, 'lic')) while
for the K1, the location can be found here winopen(fullfile(mbd_find_s32k3_root, 'lic')).
Hope this helps,
Marius