Share Build Configuration Settings - MATLAB & Simulink (original) (raw)
Main Content
To share build configuration settings among multiple projects or between the MATLAB® Coder™ app and the command line, you can export the settings to and import the settings from a code generation configuration object. You can use a code configuration object when you generate code at the command line by passing the code configuration object to the codegen command with the-config
option.
Export App Settings to a Configuration Object
To export app project settings to a code configuration object, use one of these approaches:
- On the MATLAB Coder app toolstrip, click the Export button and select . Enter a name for the created configuration object.
- At the command line, use the
-toconfig
option with thecoder command. If the project file is not in the working directory, you must specify the file path.
The type of configuration object that the app creates depends on the build type of your MATLAB Coder project and on the configuration parameter Use Embedded Coder features.
Build Type Setting | Parameter Setting | Created Configuration Object |
---|---|---|
MEX | Any | coder.MexCodeConfig |
Standalone (static library, dynamic library, or executable) | Use Embedded Coder features check box selected | coder.EmbeddedCodeConfig |
Standalone (static library, dynamic library, or executable) | Use Embedded Coder features check box cleared | coder.CodeConfig |
Import Configuration Object Settings into the App
To import the settings from a code generation configuration object into theMATLAB Coder app, the configuration object must be stored in the base workspace. On theMATLAB Coder toolstrip, click Settings > Import from workspace variable. In the Import Code Generation Settings dialog box, select the configuration object.
See Also
coder | coder.config | codegen