How do I generate a C code from a Simulink model directly from command line?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Andre Vidigal
am 3 Nov. 2020
Bearbeitet: Sourabh Kondapaka
am 6 Nov. 2020
I'm currently developing a CI project to build on Jenkins, from which one of the steps is to generate C code form a Simulink model. To implement it, a MATLAB command is required. However, I wasn't able to find any documentation indicating how to do that.
Does anyone know how to generate a C code from a Simulink model directly from command line?
0 Kommentare
Akzeptierte Antwort
Sourabh Kondapaka
am 6 Nov. 2020
Bearbeitet: Sourabh Kondapaka
am 6 Nov. 2020
The MATLAB command to generate C code from a Simulink Model is "rtwbuild()".
To execute Matlab code within Jenkins you will need to install "MATLAB" Jenkins plugin linked here
For a refresher on using Jenkins CI with MATLAB a good place to start would be this Technical Article
For a model named "CruiseControlMode.slx", your Jenkins build step should look something like this:
( Assuming CruiseControlMode.slx model is in the MATLAB path )
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!