Optimize Code for ARM Cortex-M Processors
You can configure your model to replace generic code with ARM® CMSIS code that is optimized for ARM Cortex®-M processors.
To measure the effects of optimization, you can perform Execution profiling before and after completing this procedure. For more information, see Replace Code for Embedded Targets.
To enable the code replacement libraries for ARM Cortex-M processors:
(Optional) To see the code replacement libraries that the code generation process will, enter:
Code Replacement Viewer opens and displays the code replacement libraries.
In the model, open the Modeling tab and press CTRL+E to open the Configuration Parameters dialog box. Go to Hardware Implementation > Hardware board and ensure that the Device vendor is set to
ARM compatibleand Device type is
In the Configuration Parameters dialog box, expand Code Generation, and select the Interface pane.
Click Select of Code replacement library parameter. A
Choose one or multiple Code replacement libraries for code generationdialog box is opened.
Select ARM Cortex-M to the selected code replacement libraries-prioritized and click OK.