Prerequisites - JawaharT/Best-Practices-On-Azure-Sphere GitHub Wiki

What is an Azure Sphere?

Azure Sphere Platform Components

Azure Sphere is an embedded system platform developed by Microsoft for IoT development. The platform is built on a security-first approach, the Azure Sphere components are listed here:

  • Microcontroller unit (MCU)
  • Security Service for Authentication, Update, and Failure Reporting
  • Operating System

MCU Architecture

MCU Architecture

  • Pluton for the security subsystem
  • Application Processor: ARM Cortex-A for low power use, such as running the OS
  • 16MB of Flash Memory
  • Greater than 4MB of SRAM
  • Wi-Fi connectivity for cloud support
  • ARM Cortex-M for real-time processing
  • I/O firewalls separating each component
  • Multiplexed I/O for hardware connected via Grove or Click Connectors

Operating System

OS Layers

Microsoft manages security updates, so developers only must focus on building the system.

What are the different boards available on the Azure Sphere Platform?

There are multiple different PCB boards available to get started such as Version 1 and 2 of the AVNET MT3620 SOC as well as the two types of development boards.

MT3620 Starter Kit Board

MT3620 Starter Kit

Dev Board

Dev Board

Mini Dev Board

Mini Dev Board

How to set up an Azure Sphere Board?

The setup steps are available here: Azure Sphere claim of device

Azure Sphere Beginner Basics

Azure Sphere projects are built using the CMake build system.

What is CMake?

CMake is a cross-platform open-source software for build automation of compiler-independent systems. It is used to control the software compilation process using the compiler-independent configuration files and generate makefiles for the compiler environment of Azure Sphere. It is traditionally used to build files for systems that do not run typical operating systems such as Windows, Linux, or macOS.

What is the structure of an Azure Sphere high-level application?

In any Azure Sphere application, it is important to include these files:

File Purpose
CMakeLists.txt Defines instructions for source files to be placed inside project root directory
launch.vs.json Defines debugger which generated during launch
app-manifest.json It is a list that contains the hardware components (e.g. I2C and GPIO) and the list of endpoints for board communication
CMakeFiles Defines Azure Sphere extensions to CMake
CMakeCache.txt A configuration file created as a result of the build from CMakeLists.txt

What are .c and .h files?

C files contain the source code written by the developer whereas h files are prewritten for the compiler (i.e, contain no source code and only have function prototypes, type definitions, define statements that are used in its corresponding c file).

What happens after "Start with debugging" is enabled?

  • Project is built using CMakeLists.txt to create the files for Azure Sphere to run
  • CMake decides if a new build is necessary if so, the result can be seen in the output window
  • A new .imagepackage file with a unique image ID is created, which is the combination of the metadata of the build process and Docker image
  • Output can then be displayed inside the IDE Debug Console window i.e, Log_Debug or snprintf comments can also be viewed

What happens after "Start without debugging" is enabled?

  • The same process as "Start with debugging" occurs
  • Next, the application runs automatically without the Debug Console Window