Last edited 5 months ago

Introduction to Azure RTOS® with STM32


Applicable for STM32MP13x lines

1 Azure RTOS® scope inside STM32 middleware[edit source]

STMicroelectronics offers a complete, proven, and reliable MPU software solution for developers. It covers low layers, middleware, and applicative sides, as well as configuration, programming, monitoring and debugging tools.

Core Middleware Components

The STM32 middleware solution is constructed around Microsoft® Azure® RTOS middleware and other in-house (ST USB). All are integrated and customized for STM32 MPU devices and enriched with corresponding application examples based on STM32 evaluation boards.


Introduction to THREADXIntroduction to USBXIntroduction to FILEXIntroduction to NETXDUOIntroduction to LEVELX
Core middleware components

ST USB Stacks are known as Classic CoreMW.

2 Azure® RTOS[edit source]

Azure® RTOS is a professional grade, highly reliable and market proven middleware suite:

  • Integrated and full featured RTOS. Learn more about ThreadX[1].
  • Industrial grade networking stack: optimized for performance coming with many IoT protocols. Learn more about NetX Duo[2].
  • Advanced Flash file system (FS) / Flash translation layer (FTL): fully featured to support NAND/NOR Flash memories. Learn more about FileX[3] and LevelX[4]
  • USB Host and Device stacks coming with many classes. Learn more about USBX[5].
  • Safety pre-certifications (from MSFT): IEC 61508 SIL4, IEC 62304 Class C and ISO 26262 ASIL D
  • Security pre-certifications (from MSFT): EAL4+ for TLS/DTLS, FIPS 140-2 for software cryptographic library

With Azure® RTOS complementing the extensive STM32Cube ecosystem providing free development tools and software bricks, STM32 users can also leverage the rich services of Azure® RTOS, which meet the needs of tiny, smart, connected devices.

More information relative to general STM32Cube offer can be found on the STMicroelectronics website.

2.1 Azure® RTOS integration in the STM32Cube ecosystem[edit source]

Azure® RTOS is integrated in software STM32Cube Package enhanced for the STM32 Toolset along with applications for Discovery Kits.

Integrated within STM32Cube, Azure® RTOS benefits from many additions done by STMicroelectronics:

  • Addition of many examples for standard development kits from STMicroelectronics: STM32 Discovery kits and Eval boards, thus, reducing the learning curve and ensuring a smooth application development experience with Azure® RTOS and STM32 MPUs.
  • Addition of material helping with migration effort
  • Addition of training material
MPUAzureRTOSOverview.png


ThreadX is required to implement FileX, LevelX, NetX Duo or USBX.

Azure® RTOS middleware stacks are also interdependent. In fact, some USBX Host classes are using the FileX APIs, while other USBX device classes require the NetX Duo APIs. LevelX is used by FileX to support file system on NAND and NOR memories.

Azure RTOS Interdependencies


The Azure® RTOS APIs are hardware agnostic, they run seamlessly on all supported hardware and peripherals. Each middleware has its own low-level driver to support specific hardware peripherals. These drivers are implemented using the HAL and BSP drivers to ensure portability among different STM32 Series and boards.

Azure RTOS Interactions


2.2 Azure® RTOS License[edit source]

Azure® RTOS is distributed by Microsoft under their own GitHub[6]. STMicroelectronics include Azure® RTOS in some STM32Cube MPU Packages. Whether delivered by Microsoft under GitHub, or by STMicroelectronics through STM32Cube packages on STMicroelectronics website[7] or GitHub, proprietary license terms are the same between Microsoft and the user.

  • Source code is available
  • User is granted modification
  • User is granted redistribution of source (modified or not) and/or binary, provided the development is performed on an MPU that is listed officially by Microsoft
  • User is granted production, provided the development is performed on an MPU that is listed officially by Microsoft
  • User is forbidden to reuse provided software to create a competing offer

2.3 Where to get Azure® RTOS?[edit source]

Azure® RTOS for STM32 is distributed by STMicroelectronics on different channels to adapt to the different needs and profiles of STM32 users. Azure® RTOS is delivered as part of STM32CubeMPU_Package, refer Installing the STM32CubeMPU Package article for installing it.

2.4 How to use Azure® RTOS package?[edit source]

Refer Integrating AzureRTOS middleware article to know more.

2.5 Azure® RTOS applications[edit source]

Multiple functional applications are provided in STM32Cube MPU Package for Azure® RTOS stacks. Visit the page dedicated to each Azure® RTOS stack for more details about available applications.

2.6 License[edit source]

Refer STM32CubeMP13 Licenses page for all License related information.

