Command line build stopped working - picking wrong encoder by the looks of it...

3 vues (au cours des 30 derniers jours)
Simon
Simon le 2 Avr 2024
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...

Réponses (1)

Harimurali
Harimurali le 8 Mai 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:
  • 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.
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!

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by