Understanding Azure RTOS (ThreadX) for Embedded Applications

Getting straight to the point:

Azure RTOS (ThreadX) is a high-performance real-time operating system (RTOS) designed specifically for embedded applications.

So, what is a real-time operating system:
A real-time operating system is one that serves real-time running objects, with the English name real-time operating system, abbreviated as RTOS. RTOS aimed at MCU or microcontrollers is generally also referred to as an embedded real-time operating system. RTOS is a type of system software that can provide services for applications and manage the hardware resources of microcontroller, including memory, peripherals, and interrupts. The main purpose of a real-time operating system is to allocate processing time for various tasks that need to be executed.

Understanding Azure RTOS (ThreadX) for Embedded Applications

There are many real-time operating systems, which can be further divided into RTOS aimed at MPU (or referred to as CPU) and RTOS aimed at MCU.

Understanding Azure RTOS (ThreadX) for Embedded Applications

The former MPU (micro processing unit) generally refers to powerful microprocessors commonly found in high-performance controllers, tablets, smartphones, routers, etc. The latter MCU (micro control unit) currently common microcontrollers are generally 32-bit MCUs with frequencies ranging from tens to hundreds of MHz. Well-known MCU chip manufacturers include ST (STM32 series), NXP, etc. The domestic manufacturer GigaDevice has emerged strongly. Based on different processing performances, the operating systems also vary.
  • Common MPU real-time operating systems include: VxWorks, QNX, Embedded Linux, etc.

  • Common MCU real-time operating systems include: FreeRTOS, ThreadX, RT-Thread, MbedOS, Huawei Lite OS, Zephyr, etc.

As the cost-performance ratio of MCU products continues to improve, the distinction between MCU and CPU products is no longer clear, and heterogeneous integration will be a new product development feature.

Understanding Azure RTOS (ThreadX) for Embedded Applications

After all this, where does ThreadX stand in the RTOS landscape? Is it in the C position?

First, let’s look at a “quoted” image (the image is not very clear). This image lists the market share of mainstream RTOS in 2019.From the image, we can see that FreeRTOS has the largest share among MCU RTOS, while ThreadX only accounts for 3%. This report is from 2019, so the image still refers to ExpressLogic (ThreadX).

Understanding Azure RTOS (ThreadX) for Embedded Applications

Let’s take a look at the development of Azure RTOS in recent years:

  • In 2019, Microsoft acquired ThreadX embedded real-time operating system for a large sum, and then, in 2020, open-sourced Azure RTOS ThreadX.

  • In December 2021, Microsoft released an IDE based on VS 2022 that supports embedded RTOS and MCU software development.

  • In March 2022, Microsoft released the Embedded Tools plugin based on VS Code (last year was VS 2022), supporting Azure RTOS and FreeRTOS operating systems.

Azure RTOS VS FreeRTOS

  • FreeRTOS is free and open source. Many embedded software engineers embraced FreeRTOS in its early days, gaining a large user base thanks to its open-source and free nature. Azure RTOS, while open-sourced, is not completely free. See the description in its “License” statement below; based on the provided “hardware” list, MCUs can be free for commercial development. However, this “hardware” list already includes some mainstream MCUs.

DISTRIBUTION AND PRODUCTION USE. If you have obtained and/or are developing on microprocessor(s) and/or microcontroller(s) (“hardware”) listed in the file named “LICENSED-HARDWARE.txt” included in the repository and/or distributed with the software you have the following rights in and to the software solely when used in combination with the hardware. In the event hardware is not listed in the LICENSED-HARDWARE.txt file, you do not have the rights in this Section 2.
STMicroelectronics:    STM32 MCUs    STM32 MPUs MediaTek:    MT3620 MCU (Azure Sphere) Microchip:    PIC 32-bit MCUs    SAM 32-bit MCUs    SAM 32-bit MPUs NXP:    i.MX RT10xx and RT116x/7x series crossover MCUs    LPC5500 series Renesas:    Synergy Platform    RX Family of MCUs    RA Family of MCUs    RZ Family of MPUs
  • Compared to FreeRTOS, Azure RTOS has a richer set of components, known as a full family bucket. Although FreeRTOS has enriched its components after being acquired by Amazon, it still lacks many components compared to Azure RTOS. Azure RTOS’s components almost cover the conventional components of embedded RTOS:

  * Azure RTOS ThreadX  * Azure RTOS NetX  * Azure RTOS NetX Duo  * Azure RTOS FileX  * Azure RTOS GUIX  * Azure RTOS GUIX Studio  * Azure RTOS USBX  * Azure RTOS TraceX  * ······

ThreadX Technical Highlights

Below are the highlights of ThreadX’s advanced technology.
  • Simple picokernel architecture

  • Automatic expansion (occupies less space)

  • Deterministic processing

  • Fast real-time performance

  • Preemptive and cooperative scheduling

  • Flexible thread priority support

  • Dynamic system object creation

  • Unlimited system objects

  • Optimized interrupt handling

  • Preemption-threshold™

  • Priority inheritance

  • Event-chaining™

  • Fast software timers

  • Runtime memory management

  • Runtime performance monitoring

  • Runtime stack analysis

  • Built-in system tracing

  • Wide processor support

  • Wide development tool support

  • Byte order completely neutral

If you want to talk about highlights, take a look at the manuals of other mainstream RTOS. Aside from the full family bucket feature, the above-listed highlights are basically “ordinary”. Except for…

ThreadX Modules

The ThreadX module components provide an infrastructure for applications to dynamically load modules built independently of the application’s resident parts. This feature is particularly useful when the application code size exceeds the available memory. It can also help when new features need to be added after deploying the core image. Additionally, dynamic loading modules can be used when partial firmware updates are needed.

Understanding Azure RTOS (ThreadX) for Embedded Applications

The next article will cover how to implement dynamic loading libraries in ThreadX.

https://learn.microsoft.com/en-us/azure/rtos/threadx-modules/chapter1
https://learn.microsoft.com/en-us/azure/rtos/threadx/overview-threadx

Leave a Comment

×