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
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
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
You can identify the name of the model because typically the dest_dir ends with the /<model_name>_ert_rtw
Hope this helps,
Marius
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