coder.mapping.create - Create C code mapping environment for model - MATLAB (original) (raw)
Main Content
Create C code mapping environment for model
Syntax
Description
coder.mapping.create([model](#d126e49792))
creates an environment to configure code generation for data and functions of the specified model. Before calling other default mapping functions, call this function.
coder.mapping.create([model](#d126e49792),[cs](#d126e49822))
creates a code mapping environment for the specified model that includes code customization settings stored in a configuration set object. The configuration set object can specify memory sections for data and functions and a naming rule for shared utilities. Specify a configuration set object to preserve memory section definitions or shared utility naming rules applied to a model in a version of Embedded CoderĀ® prior to R2018a.
Examples
Create Environment to Configure Code Mappings for Model
For model ConfigurationInterface
, create the environment for configuring data and functions for code generation.
openExample('ConfigurationInterface') coder.mapping.create('ConfigurationInterface');
After calling this function, use calls to these functions to look up category names, property names, and values that you can use to configure aspects of code generation for model data and functions:
coder.mapping.defaults.dataCategories
coder.mapping.defaults.functionCategories
coder.mapping.defaults.allowedProperties
coder.mapping.defaults.allowedValues
Then, specify category, property, and value combinations in calls tocoder.mapping.defaults.set
.
Input Arguments
Model file, specified as a character vector. The model must be loaded (for example, by using load_system
) or open. You can omit the .slx
file extension.
Example: 'myLoadedModel'
Data Types: char
Configuration set object from which to import code customization settings for data and functions.
Example: 'cs_basic'
Data Types: char
Version History
Introduced in R2018a