Compilazione del codice generato
Per produrre codice eseguibile dopo la generazione di codice sorgente, specificare un processo di build che compili il codice sorgente generato e colleghi il codice oggetto. Per compilare il codice generato dai modelli di Simulink®, è possibile utilizzare un approccio basato su CMake, una toolchain o un makefile modello. MATLAB® include il file eseguibile di CMake. Ciascun approccio richiede l'installazione degli strumenti di build supportati. Per informazioni sulla personalizzazione del processo di build per l'ambiente di sviluppo, vedere Code Compilation Customization.
Per testare l'equivalenza numerica tra il modello e il codice generato, è possibile utilizzare il SIL/PIL Manager.
Funzioni
Argomenti
Panoramica
- Approaches for Building Code Generated from Simulink Models
Choose CMake toolchain, makefile-based toolchain, or template makefile approach for building generated code.
Workflow
- Configure CMake Build Process
Specify CMake toolchain definition for building generated code. - Configure Toolchain (ToolchainInfo) or Template Makefile Build Process
Build executable programs from generated code. - Add Build Process Dependencies
Add dependency information for external code to the build process. - Build Integrated Code Within the Simulink Environment
Add support files and control model code generation and builds within the Simulink Environment. - Build Process Workflow for Real-Time Systems
Generate C code from a model and build an executable program. - Rebuild a Model
Rebuild a model after customizing generated source code or makefiles. - Reduce Build Time for Referenced Models by Using Parallel Builds
Apply parallel builds to reduce build time for large model reference hierarchies. - Compile Code in Another Development Environment
Relocate generated code and compile in another environment. - Build Generated Code Remotely
Create a connection and build generated code on a remote computer. - Build Models from Windows Command Prompt
Build models by running MATLAB with a batch file. - Deploy Component Algorithm as Component Model Library by Using CMake
Deploy component algorithm as a component model library by using CMake.
Test dell'equivalenza numerica tra il modello e il codice generato
- SIL/PIL Manager Verification Workflow
A simplified workflow for verifying generated code.
Risoluzione dei problemi
Identify and fix issues that prevent compiler operation in the build process.