Embedded Coder Capabilities for Code Generation from MATLAB Code - MATLAB & Simulink

Execution TimeControl generation of floating-point data and operationsSupport only purely-integer numbersPurelyIntegerCodeN/ASimplify array indexing in loops in the generated codeSimplify array indexingEnableStrengthReductionSimplify Multiply Operations for Array Indexing in LoopsReplace functions and operators in the generated code to meet application-specific code requirementsCode replacement library on the Custom Code tabCodeReplacementLibraryEmbedded Coder offers additional libraries and the ability to create and use custom code. See Code Replacement Customization.Create and register application-specific implementations of functions and operatorsN/AN/ACode Replacement CustomizationCode AppearanceSpecify use of single-line or multiline comments in the generated codeComment StyleCommentStyleSpecify Comment Style for C/C++ CodeInclude MATLAB source code as comments with traceability tags. In the code generation report, the traceability tags link to the corresponding MATLAB source codeMATLAB source code as commentsMATLABSourceCommentsInclude Comments in Generated C/C++ CodeGenerate MATLAB function help text in the function banner MATLAB function help textMATLABFcnDescInclude Comments in Generated C/C++ CodeInclude comments in the generated code that contain summaries for requirements linked to MATLAB code. In the code generation report, the comments are hyperlinks that to the requirements in the Requirements EditorRequirement summaries as commentsReqsInCodeRequirements Traceability for Code Generated from MATLAB Code (Requirements Toolbox)Convert if-elseif-else patterns to switch-case statementsConvert if-elseif-else patterns to switch-case statementsConvertIfToSwitchControlling C Code StyleSpecify that the extern keyword is included in declarations of generated external functionsPreserve extern keyword in function declarationsPreserveExternInFcnDeclsN/ASpecify the level of parenthesization in the generated codeParenthesesParenthesesLevelN/ASpecify whether to replace multiplications by powers of two with signed left bitwise shifts in the generated codeUse signed shift left for fixed-point operations and multiplication by powers of 2EnableSignedLeftShiftsControl Signed Left Shifts in Generated CodeSpecify whether to allow signed right bitwise shifts in the generated codeAllow right shifts on signed integersEnableSignedRightShiftsN/AControl data type casts in the generated codeCasting mode on the All Settings tabCastingModeControl Data Type Casts in Generated CodeSpecify the indent style for the generated codeIndent style on the All Settings tab
Indent size on the All Settings tabIndentStyle
IndentSizeSpecify Indent Style for C/C++ CodeSpecify the maximum number of columns before a line break in the generated codeColumn limit on the All Settings tabColumnLimitN/ASpecify custom names for MATLAB data types in generated codeEnable custom data type replacementEnableCustomReplacementTypes
ReplacementTypesCustomize Data Type ReplacementImport custom data type definitions from external header files Import custom types from external header filesIsExtern
HeaderFilesImport Custom Data Type Definitions from External Header FilesCustomize generated C/C++ file namesGenerated source and header file name formatCustomFileNameStrCustomize C/C++ File Names Generated from MATLAB CodeCustomize generated global variable identifiers Global variablesCustomSymbolStrGlobalVarCustomize Generated IdentifiersCustomize generated global type identifiersGlobal typesCustomSymbolStrTypeCustomize Generated IdentifiersCustomize generated field names in global type identifiersField name of global typesCustomSymbolStrFieldCustomize Generated IdentifiersCustomize generated local functions identifiersLocal functionsCustomSymbolStrFcnCustomize Generated IdentifiersCustomize generated identifiers for local temporary variablesLocal temporary variablesCustomSymbolStrTmpVarCustomize Generated IdentifiersCustomize generated identifiers for constant macrosConstant macrosCustomSymbolStrMacroCustomize Generated IdentifiersCustomize generated identifiers for EMX Array types (Embeddable mxArray types)EMX Array TypesCustomSymbolStrEMXArrayCustomize Generated IdentifiersCustomize generated identifiers for EMX Array (Embeddable mxArrays) utility functionsEMX Array Utility FunctionsCustomSymbolStrEMXArrayFcnCustomize Generated IdentifiersCustomize function interface in the generated codeInitialize function required on the All Settings tab
Terminate function required on the All Settings tabIncludeInitializeFcn
IncludeTerminateFcnN/ACustomize file and function bannersN/ACodeTemplate
Control declarations and definitions of global variables in the generated codeN/AN/A
Generate code that is compliant with MISRA™ C/C++ and AUTOSAR C++ guidelinesMISRA Compliance paneSee coder.setupMISRAConfig reference pageGenerate C/C++ Code with Improved MISRA and AUTOSAR ComplianceDebuggingGenerate a static code metrics report including generated file information, number of lines, and memory usageStatic code metricsGenerateCodeMetricsReportGenerating a Static Code Metrics Report for Code Generated from MATLAB CodeGenerate a code replacement report that summarizes the replacements used from the selected code replacement libraryCode replacementsGenerateCodeReplacementReport
Highlight single-precision, double-precision, and expensive fixed-point operations in the code generation reportHighlight potential data type issuesHighlightPotentialDataTypeIssuesHighlight Potential Data Type Issues in a ReportCustom CodeReplace functions and operators in the generated code to meet application-specific code requirementsCode replacement libraryCodeReplacementLibraryEmbedded Coder offers additional libraries and the ability to create and use custom code. See Code Replacement Customization.Create and register application-specific implementations of functions and operatorsN/AN/ACode Replacement CustomizationVerificationInteractively trace between MATLAB source code and generated C/C++ codeEnable Code TraceabilityEnableTraceabilityInteractively Trace Between MATLAB Code and Generated C/C++ CodeVerify generated code using software-in-the-loop and processor-in-the-loop executionN/AVerificationModeCode Verification Through Software-in-the-Loop and Processor-in-the-Loop ExecutionDebug code during software-in-the-loop or processor-in-the-loop executionEnable source-level debugging for SIL or PIL on the Debugging paneSILPILDebuggingDebug Generated Code During SIL or PIL ExecutionProfile execution times during software-in-the-loop and processor-in-the-loop executionEnable entry point execution profiling for SIL/PIL on the Debugging paneCodeExecutionProfilingExecution Time Profiling for SIL and PILVerify and profile ARM optimized code Hardware Board on the Hardware paneHardware
Run Polyspace® verification on generated C/C++ code by using the integrated workflowN/AN/APolyspace Verification of C/C++ Code Generated by MATLAB CoderExtract coverage data for generated C/C++ code and custom C/C++ codeEnable C/C++ code coverage on the All Settings tabCodeCoveragegetCodeCoverageData