Main Content

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.

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. Install the support package for ARM Cortex-R processors. For information on installing the support package, see Install Support for ARM Cortex-R Processors.

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

    crviewer('ARM Cortex-M')

  3. Open an existing Simulink® model, such as arm_cortex_r_gettingstarted, or create a new model.

  4. On the Apps tab, in the Setup to Run on Hardware group, click Run on Hardware Board.

  5. On the Run on Hardware Board pop-up, set Hardware Baord to TI Hercules RM57Lx LaunchPad. Click Finish.

  6. On the Hardware tab, select Hardware Settings to open the Configuration Parameters window.

  7. In the Configuration Parameters window, expand Code Generation > Interface.

  8. Set the Code replacement library parameter to ARM Cortex-M (CMSIS). Click OK.

See Also

Related Topics