This example shows you how to use Embedded Coder Support Package for ARM Cortex-A Processors to run a Simulink® models on an ARM Cortex-A9 emulator.
Embedded Coder Support Package for ARM Cortex-A Processors enables you to create and run Simulink models on a QEMU emulator. You can verify the generated code on an emulated ARM Cortex-A9 processor without actual hardware. You can also collect execution time measurements for an algorithm implemented in Simulink to aid refining and optimizing your algorithm.
In this task, you will configure the model to generate executable and run it on the ARM Cortex-A9 (QEMU) target.
1. First of all, start QEMU emulator for ARM Cortex-A by executing the following command in MATLAB® command prompt:
pid = codertarget.arm_cortex_a.runQemu()
2. Open the ARM Cortex-A Getting Started model. To configure the model for ARM Cortex-A9 (QEMU) target follow the steps shown in the figure below:
1. Generate code for the model by clicking on the Deploy to Hardware button as shown in the figure below:
The MathWorks software compiles and links the generated code on the host computer. Then, the software loads and runs the binary executable on the ARM Cortex-A9 (QEMU) target.
A command window pops-up showing that the executable has started running on the ARM Cortex-A9 (QEMU).
2. Close the command window. Use the following MATLAB command to terminate the emulator session:
3. To interact with the code running on the QEMU emulator see Code Verification and Validation with PIL and External Mode example.
This example introduced the workflow for configuring and running a Simulink model on the QEMU ARM Cortex-A9 emulator.