Preliminary Steps
This section describes preliminary steps to take before you start implementing your target.
Decide the Name of Your Target
Choose a name that includes the name of the supported hardware. If your target supports multiple hardware, choose the name that represents all supported hardware.
Choose a unique name. To avoid conflicts with other targets installed in the same installation of MATLAB®, include your organization name in the name of the target. The preferred pattern is:
<Organization name> Target for <Hardware board>
The name can contain alphanumerical characters and spaces only.
Determine the Hardware to Support
Your target can support one or more hardware boards. Pick a name to be used in Simulink® for each hardware device. This name generally corresponds to the vendor’s name for the hardware.
Choose a unique name. To avoid conflicts with hardware supported by other targets installed in the same installation of MATLAB, include your organization name in the name. The preferred pattern is:
<Organization name> support for <Vendor name of hardware board>
The name can contain alphanumerical characters and spaces only. As this name displays in various dialog boxes, keep the name short.
Determine the Required Software Tools
Your target will use several software tools to deploy generated code to your hardware.
A toolchain compiles and links generated code with other embedded software into an application that can run on hardware. You can support multiple toolchains for any hardware that your target supports. When deciding which toolchain to support, consider the supported host computer architectures and the capabilities and ease of access for your customers.
A download tool takes an executable file generated by the toolchain, downloads it to the hardware, and then runs it. You can bundle a downloaded tool with the toolchain, but sometimes you need to write it.
Hardware boards based on ARM® Cortex®-A processors typically use an operating system, for example, Linux® or VxWorks®. You need to acquire an operating system for each hardware device from a vendor. You also might need to create and load the operating system image onto your hardware.
Acquire or Develop Embedded Source Code
MathWorks® code generation software generates code for a Simulink model. To run generated code on hardware, you might need to supplement the code with other embedded software specific to your hardware, such as run-time math libraries, board support source files, and so on.
In many cases, you can obtain additional embedded software from the hardware vendor. But, in some cases you may need to develop additional embedded software yourself, for example:
If your hardware supports a bare-metal scheduler, you need to provide or write code that configures and handles an interrupt that drives the execution of generated code.
If your hardware uses a communication interface to the host other than Ethernet, you need to provide or write the code that handles the data exchange over that communication interface.
The manuals for your hardware board and the processor contain information and often examples that can assist you in developing the required embedded software.
Set Up the Environment
Connect your hardware to the MATLAB host computer using a supported I/O interface (typically Ethernet).
Make sure your Linux image is loaded on your processor.