hardware-definition

Manages hardware definitions for Azure Sphere devices.

Operation Description
generate-header Generates a C header file corresponding to a hardware definition and places it in the inc/hw folder relative to the input JSON.
test-header Tests that the C header file in the inc/hw folder is up-to-date with respect to the input JSON.

generate-header

Generates a C header file corresponding to a hardware definition and places it in the inc/hw folder relative to the input JSON.

Required parameters

Parameter Type Description Supported version
--hardware-definition-file Path Specifies the name and path to a hardware definition JSON file. You can provide a relative or absolute path. Azure Sphere CLI
-i, --input Path Specifies the name and path to a hardware definition JSON file. You can provide a relative or absolute path. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere hardware-definition generate-header --hardware-definition-file C:\AppSamples\HardwareDefinitions\seeed_mt3620_mdb\sample_appliance.json
Generated header file at C:/AppSamples/HardwareDefinitions/seeed_mt3620_mdb/inc/hw/sample_appliance.h based on hardware definition at C:\AppSamples\HardwareDefinitions\seeed_mt3620_mdb\sample_appliance.json

test-header

Tests that the C header file in the inc/hw folder is up-to-date with respect to the input JSON.

Required parameters

Parameter Type Description Supported version
--hardware-definition-file Path Specifies the name and path to a hardware definition JSON file. The file path can be an absolute or relative path. Azure Sphere CLI
-i, --input String Specifies the name and path to a hardware definition JSON file. The file path can be an absolute or relative path. Azure Sphere classic CLI
Global parameters

The following global parameters are available for the Azure Sphere CLI:

Parameter Description
--debug Increases logging verbosity to show all debug logs. If you find a bug, provide output generated with the --debug flag on when submitting a bug report.
-h, --help Prints CLI reference information about commands and their arguments and lists available subgroups and commands.
--only-show-errors Shows only errors, suppressing warnings.
-o, --output Changes the output format. The available output formats are json, jsonc (colorized JSON), tsv (Tab-Separated Values), table (human-readable ASCII tables), and yaml. By default the CLI outputs table. To learn more about the available output formats, see Output format for Azure Sphere CLI commands.
--query Uses the JMESPath query language to filter the output returned from Azure Sphere Security Services. See JMESPath tutorial and Query Azure CLI command output for more information and examples.
--verbose Prints information about resources created in Azure Sphere during an operation and other useful information. Use --debug for full debug logs.

Note

If you are using Azure Sphere classic CLI, see Global parameters for more information on available options.

Example

azsphere hardware-definition test-header --hardware-definition-file "C:\Program Files (x86)\Microsoft Azure Sphere SDK\HardwareDefinitions\mt3620.json"
Hardware definition at C:\Program Files (x86)\Microsoft Azure Sphere SDK\HardwareDefinitions\mt3620.json is consistent with header at C:/Program Files (x86)/Microsoft Azure Sphere SDK/HardwareDefinitions/inc/hw/mt3620.h