Compatibility issue list for matlab R2021b

cancel
Showing results for 
Search instead for 
Did you mean: 

Compatibility issue list for matlab R2021b

449 Views
craanede
Contributor II

This item is linked to:Updating compatibility MBDT to latest matlab releases 

The toolbox that I am testing is: S32k1xx on matlab/simulink R2021b on 64-bit windows

Default compiler for my system is set to: 

MEX configured to use minGW-64

 

First issue that I found is using simulink in external mode, by enabling it under:

model configuration / code generation / interface.

When setting the external mode box to ticked --> Simulink provides the following error:

Unable to start the target application, D:\Workspace\Cleaning_system\src\ExtSensor_controller, 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.

I have checked the template makefile of the S32k1xx toolbox and indeed the TOOLCHAIN_NAME macro does not exist.

 

0 Kudos
1 Reply

444 Views
craanede
Contributor II

I have found a work around for the issue: The compiler is set for mingGW-64

added the following line anywhere to the mbd_s32k.tmf template makefile before opening the simulink model

(located: AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k)

TOOLCHAIN_NAME= "MinGW64 | gmake (64-bit Windows)"

This allows simulink to step beyond some checks when opening the model and then opens the hardware tab,

However, you cannot build the model with this macro in the template file as the following errors will occur:

craanede_0-1646744903531.png

It is unclear for me why this issues occur, but looking at the implementation of S32k3xx a solution is already found.

However, if you now simply remove the macro from the template makefile again before building but after selecting external mode according steps in Unable to Deploy and Start External Mode Example for S32K144 in MBDT 

Then everything worked fine for external mode in 2021b.

Perhaps someone can actually find a better workaround then this, but at least this way external mode is working.

Note that if you change simulink to use external mode then the serial transport layer changes to:

craanede_1-1646745090205.png

If you then turn external mode off and want to use Freemaster, this transport layer has to be reset to:

craanede_2-1646745154093.png

The only way I found to do this, is to switch the system target file under code  generation settings to mbd_s32k14.tlc and then back to mbd_s32k.tlc. However, this also then allows Freemaster to work again.

 

Hopefully, these solutions help someone dealing with the same issues.