Main Content

Build Process

Set up compiler or IDE, configure and initiate build process, troubleshoot compiler errors

在为模型构建可执行程序或共享库之前,请选择并设置编译器或IDE并配置目标环境。有几种方法可用于启动构建过程。工具可用于重新加载,重建和重新定位生成的代码。

如果您的系统包括参考模型,请减少构建时间并控制代码生成器是否为顶级模型再生代码。

To improve the speed of code execution, consider using available profiling capabilities.

Functions

expand all

packNGo Package generated code in ZIP file for relocation
rtw_precompile_libs Rebuild precompiled libraries within model without building model
rtwbuild Build generated code from a model
rtwrebuild Rebuild generated code from model
coder.buildstatus.close 关闭构建状态窗口
coder.buildstatus.open Open Build Status window
RTW.getBuildDir Get build folder information from model build information
金宝appsimulink.filegencontrol Specify root folders for files generated by diagram updates and model builds
switchTarget Select target for model configuration set

Topics

Build Process Workflows

为实时系统构建过程工作流程

Generate C code from a model and build an executable program.

Build Models from a Windows Command Prompt Window

Build models by running MATLAB with a batch file.

Rebuild a Model

自定义生成的源代码或makefiles后,重建模型。

重新加载生成代码

Reload generated code from the Model Explorer.

Build Integrated Code Within the Simulink Environment

Add support files and control model code generation and builds within the Simulink Environment.

将代码重新安置到另一个开发环境

使用代码生成和包装选项将代码和工件重新定位到另一个开发环境。

Compile and Debug Generated C Code with Microsoft® Visual Studio®

建立一个Visual Studio®Solution from a model.

Profile Code Execution Speed

Profile execution speed of generated code with TLC hook function interface.

Configure Build Process

Choose Build Approach and Configure Build Process

Build executable programs from generated code.

Template Makefiles and Make Options

代码生成器中内置的模板模板文件。

Select C or C++ Programming Language

Choose C or C++ as the programming language for code generation.

选择和配置C或C ++编译器

Consider programming language compliance for generated code and select a compiler for the build process.

Troubleshoot Compiler Issues

识别并修复可以防止编译器在构建过程中操作的问题。

Run-Time Environment Configuration

Select and configure target environment that best aligns with your application goals

Reports for Code Generation

Access the generated code files and information about the generated code with the code generation report.

配置用于调试的模型

Configure a model so that generated code and the build process are set for debugging.

Build Process Considerations

Manage Build Process Folders

Manage folders that the code generator creates.

Manage Build Process Files

Work with generated source files and dependency files that the code generator produces.

Manage Build Process File Dependencies

Work with generated source files and dependency files that the code generator produces.

Add Build Process Dependencies

Add dependency information for external code to the build process.

Build Process Support for Folder Names with Spaces or Special Characters

Troubleshoot build process errors that occur when file system issues prevent file processing.

Executable Program Generation

Build executable programs with the code generator.