MATLAB Examples

Getting Started with Embedded Coder Support Package for ARM Cortex-R Processors

Run a Simulink® model on the ARM Cortex-R5 based Microcontroller of the TI Hercules RM57Lx LaunchPad.

Contents

Introduction

Embedded Coder Support Package for ARM Cortex-R Processors enables you to create and run Simulink models on a TI-RM57Lx LaunchPad. You can verify the generated code on the ARM Cortex-R5 processor. You can also collect execution time measurements for an algorithm implemented in Simulink to refine and optimize your algorithm.

Prerequisites

If you are new to Simulink, complete the Interactive Simulink Tutorial first. If you are new to Embedded Coder, visit the Embedded Coder product page for an overview and tutorials.

Task 1 - Configure Model for Targeting the TI Hercules RM57Lx LaunchPad

Configure the model to generate an executable and run it on the TI Hercules RM57Lx LaunchPad hardware board.

1. Connect the Hercules RM57Lx LaunchPad to the host computer

2. Open the ARM Cortex-R Getting Started model. To configure the model for the TI Hercules RM57Lx LaunchPad hardware board, follow the steps shown in the figure.

Setting the Hardware board parameter to TI Hercules RM57Lx LaunchPad automatically sets the system target file to ert.tlc, and it sets the Toolchain to TI ARM Code Generation Tools | gmake. The toolchain named GNU Tools for ARM Embedded Processors is also available with this support pacakge, because it supports some ARM Cortex-R based processors. However, it is recommended to use the TI ARM toolchain with this hardware.

Task 2 - Build, Load and Run Executable on the TI Hercules RM57Lx LaunchPad

1. Generate code for the model by clicking the Build Model button as shown in the figure below:

This also cross-compiles and links the generated code on the host computer. Then, the software loads and runs the binary executable on the RM57Lx Microcontroller.

2. To interact with the code running on the TI Hercules RM57Lx LaunchPad see docid:armcortexr_examples.example-arm_cortex_r_vv example.

Summary

This example introduced the workflow for configuring and running a Simulink model on the TI Hercules RM57Lx LaunchPad.