Main Content

Custom Targets

A custom target is a software package that you create to deploy MATLAB® and Simulink® designs to target hardware. Using the package, you can perform tasks to optimize, prototype, verify, and deploy an application to your hardware. This table lists tasks that you can perform by using target classes and functions.

TaskSee
Register new hardware devices and hardware boards for Hardware Implementation settings.

Register New Hardware Devices

target.Board

target.Processor

target.LanguageImplementation

Build a target application using a CMake-based toolchain.

Create Custom CMake Toolchain Definition

Generated Code Compilation

Deploy, download, and run an application on target hardware.

target.ExecutionTool

target.SystemCommandExecutionTool

Tune parameters and monitor target application signals during an external mode simulation.

Set Up External Mode Connectivity Between Simulink and Target Hardware

External Mode Simulation by Using XCP Communication

Customize XCP Server Software

Test numerical equivalence between your MATLAB code or Simulink model and the generated code by running a processor-in-the-loop (PIL) simulation.

Set Up PIL Connectivity by Using target Package (Embedded Coder)

Configure and Run PIL Simulation (Embedded Coder)

Perform code execution profiling through a PIL simulation.

Set Up PIL Connectivity by Using target Package (Embedded Coder)

Create Execution-Time Profile for Generated Code (Embedded Coder)

This table lists additional tasks that you can perform alongside a custom target defined by target classes and functions.

Task See
Generate or register a main file to schedule the generated code

Deploy Applications to Target Hardware (Embedded Coder)

Model Multicore Concurrent Tasking Application (Embedded Coder)

Target operating system (Embedded Coder)

Generate Source and Header Files with a Custom File Processing (CFP) Template (Embedded Coder)

Support C Function Prototype Control

Support C++ Class Interface Control

Register build hooks.

Customize Build Process with sl_customization.m

Customize Post-Code-Generation Build Processing

Optimize generated code by using a processor-specific code-replacement library.Code Replacement
Integrate real-time operating systems and device drivers.

Device Drivers

Define a custom system target file with hooks and custom settings to add target-specific actions to the build process.

Target Platform Device Customization

Customize System Target Files

Customize Build Process with STF_make_rtw_hook File

You can also create custom software for ARM® processors, which is based on MathWorks® reference targets. For example, see: