Hello, engineers
I am currently learning the toolbox of MPC5744P. I have encountered some problems when using s function builder. My idea is to use s function to call the module after s function builder build, but I am not very familiar with the following problems during compilation. Understand, is it wrong with me? The forum mentioned using the model call s function builder build, but I have not succeeded. Attachment is my project file, I hope to get answers, thank you! !
Solved! Go to Solution.
Hello 260068845@qq.com,
Your problem cause is that the file test_builder_wrapper.c is not found in the Test_v1_mbd_rtw folder, so it is not compiled and when it tries to create the elf file, it finds no reference to the custom functions inserted.
In order to solve this, the easiest way is to go to the {Matlab Addons}\MPC\Toolboxes\NXP_MBDToolbox_MPC57xx\code\mbdtbx_mpc574x\mbdtbx_mpc574x\mscripts\utils, rename the mbd_mpc574x_user_copy_required_files.m to mbd_mpc_user_copy_required_files.m and inside the function add the following line of code.
mbd_mpc_copy(fullfile('{absolute file location}', 'test_builder_wrapper.c'), fullfile(dest_dir, 'test_builder_wrapper.c'), 'f');
This will copy the test_builder_wrapper.c any time you will generate the code and add the file in the makefile too.
Best Regards,
Marius
Hello 260068845@qq.com,
Your problem cause is that the file test_builder_wrapper.c is not found in the Test_v1_mbd_rtw folder, so it is not compiled and when it tries to create the elf file, it finds no reference to the custom functions inserted.
In order to solve this, the easiest way is to go to the {Matlab Addons}\MPC\Toolboxes\NXP_MBDToolbox_MPC57xx\code\mbdtbx_mpc574x\mbdtbx_mpc574x\mscripts\utils, rename the mbd_mpc574x_user_copy_required_files.m to mbd_mpc_user_copy_required_files.m and inside the function add the following line of code.
mbd_mpc_copy(fullfile('{absolute file location}', 'test_builder_wrapper.c'), fullfile(dest_dir, 'test_builder_wrapper.c'), 'f');
This will copy the test_builder_wrapper.c any time you will generate the code and add the file in the makefile too.
Best Regards,
Marius
That's right ! My problem have sloved,thank you.