Main Content

targetHardware

Create configuration object for hardware

Description

targetObj = targetHardware(hardwareName) creates a configuration object for the hardware. You can deploy your MATLAB® function as a standalone executable on the hardware by using this object with the deploy method.

Examples

collapse all

Note

This example is applicable to the installed MATLAB Support Package for Raspberry Pi™ Hardware.

Create a configuration object of the Raspberry Pi hardware.

targetObj = targetHardware('Raspberry Pi')
targetObj = 
 targetHardware with properties:

               Name: 'Raspberry Pi'
      DeviceAddress: '172.18.182.234'
           Username: 'pi'
           Password: '*********'
           BuildDir: '/home/pi'
    EnableRunOnBoot: 0
        BuildAction: 'Build, load, and run'
        CoderConfig: [1×1 coder.CodeConfig]

Create a configuration object of the Raspberry Pi hardware in MATLAB Online™

targetObj = targetHardware('Raspberry Pi')
board =
 
targetHardware with properties:
 
               Name: 'Raspberry Pi'
      DeviceAddress: '0000000096843414'
           Username: ''
           Password: ''
           BuildDir: '/home/matlabrpi'
    EnableRunOnBoot: 0
        BuildAction: 'Build, load, and run'
        CoderConfig: [1x1 coder.CodeConfig]

Input Arguments

collapse all

Name of the hardware on which the MATLAB function is to be deployed.

Example: 'Raspberry Pi'

Data Types: char

Output Arguments

collapse all

The configuration object of the specified hardware, returned as a targetHardware object.

Extended Capabilities

Introduced in R2018b