---
title: これから Azure Sphere で開発する方へ
tags: 
author: [MATSUOKA Takashi](https://www.docswell.com/user/matsujirushi)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/YE9NM95XE3.jpg?width=480
description: 2020/7/27 【オンライン】Azure Sphere技術セミナー！最新のIoTセキュリティソリューションとは！ https://algyan.connpass.com/event/183482/
published: July 27, 20
canonical: https://www.docswell.com/s/matsujirushi/ZQ8JVX-2024-01-17-214658
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/YE9NM95XE3.jpg)

これから Azure Sphere で開発する方へ
2020/7/27
Takashi Matsuoka


# Page. 2

![Page Image](https://bcdn.docswell.com/page/GE8KL9Y97D.jpg)

Takashi Matsuoka
(@matsujirushi12)
2017～ MVP for Windows Development
2020～
for Microsoft Azure
Seeed株式会社所属
ソフトウェア担当
在宅勤務
子育て中
「e」3つ


# Page. 3

![Page Image](https://bcdn.docswell.com/page/LELZLW4MJR.jpg)

Microsoft Build 2018 BRK3801
https://www.youtube.com/watch?v=yozSfPp_R3k


# Page. 4

![Page Image](https://bcdn.docswell.com/page/4JMVM9K6JW.jpg)

一般的なMCUアプリの開発
パソコン
.c
.cpp
コンパイラ /
リンカ
.elf
.bin
Flashツール
プローブ
MCU


# Page. 5

![Page Image](https://bcdn.docswell.com/page/PJR2VGXNE9.jpg)

Azure Sphere の開発
AS3 … Azure Sphere セキュリティサービス
MT3620 RDB … MT3620 開発ボード
(Reference Development Board)
1
パソコン
.c
クラウドローディング
app_
mani
fest
azsphere
3
2
gcc
AS3
Wi-Fi
4
MT3620 RDB
app
USB
2
azsphere
image
package
azsphere
サイドローディング


# Page. 6

![Page Image](https://bcdn.docswell.com/page/PEXDZX687X.jpg)

①② 開発用パソコン / 開発ツール
Ubuntu 18.04LTS or 20.04 LTS
Windows 10 16071. Azure Sphere SDK for Windows
1. net-tools, curl
2A. Visual Studio 2019
+Azure Sphere for Visual Studio
2. Azure Sphere SDK for Linux
3. CMake, Ninja
2B. Visual Studio Code
+Azure Sphere for VS Code
4. Visual Studio Code
+Azure Sphere for VS Code
https://docs.microsoft.com/en-us/azure-sphere/install/overview


# Page. 7

![Page Image](https://bcdn.docswell.com/page/3EKX8W1L7D.jpg)

③ Azure Sphere セキュリティサービス
1
1. マイクロソフトアカウントを登録
azsphere login –newuser &lt;email-address&gt;
Azure AD ディレクトリ
“azusers.onmicrosoft.com”
2
Azure Sphere テナント
2. Azure Sphere テナントを作成
azsphere tenant create –name &lt;my-tenant&gt;


# Page. 8

![Page Image](https://bcdn.docswell.com/page/L73521Q6E5.jpg)

④ Azure Sphere MCU
MT3620開発ボードJP(RDB)
$84.90
MT3620 Groveシールド
$15.90
MT3620開発キット
$49.00
MT3620イーサネットシールド
$18.90
MT3620ミニ開発ボード(MDB)
$34.90


# Page. 9

![Page Image](https://bcdn.docswell.com/page/87DDZX9M7G.jpg)

④ Azure Sphere MCU
Cactusphere
（アットーマークテクノ）
ConverIoT-ASC
（カウベルエンジニアリング）


# Page. 10

![Page Image](https://bcdn.docswell.com/page/VJPXDPZQ78.jpg)

開発の事前準備


# Page. 11

![Page Image](https://bcdn.docswell.com/page/2EVL12WPJQ.jpg)

クレーム
1
1. マイクロソフトアカウントを登録
azsphere login –newuser &lt;email-address&gt;
Azure AD ディレクトリ
“azusers.onmicrosoft.com”
2. Azure Sphere テナントを作成
azsphere tenant create –name &lt;my-tenant&gt;
2
3. Azure Sphere デバイスを
Azure Sphere テナントに登録 （クレーム）
Azure Sphere テナント
3
MT3620 RDB MT3620 RDB
azsphere device claim
(!) 重要
3.の操作は1回限り。クレームを取り消したり
別のAzure Sphereテナントに変更はできません。


# Page. 12

![Page Image](https://bcdn.docswell.com/page/57GX2RDQEL.jpg)

Azure Sphere OSの更新
1. デバイスの Azure Sphere OS を更新
azsphere device recover
USB
MT3620 RDB


# Page. 13

![Page Image](https://bcdn.docswell.com/page/4EQ8PV1WJP.jpg)

サイドロードの有効化
クラウドローディング
azsphere
1. サイドロードを有効化
AS3
Wi-Fi
image
package
サイドローディング
MT3620 RDB
USB
azsphere
azsphere device enable-development


# Page. 14

![Page Image](https://bcdn.docswell.com/page/KJ42YMR1E1.jpg)

コーディング


# Page. 15

![Page Image](https://bcdn.docswell.com/page/LE1M68Q57G.jpg)

新規作成 vs コピー
新規作成
コピー
Azure Sphere MT3620 の空白
azure-sphere-samples
AzureSphereMT3620BlankX
Azure Sphere の点滅
AzureSphereBlinkX
https://github.com/Azure/azure-sphere-samples
コンポーネントIDの変更
app_manifest.json
プロジェクト名の変更
app_manifest.json
CMakeLists.txt
ハードウェア定義のケア
CMakeLists.txt, …


# Page. 16

![Page Image](https://bcdn.docswell.com/page/GEW3WZMWE2.jpg)

開発言語 / ライブラリ
C言語
(-std=c11)
GCC
(8.2.0)


# Page. 17

![Page Image](https://bcdn.docswell.com/page/47ZV51Q2E3.jpg)

Azure Sphere の開発
パソコン
.c
AS3 … Azure Sphere セキュリティサービス
MT3620 RDB … MT3620 開発ボード
(Reference Development Board)
クラウドローディング
app_
mani
fest
azsphere
AS3
gcc
Wi-Fi
MT3620 RDB
app
USB
azsphere
image
package
azsphere
サイドローディング


# Page. 18

![Page Image](https://bcdn.docswell.com/page/YJ659LN67V.jpg)

開発言語 / ライブラリ
Azure Sphere SDK Application Libraries
デバイス固有のAPIs
デバッグメッセージ / Wi-Fi 設定, ...
GPIO / PWM / I2C / SPI, ...
アプリケーション
libapplibs
libazureiot
libc
libgcc_s
…
Azure IoT Device SDK for C
Azure IoT Hub / Azure IoT Centralへの接続
C POSIX library (musl libc)
GCC low-level runtime library


# Page. 19

![Page Image](https://bcdn.docswell.com/page/GJ5YN155J4.jpg)

ドキュメント
https://docs.microsoft.com/ja-jp/azure-sphere/


# Page. 20

![Page Image](https://bcdn.docswell.com/page/LE3521N5J5.jpg)

サンプルコード
https://github.com/Azure/azure-sphere-samples


# Page. 21

![Page Image](https://bcdn.docswell.com/page/8EDDZXWYEG.jpg)

困ったとき
https://docs.microsoft.com/en-us/answers/questions/topics/single/25320.html


# Page. 22

![Page Image](https://bcdn.docswell.com/page/V7PXDP92E8.jpg)

宣伝
https://www.slideshare.net/TakashiMatsuoka2
https://matsujirushi.hatenablog.jp/


# Page. 23

![Page Image](https://bcdn.docswell.com/page/2JVL12MX7Q.jpg)

やってみよう！


