targetHardware

Configuration object for hardware

Description

This object represents a configuration object for the hardware. Create this object by using the targetHardware function. Use this object with the deploy function to deploy a MATLAB® function as a standalone executable on the hardware.

Creation

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.

Input Arguments

expand all

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

Example: 'Raspberry Pi'

Data Types: char

Output Arguments

expand all

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

Properties

expand all

This property is read-only.

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

Example: Raspberry Pi

Data Types: char

The IP address or host name of the Ethernet port on the hardware.

Example: 169.254.0.2

Data Types: char

The user name for the Linux® operating system on the hardware.

Example: pi

Data Types: char

The password for the Linux operating system on the hardware.

Note

The default user is pi, and the password is raspberry. This user has sudo root powers at the command line. Changing this default password to a stronger password is a good security practice.

Example: raspberry

Data Types: char

The folder on the hardware in which the MATLAB function is to be deployed.

Example: /home/deployFile

Data Types: char

Defines how MATLAB responds when you press Ctrl+B to build your model.

  • Build: MATLAB compiles and links the MATLAB function into an executable with libraries. This option does not load and run the executable on the hardware board.

  • Build, load, and run: MATLAB compiles and links the MATLAB function into an executable with libraries, loads the executable and libraries, and runs the executable on the hardware.

Example: Build, load, and run

Data Types: char

Object Functions

deployDeploy MATLAB function on hardware

Examples

collapse all

Create a configuration object of the Raspberry Pi™ hardware.

targetObj = targetHardware('Raspberry Pi')
targetObj = 

targetHardware with properties:

             Name: 'Raspberry Pi'
    DeviceAddress: 'blrtestpi'
         Username: 'pi'
         Password: '*********'
         BuildDir: '/home/pi'
      BuildAction: 'Build, load, and run'

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Introduced in R2018b