Optimize Code for ARM Cortex-R Processors

You can configure your model to replace generic code with ARM® Cortex® Microcontroller Software Interface Standard (CMSIS) code that is optimized for the ARM Cortex-R processors. The ARM CMSIS library contains a range of code replacement libraries to help accelerate and optimize software development on ARM Cortex processors.

To measure the effects of optimization, you can perform execution profiling before and after enabling these code replacement libraries. For more information, see Replace Code for Embedded Targets (Embedded Coder).

To enable code replacement libraries for ARM Cortex-R processors, use the ARM CMSIS standardized hardware abstraction layer for interfacing with the ARM Cortex-M processor series. The TI ARM Cortex-R DSP library conforms to this standard.

  1. (Optional) To see the code replacement libraries in the Code Replacement Viewer, at the MATLAB® command prompt, enter:

    crviewer('ARM Cortex-M')

  2. If you have not done so already, install the support package for ARM Cortex-R processors, as described in Install Support for ARM Cortex-R Processors.

  3. In your Simulink® model, click the Model Configuration Parameters, .

  4. In the left pane of the Configuration Parameters dialog box, select Hardware Implementation.

  5. Set the Device vendor parameter to ARM Compatible, set the Device type parameter to ARM Cortex. Click Apply.

    Note

    If you set the Hardware board parameter to TI Hercules RM57Lx LaunchPad, the Device vendor and Device type parameters are automatically updated to ARM Compatible and ARM Cortex, respectively.

  6. Expand Code Generation, and select Interface.

  7. Set the Code replacement library parameter to ARM Cortex-M (CMSIS), and click OK.

Related Topics