This section are as follows:
First, install Development Kit (paper windows version, for example)
Second, the new Azure Sphere Development Board to manually update the operating system Azure Sphere
Third, the configuration and Azure Sphere extended VS Code
Fourth, the statement Azure Sphere device (herein are to demonstrate a new device)
Create a user account and log on to the Microsoft Azure Sphere services;
User (Microsoft account) to create a tenant;
Disclaimer: The Azure Sphere device ID is bound to tenants, this process is also known as unclaimed;
V. configure the device via WIFI network
Sixth, enable the development of applications on the device
Video Tutorial:
You can watch a video explaining the B station: https://www.bilibili.com/video/av98009311/
Photo explanation:
First, install the development tools (paper windows version, for example)
Reference documents: https://docs.microsoft.com/zh-cn/azure-sphere/install/install-sdk
Azure Sphere Development board interface into the computer will be prompted three com port, as shown in the Device Manager via USB:
If another error occurs, or see less than three COM ports, refer to troubleshoot Windows installation problems for help.
Azure Sphere SDK for Windows platform there are two types, only the installation of a class can not be installed at the same time two :
Azure Sphere 1. for Visual Studio SDK:
Use Visual studio development, need: Visual Studio Enterprise, Professional or Community 2019 version 16.4 or later.
Use Visual Studio Code development.
2. for Windows Azure Sphere SDK:
Use the Windows command prompt development;
Use Visual Studio Code development.
In this paper, the use of "for Windows Azure Sphere SDK" + VS Code development.
SDK Download: https://docs.microsoft.com/zh-cn/azure-sphere/install/install-sdk#azure-sphere-sdk-for-windows
SDK installation:
After installation is complete, the Start menu, the program as shown below:
Second, the new Azure Sphere Development Board to manually update the operating system Azure Sphere
Installation of the board's back button cell
Connected to a Windows computer via the included USB cable
For unused Azure Sphere Development Board, for the first time, you need to refer to the following documents Azure Sphere OS upgrade:
https://docs.microsoft.com/zh-cn/azure-sphere/resources/update-old-seeed-os
The upgrade process is simple:
1. 打开Azure Sphere Develop Command Prompt
2. Enter the command and waits for the successful implementation: azsphere device recover
Third, the configuration and Azure Sphere extended VS Code
VS Code Azure Sphere mounting extensions:
对于本文中的“用于Windows的Azure Sphere SDK” 和VS Code 开发应用程序,还需要安装如下两个程序:
1. CMake https://cmake.org/download/
2. Ninja https://github.com/ninja-build/ninja/releases
对于CMake的安装,直接下一步下一步就可以了:
对于Ninja,需要解压到某目录后,设置环境变量:
Azure Sphere 开发板支持两种应用程序:
1.高级应用程序
2.RTApp实时应用程序
实时应用程序主要利用MCU中的两个ARM Cortex-M4 处理器在实时操作系统上RTOS进行开发,本系列文章暂时不做该内容的介绍。
截至到此,我们已经配置完成了开发高级应用程序的环境,对于RTApp的开发环境配置,本文不再介绍,请参见官网:
四、声明 Azure Sphere 设备(本文中均以一个新设备来进行演示)
使用Microsoft 账户创建用户并登录到Azure Sphere 服务;
使用用户(Microsoft 账户)创建租户;
声明:将Azure Sphere 设备ID绑定到租户,该过程也称为认领;
三个步骤的最终目的就是声明设备,声明设备是将设备ID和Azure Sphere 租户绑定,也称之为“认领”的过程,一旦绑定,即使你将Azure Sphere 设备进行二次销售,该绑定也不能修改。
关于声明的详细步骤,请参见官网:https://docs.microsoft.com/zh-cn/azure-sphere/install/claim-device
本文中,简化了官网文档,仅假设我们操作的设备是一台全新的Azure Sphere,故而很多步骤是不需要操作的。
1. 通过命令登录Azure Shpere,对于刚装好SDK并第一次使用SDK,使用 --newuser
参数以及 Microsoft 帐户电子邮件地址可以创建一个账户并登录:
azsphere login --newuser <email-address>
按照提示输入Microsoft 账户的密码:
同意授权:
登录成功之后:
如果你有权访问单个租户,则默认选中该租户,此时可继续执行下一步。
如果你无权访问任何租户,则需要创建租户。
如果以前已将 Azure Sphere 与 19.09 SDK(或早期版本)配合使用,则可能需要迁移租户。
如果你有权访问多个租户,则需要选择一个。 有关详细信息,请参阅 azsphere tenant select。 选择租户后,请继续执行下一步。
在本例中,这是我们第一次使用Azure Sphere,故而没有权限访问任何Azure Sphere 租户,需要先进行创建:
执行如下命令:
azsphere tenant create --name <my-tenant>
The <my-tenant> substituted with a name recognizable to other users, for example, "Contoso Ltd" or "Contoso Dishwasher Division". If the name contains spaces, enclose it in quotation marks. All names must be unsigned alphanumeric characters.
After the tenant is created, run the following command claimed device, the claim is successful, the device can not migrate again to the other tenants.
azsphere device claim
V. configure the device via WIFI network
Wifi configuration using the following command:
azsphere device wifi add --ssid <yourSSID> --psk <yourNetworkKey>
Configuration display state unknown is a normal phenomenon, use the following command to query network status again:
azsphere device wifi show-status
Use the following command to check the OS version Azure Sphere Development Board:
azsphere device show-deployment-status
In this example it is 20.01 as of the latest version 2020.03 of the month, is our beginning of this article manually upgrade to the latest version.
Under normal circumstances, the Azure Sphere each boot device will automatically check for updates, if a long time for the shutdown, the device will check for 24 hours, if an update will be automatically downloaded and installed, this process may be 15-20 minutes to install When finished, the device may restart.
Sixth, enable the development of applications on the device
Run the following command on the boot device application development
azsphere device enable-development
The process will download configuration files to configure the development board, and installation and commissioning services on the local Windows system.