Skip to content

Host Installation and Setup

The host must be installed and setup as follows:

Install the Azure Sphere SDK

The Azure Sphere SDK is required to build XRT and deploy it to Azure Sphere hardware using the Azure Sphere CLI. The SDK supports interaction with devices, image development and Azure Sphere Cloud Services and is supported on Windows and Linux systems. For further information on the Azure Sphere SDK, refer to the Azure Sphere documentation.

Note

The examples in this manual use version 2 of the azsphere CLI; if using version 1, the command syntax might differ slightly.

To install the Azure SDK on Windows systems, refer to the Windows installation quickstart section of the Azure Sphere documentation.

To install the Azure SDK on Linux systems, refer to the Linux installation quickstart section of the Azure Sphere documentation.

Install the XRT for Azure Sphere Package

To install the pre-built XRT libraries for XRT and the supported Device Services on a Linux host, enter the following command:

sudo apt-get install iotech-xrt-azsphere11

For further information on installing XRT on the Azure Sphere development host, including installing on Windows refer to the XRT Installation Guide.

Install Visual Studio Code

To develop using Visual Studio Code, you must install the following:

To deploy Azure functions (only required if using Azure Digital Twins), also install:

To deploy Azure Functions (for Digital Twin integration), complete the following steps:

  1. Open the AzureSphere/twin/functions Azure Function App Project, available from the examples, with Visual Studio Code
  2. Select the Azure menu icon, which is located on the left of the Visual Studio Code editor
  3. Install the Azure Sphere SDK
  4. Select the Functions sub-menu
  5. Select Deploy Function App
  6. Select Create New Function App in Azure from the drop-down menu
  7. Enter a unique name for the new Azure Function App
  8. Select the .NET Core 3.1 runtime stack
  9. Select a location

Once the Azure Function App has been created, Azure produces the following Azure Resources with the same name as the Azure Function App:

  • storage Account Resource
  • Application Insights Resource

For future deployments, you can select the Azure Function App that you have just created to upload the Project again, instead of creating a new Azure Function App.

Install the Azure CLI

The Azure command-line interface (CLI) allows you to create and manage Azure Resources. To use the Azure command-line interface, you must download and install it as described in the Azure CLI documentation.

az extension add --name azure-iot

To create Azure Resources using the CLI, you must log on to your Azure Account using the following command:

az login

IOTech recommends creating each Azure Resource in the same Region, however this is not necessary.

Back to top