coder.updateTlcForLanguageStandardTypes
Modify TLC file containing hard-coded Simulink
Coder data types for compatibility with
DataTypeReplacement=CDataTypesFixedWidth
code generation
Since R2023a
Description
coder.updateTlcForLanguageStandardTypes(
updates the input TLC file, which contains hard-coded instances of Simulink®
Coder™ data types, for compatibility with
tlcFile
)DataTypeReplacement=CDataTypesFixedWidth
code generation. In the TLC
file, the function replaces the hard-coded instances of CoderTypedef
names (for example, real32_T
) with corresponding API calls. During code
generation, the updated TLC code emits:
C99 data types if the value of the
DataTypeReplacement
configuration parameter is'CDataTypesFixedWidth'
.Simulink Coder data types if the
DataTypeReplacement
configuration parameter is'CoderTypedefs'
.
The function does not update hard-coded data types that are used as a
case
value within a switch
statement. In this
instance, manually update the lines of code. For example, in the switch
expression, use the data type identifier instead of the data type name.
Note
Before generating code, in the modified TLC file, check the changes produced by the function. TLC files can be very complex. In some cases, the function updates might fail or introduce an error.
Examples
Input Arguments
Version History
Introduced in R2023a