how to %% Add user defined cache here in mbd_s32k.tlc

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

how to %% Add user defined cache here in mbd_s32k.tlc

1,829 Views
bolei
Contributor II

hello folks, 

i am using s32k144 and using mbd toolbox from NXP to generate code in Simulink. while there are some low-level driver and also later the CCP driver written in C need to be use/integrate into the model. 

I followed the Legacy-code-tool instruction from Mathworks and generated related s function and also tlc. 

now, if I manually copy my customer.c and customer.h into the target folder xxx_ mbd_rtw during the code generating process, there is no error, while it could not be done automatically. 

please kindly give me a direction for how to manually copy/add customer files into during the code generation process?

thanks in advance. 

bo

0 Kudos
Reply
3 Replies

1,798 Views
bolei
Contributor II

hello @mariuslucianand , 

thanks for replying.

I could not find the 'mbd_s32_user_copy_required_files' in my s32k toolbox installation folder.... while, I found a similar script in C:\MCToolbox\rappid564xl\rappid564xl\mscripts which is for the chip MPC5643L.... and it requires rp_copy function which is located in the same folder. 

it works when I modify it to fit my setup. so I think my problem solved...

having said that, is there any documents about the rp_copy, or mbd_s32_copy(in mbd_s32_user_required_files) which can help me understand what is the different between those xx_copys and the matlab copyfile function?

 

thank you. 

bo

 

0 Kudos
Reply

1,814 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @bolei,

MBDT for S32K1 provides a callback for such cases when you want to copy some additional files next to the generated code and to cross-compile them together.

You can access the user copy required files script by typing the below command and editing the m-file using the template provided into the script.

edit mbd_s32k_user_copy_required_files

mariuslucianand_0-1667807443577.png

You can identify the name of the model because typically the dest_dir ends with the /<model_name>_ert_rtw

Hope this helps,

Marius

 

1,797 Views
bolei
Contributor II

hello @mariuslucianand

one more question, I tried to dig-into he code generation process recently while after i found the mbd_s32k.tlc I could not fond other .tlc, .m, or .tmf been called from anywhere.... while I am kind of sure I found the right tmf file since my changes on that will shows in the generated .c and .h....

could you please let me know what is the sequence of those files been called or what .tlc provide by nxp have been used for the code generation of s32k?

 

thank you. 

bo 

0 Kudos
Reply