<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Model-Based Design Toolbox (MBDT)のトピックMCToolbox can't find my hand written code. Does it support S-Function?</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648038#M201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a Simulink model with normal Simulink blocks and C code (S-Function Builder) combined together. The&amp;nbsp;&lt;SPAN&gt;S-Function Builder itself is super simple (output = input * 2) for testing. It generated a &lt;/SPAN&gt;"testMult.c" a&lt;SPAN&gt;nd "&lt;/SPAN&gt;testMult&lt;SPAN&gt;_wrapper.c" automatically. I tested the S-Function with Simulink scope and it is working as expected. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, when I build the model to generate the ".mot" file to download to the hardware, I always get the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Building file sine_wave_library.o...&lt;BR /&gt;Building file siu_init.o...&lt;BR /&gt;Building file sys_init.o...&lt;BR /&gt;Building file sysclk_init.o...&lt;/P&gt;&lt;P&gt;Building file testMult_wrapper.o...&lt;/P&gt;&lt;P&gt;### CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command_Line_Tools/mwcceppc Usage Error:&lt;BR /&gt;# Specified file 'testMult_wrapper.c' not found&lt;BR /&gt;Errors caused tool to abort.&lt;BR /&gt;gmake: *** [testMult_wrapper.o] Error 1&lt;BR /&gt;### Creating HTML report file PWM_test_codegen_rpt.html&lt;BR /&gt;### Build procedure for model: 'PWM_test' aborted due to an error.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Looks like the compiler can't find the "&lt;SPAN&gt;testMult&lt;/SPAN&gt;&lt;SPAN&gt;_wrapper.c&lt;/SPAN&gt;". Not sure if it found the&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;testMult&lt;/SPAN&gt;&lt;SPAN&gt;.c&lt;/SPAN&gt;&lt;SPAN&gt;" or not. Those two C files are in the same folder where&amp;nbsp;the Simulink model is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to remove the S-Function Builder and then the ".mot" file can be&amp;nbsp;generated successfully.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone experience this error before? Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EDIT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also tried with Legacy Code Tool, still has a similar error.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;Building assembly file crt0.o... &lt;BR /&gt;Building assembly file sw_handlers.o...&lt;BR /&gt;Building assembly file excep_handler.o...&lt;BR /&gt;Building file untitled3.o...&lt;BR /&gt;Building file CTU_564xL_library.o...&lt;BR /&gt;Building file FlexPWM_564xL_library.o...&lt;BR /&gt;Building file adc0_EOC_isr.o...&lt;BR /&gt;Building file adc0_config.o...&lt;BR /&gt;Building file adc_564xl_library.o...&lt;BR /&gt;Building file adc_init.o...&lt;BR /&gt;Building file adc_trigger_init.o...&lt;BR /&gt;Building file doubleValue.o...&lt;BR /&gt;### CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command_Line_Tools/mwcceppc Usage Error:&lt;BR /&gt;# Specified file 'doubleValue.c' not found&lt;BR /&gt;Errors caused tool to abort.&lt;BR /&gt;gmake: *** [doubleValue.o] Error 1&lt;BR /&gt;### Creating HTML report file untitled3_codegen_rpt.html&lt;BR /&gt;### Build procedure for model: 'untitled3' aborted due to an error.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Where&amp;nbsp;doubleValue.c is my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 23:26:33 GMT</pubDate>
    <dc:creator>fangfq</dc:creator>
    <dc:date>2017-04-04T23:26:33Z</dc:date>
    <item>
      <title>MCToolbox can't find my hand written code. Does it support S-Function?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648038#M201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a Simulink model with normal Simulink blocks and C code (S-Function Builder) combined together. The&amp;nbsp;&lt;SPAN&gt;S-Function Builder itself is super simple (output = input * 2) for testing. It generated a &lt;/SPAN&gt;"testMult.c" a&lt;SPAN&gt;nd "&lt;/SPAN&gt;testMult&lt;SPAN&gt;_wrapper.c" automatically. I tested the S-Function with Simulink scope and it is working as expected. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, when I build the model to generate the ".mot" file to download to the hardware, I always get the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Building file sine_wave_library.o...&lt;BR /&gt;Building file siu_init.o...&lt;BR /&gt;Building file sys_init.o...&lt;BR /&gt;Building file sysclk_init.o...&lt;/P&gt;&lt;P&gt;Building file testMult_wrapper.o...&lt;/P&gt;&lt;P&gt;### CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command_Line_Tools/mwcceppc Usage Error:&lt;BR /&gt;# Specified file 'testMult_wrapper.c' not found&lt;BR /&gt;Errors caused tool to abort.&lt;BR /&gt;gmake: *** [testMult_wrapper.o] Error 1&lt;BR /&gt;### Creating HTML report file PWM_test_codegen_rpt.html&lt;BR /&gt;### Build procedure for model: 'PWM_test' aborted due to an error.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Looks like the compiler can't find the "&lt;SPAN&gt;testMult&lt;/SPAN&gt;&lt;SPAN&gt;_wrapper.c&lt;/SPAN&gt;". Not sure if it found the&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;testMult&lt;/SPAN&gt;&lt;SPAN&gt;.c&lt;/SPAN&gt;&lt;SPAN&gt;" or not. Those two C files are in the same folder where&amp;nbsp;the Simulink model is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to remove the S-Function Builder and then the ".mot" file can be&amp;nbsp;generated successfully.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone experience this error before? Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EDIT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also tried with Legacy Code Tool, still has a similar error.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;Building assembly file crt0.o... &lt;BR /&gt;Building assembly file sw_handlers.o...&lt;BR /&gt;Building assembly file excep_handler.o...&lt;BR /&gt;Building file untitled3.o...&lt;BR /&gt;Building file CTU_564xL_library.o...&lt;BR /&gt;Building file FlexPWM_564xL_library.o...&lt;BR /&gt;Building file adc0_EOC_isr.o...&lt;BR /&gt;Building file adc0_config.o...&lt;BR /&gt;Building file adc_564xl_library.o...&lt;BR /&gt;Building file adc_init.o...&lt;BR /&gt;Building file adc_trigger_init.o...&lt;BR /&gt;Building file doubleValue.o...&lt;BR /&gt;### CW for MPC55xx and MPC56xx 2.10/PowerPC_EABI_Tools/Command_Line_Tools/mwcceppc Usage Error:&lt;BR /&gt;# Specified file 'doubleValue.c' not found&lt;BR /&gt;Errors caused tool to abort.&lt;BR /&gt;gmake: *** [doubleValue.o] Error 1&lt;BR /&gt;### Creating HTML report file untitled3_codegen_rpt.html&lt;BR /&gt;### Build procedure for model: 'untitled3' aborted due to an error.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Where&amp;nbsp;doubleValue.c is my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 23:26:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648038#M201</guid>
      <dc:creator>fangfq</dc:creator>
      <dc:date>2017-04-04T23:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: S-function builder error "#   Specified file 'xxx_wrapper.c' not found"</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648039#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At first glance ... it seems that the S-function builder generates the code into the folder where the mdl/slx exists while the NXP toolbox generates the code into a separate folder (one level down).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm searching for potential workarrounds...&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 13:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648039#M202</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2017-04-05T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: S-function builder error "#   Specified file 'xxx_wrapper.c' not found"</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648040#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. You are right. The S-function builder generate the code in the same folder where&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;the mdl/slx exists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;And I also tried to use Legacy Code Tool to generate code in one level down. But the my .c/.h file get deleted when I start the Simulink build. So still not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;In general, I am trying to find a solution to integrate my C code into the Simulink model to generate ".mot" file. So not really care about to specifically use S-Function builder or Legacy Code Tool or other tools.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:17:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648040#M203</guid>
      <dc:creator>fangfq</dc:creator>
      <dc:date>2017-04-05T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: MCToolbox can't find my hand written code. Does it support S-Function?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648041#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I found the Motor_Control_Toolbox_Manual.pdf. And in 7.3,&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;7.3 User-Specific Files Needed for Build&lt;BR /&gt;There may be instances where variables are used from code that is not part of the model but are instead hand coded. In these instances, user specific files will need to be included in the build directory created by toolbox. The user can specify which files to include in the build directory by creating/modifying a file called rappid_564xl_user_copy_required_files.m and locate it somewhere in one of the Matlab paths. There is an example of this file located in the ‘mscripts’ directory that demonstrates how to include user specific files.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And during the build process, the MCToolBox will call this .m file automatically. The hand written .c files will be copied to the destination folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So problem solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 19:01:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MCToolbox-can-t-find-my-hand-written-code-Does-it-support-S/m-p/648041#M204</guid>
      <dc:creator>fangfq</dc:creator>
      <dc:date>2017-04-07T19:01:44Z</dc:date>
    </item>
  </channel>
</rss>