3 FAQ[edit source]

  • Q: What are the STM32 MPU Lines covered by Azure® RTOS middleware?
  • A: All STM32MP13x lines More info.png are covered by default by Azure® RTOS middleware within the matching STM32Cube MPU packages. Older STM32 MPU series will not be updated with Azure® RTOS support.
  • Q: Will I be able to use Azure® RTOS for my commercial applications for free?
  • A:Yes, in compliance with the corresponding license terms.
  • Q: Will I be able to make modifications to Azure® RTOS to tailor my STM32 application to my needs or fix bugs myself?
  • A: Yes, in compliance with the corresponding license terms.
  • Q: Is there any difference between getting the Azure® RTOS for STM32 from STMicroelectronics website[7], from STM32CubeMX[8]/ STM32CubeIDE[9], or from STMicroelectronics GitHub?
  • A: The only difference is that packages on GitHub and STM32 Package have applications with Azure® RTOS middleware components and currently with STM32CubeMX[8] it is not possible to configure and generate code for Azure® RTOS Middleware components.
  • Q: Is Azure® RTOS usable with STM32CubeMX[8] configuration and generation tool?
  • A: No, currently it is not supported by STM32CubeMX.
  • Q: I would like to migrate my application to Azure® RTOS from the current STM32Cube middleware offer. How to do it in the easiest way?
  • A: Azure® RTOS middleware and current STM32Cube middleware differ by their respective features, performance and footprint figures. Migration effort will depend on the middleware you were using:
    • FreeRTOS™: migration will be made easy via a FreeRTOS™ API layer built on top of ThreadX, and provided by Microsoft, or by using ThreadX CMSIS-RTOS wrapper provided by STMicroelectronics.
    • NetX Duo: migration will be easier if you used Socket API, both available on the two stacks
    • USBX and FileX: switch to new APIs will have to be implemented
    • STMicroelectronics plans some documentation highlighting differences and features comparison with possible correspondence between current middleware and Azure® RTOS
  • Q: Are STMicroelectronics or Microsoft legally liable for the Azure® RTOS code distributed in STM32Cube?
  • A: Same as for the current STM32Cube offer, software is provided as-is.
  • Q: What is the technical support scheme of Azure® RTOS for STMicroelectronics customers?
  • A: STMicroelectronics ensure first level of support on Azure® RTOS middleware components, as provided within STM32Cube software packages. Customers may also enter licensing arrangements directly with Microsoft, including, but not limited to, certifications and standards (such as SIL 4, IEC 61508) and dedicated support.
  • Q: For my STM32-based IoT application, am I forced to use Azure® Cloud services, or could I still connect to AWS or Aliyun?
  • A: There is no such enforcement, and an STM32 customers remain completely free to choose their favorite cloud providers.
  • Q: Is the CMSIS-RTOS wrapper supported by ThreadX ?
  • A: Yes, the CMSIS-RTOS v2 wrapper is supported and allows easier applications migration to ThreadX from other RTOS. Note that CMSIS-RTOS v2 is the default option in STM32CubeMX.
  • Q: How many STM32 Azure® RTOS applications are using CMSIS-RTOS V2 wrapper ?
  • A: One ThreadX application is provided with CMSIS-RTOS v2 layer to show how to use it.
  • Q: What are other options available to migrate from FreeRTOS™ ?
  • A: There is one option of using CMSIS-RTOS v2 layer and one other option of using Azure® RTOS FreeRTOS™ wrapper layer provided by Microsoft.
  • Q: Which boards are supported by the Azure® RTOS package provided by STMicroelectronics ?
  • A: Specific boards are supported for each application (typically one Discovery board supported for each application) due to project configuration constraints. In order to support custom boards, modifications must be applied to the project source files.
  • Q: Is TraceX supported ?
  • A: TraceX is not included in the STM32 package. But users can download it from Microsoft GitHub repository and integrate it in their projects.
  • Q: Is GUIX supported ?
  • A: GUIX is not included in the STM32 package. But users can download it from Microsoft GitHub repository and integrate it in their projects.
  • Q: How can I find online trainings to help me to use Azure® RTOS middleware?
  • A: STMicroelectronics provides online training sessions and video. Visit STMicroelectronics website[7] for more details.
  • Q: What are the export classifications for Azure® RTOS components?
  • A: Microsoft represents and warrants that, to the best of Microsoft’s knowledge, the Azure® RTOS software Items are not subject to US Export Administration Regulation (EAR), based on the fact that these software items are “Published” within the meaning of section 734.7 and section 742.15(b)(2) of the EAR regulation.
  • A: The ST packages that incorporate the Azure® RTOS components containing cryptography are classified EU ECCN: NEC and US ECCN: 5D992.c. They are not subject to the US EAR.
  • Q: Will I be able to use Azure® RTOS for my commercial applications for free?
  • A: Yes, in compliance with the corresponding license terms.
  • Q: I am using Keil’s RTX, SEGGER’s emUSB… i.e. another third-party middleware that runs on STM32. Is there any impact for me?
  • A: There is absolutely no impact. Customers can of course continue using their favorite 3rd party middleware.
  • Q: Where is it possible to find the list of Security vulnerabilities related to Azure® RTOS middleware?
  • A: Any Security Vulnerability related to Azure® RTOS is logged in Microsoft Security Response Center page[10].

4 References[edit source]