Main Content

Using the Target Framework

The Target Framework enables you to define target hardware characteristics and integrate tools with MATLAB® and Simulink®. Using classes from the target namespace, capture target hardware or software platform information for MathWorks® software. Perform tasks to optimize, prototype, verify, and deploy design components.

Target Framework Overview

Using target objects, you can capture information for MathWorks software. For example, to register a new hardware device for code generation, use this workflow:

  1. Create a target.Processor object for the new hardware device.

  2. Create a target.LanguageImplementation object for language implementation details.

  3. Specify language implementation details.

  4. Associate the language implementation with the hardware device.

  5. Add the target.Processor object to an internal database.

  6. On the Hardware Implementation pane, use the Device vendor and Device type settings to specify the hardware device as the target device for code generation.

For more information, see Specify Hardware Implementation for New Device.

To create and manage the objects, use these functions:

  • target.create –– Create an object that captures component information for MathWorks software, for example, target processor and compiler properties.

  • target.add –– Add the object to an internal database.

  • target.update –– Update the target object in the internal database.

  • target.get –– Retrieve the object from the internal database.

  • target.export –– Export the object data for sharing.

  • target.upgrade –– Upgrade existing definitions of hardware devices.

  • target.remove –– Remove the object from the internal database.

  • target.clear –– Clear all target objects from internal database.

Target Framework Workflows

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

Build a target application using a CMake-based toolchain.

Create Custom CMake Toolchain Definition

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

Set Up PIL Connectivity by Using Target Framework (Embedded Coder)

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 Framework (Embedded Coder)

Configure and Run PIL Simulation (Embedded Coder)

Perform code execution profiling through a PIL simulation.

Set Up PIL Connectivity by Using Target Framework (Embedded Coder)

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

See Also

Related Topics