- Open the model, go to "Model Settings" in the "MODELING" tab.
- In "Model Settings" window, go to the "Code Generation" section and set the "System target file" as "ert.tlc".
- In the "build" function, use the "slbuild" function. If you are using the "rtwbuild" function, use the "slbuild" function as use of "rtwbuild" function is not recommended after MATLAB R2021a version.
Command line build stopped working - picking wrong encoder by the looks of it...
1 view (last 30 days)
Show older comments
matlab.exe -sd "build" -batch "build('$master_model')" | ForEach-Object { "[" + (Get-Date -Format "HH:mm:ss.fff") + "] $_" }
Been running this successfully for a while, but getting error now about "Matlab Coder", when we actually want/need to use Embedded Coder.,
Can anyone help me where the coder is specified and how to change it or am I barking up wrong tree.
Matlab 2021b - and problems seemed to start when we had new licence file from 1st April this year...
0 Comments
Answers (1)
Harimurali
on 8 May 2024
Hi Simon,
My understanding is that the command:
matlab.exe -sd "build" -batch "build('$master_model')" | ForEach-Object { "[" + (Get-Date -Format "HH:mm:ss.fff") + "] $_"
is a command-line instruction that executes MATLAB in batch mode, with the starting directory as "build", to run a script or function called "build" with the input argument "$master_model", where "master_model" is an environment variable that contains the name of your model.
The issue seems to be caused by the "build" function. You can build a Simulink model using the "slbuild" function after configuring the model to use Embedded Coder by following the given steps:
Please refer the following MATLAB Answer for more details about the "slbuild" and "rtwbuild" functions in MATLAB: https://www.mathworks.com/matlabcentral/answers/557818-what-is-the-difference-between-slbuild-and-rtwbuild
Hope this resolves your issue!
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!