Documentation

管理构建过程文件夹

构建过程从simulink放置生成的文件金宝app®diagram updates and model builds into a hierarchy of folders that is specified by default. You can change the default specification for build process folders, if, for example:

  • Your company does not use the current working folder as the location for the code generation folder or the simulation cache folder.

  • 您将代码生成文件夹放在版本控件下,但不要将模拟缓存文件夹放在版本控件下。

matlab®session parametersCacheFolder,CodeGenFolder, 和CodeGenFolderStructureare file generation control parameters that specify the folder locations for the build process. At the start of a MATLAB session, these Simulink preferences determine the values of the parameters:

仿真缓存文件夹(金宝appSimulink) -CacheFolder

代码生成文件夹(金宝appSimulink) -CodeGenFolder

代码生成文件夹结构(金宝appSimulink) -CodeGenFolderStructure

要在MATLAB会话中修改参数,请使用金宝appsimulink.filegencontrol。您设置的参数值在MATLAB会话结束时到期。

文件生成控制参数

这个表提供信息如何use the parameters to manage build process folders.

MATLAB Session Parameter Simulink Preference Description

CacheFolder

仿真缓存文件夹(Simulink)

构建过程从simulink图更新中放置了生成的文件,并在模拟缓存文件夹中构建模拟工件金宝appsimulationCacheFolder。该文件夹是根文件夹。

By default (cachefolder =''),simulationCacheFolderis the current working folder,pwd

您可以使用the parameter to specify another folder. For example, if you want to:

  • 与模型和其他原始材料分开生成的文件。

  • Reuse or share previously built simulation targets without having to set the current working folder back to a previous working folder.

CodeGenFolder

代码生成文件夹(Simulink)

使用系统目标文件从Simulink模型生成生产代码的构建过程将生产代码放在代码生成文件夹中金宝appCodeGenerationFolder。该文件夹是根文件夹。

如果您选择生成可执行的程序文件,则构建过程写入文件model。exe(视窗®) ormodel(unix®) to the folder.

By default (CodeGenFolder = ''),CodeGenerationFolderis the current working folder,pwd

您可以使用the parameter to specify another folder. For example, if you want to separate generated production code from:

  • 模型和其他原始材料。

  • Generated simulation artifacts.

如果将驱动器的根文件夹指定为代码生成文件夹,则构建过程无法为您的模型生成代码。例如,C:\

CodeGenFolderStructure

代码生成文件夹结构(Simulink) To specify the folder structure within the code generation folder, use the parameter. For example, if you configure models for different target environments, you can specify a separate subfolder for the generated code from each model.

Build Process Folders

该表提供了有关如何CodeGenFolderStructurecontrols the folder structure within the simulation cache folder and the code generation folder.

Folder Name whenCodeGenFolderStructure=“模型特定”

Folder Name whenCodeGenFolderStructure='TargetEnvironmentSubfolder'

Description

CodeGenerationFolder/model_target_rtw

The default fortargetis the name of the selected system target file, for example,grt,ert, 和rsim。You can changetargetrtwgensettings.BuildDirSuffixfield in the system target file.

CodeGenerationFolder/targetSpecific/model

The build process uses configuration information for the system target file and the hardware device to produce a unique label for the subfolder,targetSpecific

Build folder, which stores generated source code and other files created by the build process.

Contains the generated code modules,model。Cmodel。H,以及生成的makefile,model。mk

modelis the name of the source model.

CodeGenerationFolder/model_target_rtw/html

CodeGenerationFolder/targetSpecific/model/html

代码生成报告文件夹,其中包含构建过程生成的报告文件。

CodeGenerationFolder/slprj/target/model

CodeGenerationFolder/targetSpecific/_ref/model

Model reference target files.

CodeGenerationFolder/slprj/target/model/referenced_model_includes

CodeGenerationFolder/targetSpecific/_ref/model/referenced_model_includes

Header files from models referenced bymodel

CodeGenerationFolder/slprj/target/model/tmwinternal

CodeGenerationFolder/targetSpecific/_ref/model/tmwinternal

MAT-files used during code generation.

CodeGenerationFolder/slprj/target/_共享utils

CodeGenerationFolder/targetSpecific/_共享

Utility functions for model reference system target files, which are shared across models.

simulationCacheFolder/slprj/sim/model

simulationCacheFolder/slprj/sim/model

Simulation target files for referenced models.

simulationCacheFolder/slprj/sim/model/tmwinternal

simulationCacheFolder/slprj/sim/model/tmwinternal

MAT-files used during code generation.

simulationCacheFolder/slprj/sim/_sharedutils

simulationCacheFolder/slprj/sim/_sharedutils

Utility functions for simulation system target files, which are shared across models.

如果系统目标文件基于ERT,则这些配置参数还控制共享实用程序的位置:

您可以使用RTW.getBuildDirto display build folder information for the model.

See Also

|

相关话题

这个话题有帮助吗?