Output della generazione di codice
Per generare codice da eseguire su una piattaforma di destinazione specifica, configurare l'output della generazione di codice per il modello. Si consideri la configurazione del codice per queste piattaforme di destinazione:
Il computer di sviluppo MATLAB® su cui viene eseguito il software MathWorks® durante lo sviluppo delle applicazioni.
L'hardware di prova su cui si esegue il test del codice durante la prototipazione rapida.
L'hardware di produzione su cui si distribuisce il codice generato.
L'output della generazione di codice è controllato dal file di destinazione del sistema, dal linguaggio e dal tipo di distribuzione specificati per il modello. Queste impostazioni controllano quali opzioni di generazione di codice sono disponibili nella finestra di dialogo Configuration Parameters (Parametri di configurazione) e nell’editor Code Mappings. Utilizzare queste opzioni per configurare il codice generato in modo che venga eseguito sull'hardware target.
App
| Embedded Coder | Generate readable, compact, and fast C and C++ code for embedded processors used in mass production |
Funzioni
switchTarget | Select target for model configuration set |
Argomenti
- Compare System Target File Support Across Products
Evaluate system target file support by product, code style, and generated code features.
- Configure a System Target File
Select and configure a solver and a system target file.
- Configure STF-Related Code Generation Parameters
Configure model parameters that relate to GRT, ERT, or ERT-based system target files for code generation.
- Select Code Generation Output for Target Platform Deployment
Select output type the code generator uses to produce code for the loaded model.
- Configure C Code Deployment Types for Model Hierarchy
Generate different code interfaces for models throughout a model hierarchy.
- Configure Run-Time Environment Options
Set model simulation and code generation options for development and deployment run-time environments: MATLAB development computer, production hardware, and test hardware.
- Select C or C++ Programming Language
Choose C or C++ as the programming language for code generation.
- Configure Language Standard for Target System
Configure standard library extensions that the code generator uses for math operations.
- Replace Code Generated from Simulink Models
This example shows how to replace generated code by using a code replacement library.