Споделяне чрез


Quickstart: Install the Azure Sphere SDK for Windows

To start using an Azure Sphere dev kit on Windows, you need to set up the dev kit, install the SDK, and install any additional software required for your development environment.

Prerequisites

  • An Azure Sphere development kit
  • A PC running Windows 11 or Windows 10 Anniversary Update (or later)
  • An unused USB port and, if you're running a virtual machine, support for USB pass-through

Set up your dev kit on a Windows PC

Connect your Azure Sphere dev kit to your PC through USB. When plugged in, the device exposes four USB Serial Converters.

The first time you plug in the device, the drivers should be automatically downloaded and installed. Installation can be slow. If the drivers are not installed automatically, right-click the device name in Device Manager and select Update driver. Alternatively, you can download the drivers from Future Technology Devices International (FTDI). Choose the driver that matches your Windows installation (32- or 64-bit).

To verify installation, open Device Manager. Under Universal Serial Bus controllers, look for four USB Serial Converters.

Note

If you've previously used this board and enabled RTApp development, you will see three converters instead of four. This is normal and does not represent an error.

If other errors occur, see Troubleshoot Azure Sphere problems for help.

Install the Azure Sphere SDK

  1. Download the SDK. Save the downloaded file on your PC.

  2. Run the downloaded .exe to install the SDK. Agree to the license terms, and then select Next.

  3. Select Install to begin installation.

  4. Accept the elevation prompt if one appears.

  5. When setup completes, restart your PC if the setup application requests it.

If the installer returns errors, try uninstalling and then reinstalling the SDK package.

Install the Azure Sphere extension for Azure CLI

The command-line tool for managing Azure Sphere attached devices and cloud deployments is distributed as an Azure CLI extension. Take the following steps to acquire it:

  1. Install the Azure CLI if you have not yet done so.

  2. To add the Azure Sphere extension, run the following command:

    az extension add --name azure-sphere
    

You must Sign in with Azure CLI to log into the Azure subscription you wish to use to manage Azure Sphere devices.

For more information, see Download and run the Azure Sphere extension.

Install Azure Sphere extension for Visual Studio

You can use Visual Studio Enterprise, Professional, or Community 2022 (or 2019 version 16.11 or higher) to develop Azure Sphere applications.

  1. If you haven't already done so, install Visual Studio:

  2. Go to the Visual Studio Marketplace to install the Visual Studio Extension for Azure Sphere:

The Azure Sphere SDK and the Azure Sphere Extension for Visual Studio include all the tools you need to develop Azure Sphere applications.

Install CMake and Ninja on Windows

If you plan to use Visual Studio Code or the Windows CLI, you need to install CMake and Ninja manually.

  1. To install CMake, download and install the appropriate version of CMake for your development environment from the CMake download page.

  2. Download Ninja. The download is a small zip file. To install Ninja, open the zip file, select Extract All, and note the file location of the extracted file ninja.exe.

  3. Add the CMake bin directory (typically, C:\Program Files\CMake\bin) and the directory containing ninja.exe to your PATH environment variable. To find information about setting this environment variable in Windows, type "path" in the Search box.

Tip

Reboot your computer after modifying environment variables to ensure all processes pick up the changes.

Install the Azure Sphere extension for Visual Studio Code

  1. Use the links in Download Visual Studio Code to install Visual Studio Code, if you haven't already done so.

  2. To install the Azure Sphere extension, search for "Azure Sphere" in the Extension Marketplace from a browser or within Visual Studio Code. You should see two results, Azure Sphere and Azure Sphere UI. Select Install for either one; the other should be installed automatically.

  3. After installation, you should see Azure Sphere, C/C++, and CMake Tools extensions in the ENABLED Extensions pane in the Visual Studio Code IDE.

When installation is complete, the Readme page for the extension will open. The Readme page provides useful information about Visual Studio Code configuration and requirements, and is updated along with the extension. You can view the Readme page at any time by opening the Extensions pane and selecting Azure Sphere.

Next steps