Disable MBDT Code Regeneration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disable MBDT Code Regeneration

Jump to solution
828 Views
engineer_attila
Contributor III
Hi, our products highly depends on MBDT Tool and NXP ICs,

We want to use some ICs within MBDT but their strict timing requirement doesn't satisfied the use MBDT blocks for programming.
Therefore we try to write C driver and implemente it to MATLAB

Is there a any option to disable code generation just Compile previously created matlab code project? Is that possible?
Because I want to inject code piece , any Matlab generated source code and just compile it without code re generation

Regards,
Attila
0 Kudos
1 Solution
802 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @engineer_attila,

Thank you for using MBDT for developing your applications!

Actually, there are two different ways in which you can just build the generated code after you did some changes to it.

1. The easiest one, is to achieve this only in MATLAB. Once you have generated the code, you can open the <model_name>_mbd_rtw folder, and bring the proper changes to the generated code. Just as a reminder, the main application C code is generated in the *_step and *_initialize  C functions in the <model_name>.c file. Once you are happy with all the changes, then set the "Current Folder" in MATLAB to be the <model_name>_mbd_rtw folder, and locate the <model_name>.bat file. In Command Window, just type the "!<model_name>.bat" command, and the build process will start again. If there are no errors, then you have the new elf. file which contains your changes. You now have to flash the new .elf file on your hardware.

mariuslucianand_0-1651926856199.png

2. The second option is to import the generated code into S32DS for Power Architecture (based on your previous posts, I assume that you are using the MBDT for MPC57xx toolbox therefore you need to use the S32DS for Power Architecture). In the generated folder <model_name>_mbd_rtw, you will find a ProjectInfo.xml filer, which has to be specified in the S32DS for PA. Note that before importing the generated code into S32DS for PA, you will have to manually change the files extension of the *.S file into *.s files and update this into the ProjectInfo.xml file as well: only the .S into .s, since the S32DS for PA will not be able to deal with the .S file extensions.

mariuslucianand_1-1651927357197.png

Once you've done that, please go intro S32DS for PA, select File -> Import -and select ProjectInfo.xml Importer

mariuslucianand_2-1651927453511.png

In the newly opened window, Browse the ProjectInfo.xml (updated with the .s file extensions) and press Finish.

mariuslucianand_3-1651927513848.png

Now you can edit, build and deploy the generated code project, just as you were dealing with a native S32DS for PA C project.

Let me know if you have further questions!

Hope this helps,

Marius 

 

 

View solution in original post

1 Reply
803 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @engineer_attila,

Thank you for using MBDT for developing your applications!

Actually, there are two different ways in which you can just build the generated code after you did some changes to it.

1. The easiest one, is to achieve this only in MATLAB. Once you have generated the code, you can open the <model_name>_mbd_rtw folder, and bring the proper changes to the generated code. Just as a reminder, the main application C code is generated in the *_step and *_initialize  C functions in the <model_name>.c file. Once you are happy with all the changes, then set the "Current Folder" in MATLAB to be the <model_name>_mbd_rtw folder, and locate the <model_name>.bat file. In Command Window, just type the "!<model_name>.bat" command, and the build process will start again. If there are no errors, then you have the new elf. file which contains your changes. You now have to flash the new .elf file on your hardware.

mariuslucianand_0-1651926856199.png

2. The second option is to import the generated code into S32DS for Power Architecture (based on your previous posts, I assume that you are using the MBDT for MPC57xx toolbox therefore you need to use the S32DS for Power Architecture). In the generated folder <model_name>_mbd_rtw, you will find a ProjectInfo.xml filer, which has to be specified in the S32DS for PA. Note that before importing the generated code into S32DS for PA, you will have to manually change the files extension of the *.S file into *.s files and update this into the ProjectInfo.xml file as well: only the .S into .s, since the S32DS for PA will not be able to deal with the .S file extensions.

mariuslucianand_1-1651927357197.png

Once you've done that, please go intro S32DS for PA, select File -> Import -and select ProjectInfo.xml Importer

mariuslucianand_2-1651927453511.png

In the newly opened window, Browse the ProjectInfo.xml (updated with the .s file extensions) and press Finish.

mariuslucianand_3-1651927513848.png

Now you can edit, build and deploy the generated code project, just as you were dealing with a native S32DS for PA C project.

Let me know if you have further questions!

Hope this helps,

Marius