For example, you may want code optimized for speed but not at the expense of MISRA-C compliance.Īdditional options let you target an AUTOSAR environment, or generate C++ with class definitions. To generate code, establish your objectives using the Code Generation Advisor. SIL and PIL tests can also include code coverage analysis and execution profiling.
You can verify that the code execution matches model simulation results using software-in-the-loop and processor-in-the-loop testing. You can replace the default code output with target-specific optimizations and customizations using code replacement libraries as shown here, or by using the legacy code tool.Įmbedded Coder lets you review and navigate from the model to its generated code, and back again using code reports with traceability links. The generated code is ANSI and ISO C compliant, so it can run on virtually any fixed- or floating-point device and is particularly well suited for applications that need to minimize memory usage or maximize speed. Embedded Coder generates C and C++ code optimized for embedded systems by extending the capabilities offered by MATLAB Coder™ and Simulink Coder™.