Main Content

Get Started with Embedded Coder Support Package for Intel® SoC Devices

This example shows how to use Embedded Coder® Support Package for Intel® SoC Devices to run a Simulink® model on an Intel SoC device.

Introduction

The Embedded Coder Support Package for Intel SoC Devices enables you to generate code from Simulink models. You can compile and load the generated code as an executable on an Intel SoC device. Then, you can run the executable on the device.

Requirements

Configure Model for Code Generation

1. Open the alterasoc_gettingstarted model.

2. On the Apps tab in the Simulink Toolstrip, under Setup to Run on Hardware, click Run on Hardware Board.

3. In the Run on Hardware Board dialog box, set Hardware Board to Altera Cyclone V SoC development kit. Click Finish.

In the Simulink Toolstrip, the new Hardware tab enables you to run and interact with the connected hardware board.

Build, Deploy, and Start Executable

The Embedded Coder software can build a binary executable by compiling and linking the generated code on your host computer. Then, you can deploy and run the executable on the Intel SoC device. On the Hardware tab, click Build, Deploy & Start to run your model as a binary executable on the connected Intel SoC device.

After the model launches on the hardware, a command window opens and shows that the executable is running on the Intel SoC device.

8. You can stop the executbale running on the hardware at any time by running the following MATLAB commands.

hsoc = alterasoc();
stop(hsoc, 'alterasoc_gettingstarted');

Other Things to Try

You can interact with the code running on the Intel SoC device using PIL or external mode. For more information on PIL and external mode, see and .