Main Content

createHardware

Create an object for the hardware that a target supports

Description

hardware = createHardware(hardwareName) returns a matlabshared.targetsdk.Hardware object, H, with the Name property set to the value of hardwareName.

A Hardware object represents a hardware board supported by a target.

Examples

collapse all

Create a target object using the ARM® Cortex-M® target as reference.

target = createTarget('MyTarget','ARM Cortex-M','c:/mytarget');

Create a hardware object and set the deviceID property to ARM Cortex-M4F.

hardware = createHardware('My hardware board');
hardware.DeviceID = 'ARM Cortex-M4F'
hardware = 
  Hardware with properties:

           Name: 'My hardware board'
       DeviceID: 'ARM Cortex-M4F'
    IOInterface: {}

Map the hardware to the target and show the features supported by the target.

map(target,hardware,'My hardware board display name');
show(target);
                         My hardware board            
Display Name      My hardware board display name      

Input Arguments

collapse all

Name of the hardware, specified as a string.

Data Types: char | string

Output Arguments

collapse all

Handle to the Hardware object.

Version History

Introduced in R2015a