Why do I get the error "Unable to run 'rtwmakecfg' file" when using Simulink Coder with Simulink Real-Time/IP Blocks?

31 views (last 30 days)
I am using Simulink Coder for code generation for my model, which uses Simulink Real-Time/IP blocks such as "UDP Send".
When I try to generate code, I get the following error:
Error: Unable to run 'rtwmakecfg' file in directory: 'C:\Program Files\MATLAB\R2023a\toolbox\slrealtime\simulink\blocks' due to error: 'Output argument "makeInfo" (and possibly others) not assigned a value in the execution with "rtwmakecfg" function.'
Caused by: Output argument "makeInfo" (and possibly others) not assigned a value in the execution with "rtwmakecfg" function.
Why does this happen? How can I resolve this to generate code from my model?
 

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Nov 2023
This can be caused by using the wrong system target file selected within model configuration parameters. To fix this, please follow the steps below: 
  1. In Simulink, navigate to "Apps" and select "Simulink Coder" 
  2. Within the "Prepare" panel, click on the "Settings" icon to open up model configuration parameters
  3. Under "Code generation", change the system target file to "slrealtime.tlc"
This system target file modification will make the model compatible with Simulink Real-Time/IP blocks such as "UDP Send". 

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!