MBDT S32k1x version 4.3.0 target selection file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MBDT S32k1x version 4.3.0 target selection file

跳至解决方案
1,648 次查看
craanede
Contributor III

Hi, 

I have recently updated my MBDT S32k1x toolbox to v4.3.0. to include newer matlab version support.

I see that this is working fine for existing models and the example models included.

However, when a new model is created and set to use the system target file (in code generation options in simulink) mbd_s32k.tlc. Then instead of using the template makefile, the build process changes to a toolchain. In my case this is the MinGW64 | gmake toolchain.

When building a model using the toolchain method, I get a long list of errors of certain blocks not being found. When I copy that same blocks into an existing MBDT model from the library examples using the template file, then everything works fine.

If I select the MBD s32k14.tlc target then the makefile is still selected, but other errors occur. If I then switch back to the mbd_s32k.tlc the errors occur again.

If I reselect the mbd_s32k.tlc target file for an example model (e.g. ftm_independent_pwm_s32k14x) then I get the error: 

Environment Variable GHS_S32K_TOOL not set. Set the location of GHS_S32K_TOOL target compiler and restart MATLAB, please. Example: GHS_S32K_TOOL=c:\ghs\comp_201516

Is it possible that something went when I upgraded the toolbox (I tried a fresh install of the toolboxes). Or is it possible that I have to now manually force it to use the template makefile?

I use matlab 2021b on windows 10

Model-Based Design Toolbox for S32K1xx Series Version 4.3.0 (R2016a-R2022a)

MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.

Best regards,

Dennie Craane

0 项奖励
回复
1 解答
1,621 次查看
stefancinipeanu
NXP Employee
NXP Employee

Hi, @craanede 

Normally, you don`t have to choose manually the system target file for a new model. It should be set automatically when  you drag and drop the MBD_S32K1xx_Config_Information block.

stefancinipeanu_0-1668161298717.png

After this block is put in a model, an initialization script is called to do all the settings regarding the building information, including the system target file and the template makefile.

stefancinipeanu_1-1668161407245.png

 

Regards,

Stefan.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,613 次查看
craanede
Contributor III

Hi Stefan,

 

Thank you for the quick reply.

My intention is not to set the tlc file manually, but this is resetting itself automatically after a few build procedures.

I am not able to fully reproduce the occuring when the settings reset to using a toolchain instead of a makefile.

I am also getting this error when opening the model when it has a makefile selected in the codegen options:

Unable to start the target application, "myModel", because its file extension cannot be determined. Build your target application by using a toolchain or a template makefile that specifies a toolchain via the TOOLCHAIN_NAME macro. The file extension will then be determined automatically from the linker's executable file extension property.

However, I can build my model despite of this error occurring when opening the model.

The settings can be reset with your steps but I need to do some extra things as well:

By removing the config block, saving and re-opening the model and then compiling it to trigger the init function, I can successfully reset the codegen options. However, if I do not re-open the model the init fucntion mbd_s32k_consistency_checks(bdroot(gcs)); does not solve the issue.

 

I am probably doing something wrong here.

Best regards,

Dennie Craane

0 项奖励
回复
1,622 次查看
stefancinipeanu
NXP Employee
NXP Employee

Hi, @craanede 

Normally, you don`t have to choose manually the system target file for a new model. It should be set automatically when  you drag and drop the MBD_S32K1xx_Config_Information block.

stefancinipeanu_0-1668161298717.png

After this block is put in a model, an initialization script is called to do all the settings regarding the building information, including the system target file and the template makefile.

stefancinipeanu_1-1668161407245.png

 

Regards,

Stefan.

0 项奖励
回复
1,565 次查看
craanede
Contributor III
Dear Stefan,

I understand now how the system sets the target file. This works fine for new models, but I noticed that by simply reopening the model so that the pre-load function runs is not sufficient to reset the code generation settings once the issue is there.

By clicking the propagate changes button in the config block and reopening the model and then recompiling everything it adjusts the changes.

Hope this helps anyone else struggling with this.

Thanks for the support.

Regards,
Dennie