Azure RTOS for Embedded Systems Development

Author

Reads 149

Close-up Photography of Smartphone Icons
Credit: pexels.com, Close-up Photography of Smartphone Icons

Azure RTOS is a real-time operating system designed for embedded systems development.

It's a popular choice among developers due to its high reliability and efficiency.

Azure RTOS supports a wide range of microcontrollers and microprocessors from leading manufacturers.

This flexibility allows developers to choose the best hardware for their specific project needs.

Azure RTOS provides a comprehensive set of APIs and tools for building and testing embedded systems.

These tools include a kernel, device drivers, and a file system, among others.

What Is Azure RTOS?

Azure RTOS is an enterprise-grade operating system specifically designed for IoT and edge devices. It's built to fit between Arduino and Raspberry Pi microcontroller units.

The main purpose of RTOS is to provide timely services and manage processor resources for safety-critical applications. This includes memory, peripherals, processor cycles, and interrupts.

Azure RTOS supports popular IoT devices that use 32-bit microcontrollers. It also comes with a development suite for embedded systems.

The operating system is designed to manage resource-constrained devices. These devices are often battery-powered and use less than 64 KB of flash memory.

Features and Benefits

Credit: youtube.com, Introduction to Azure RTOS

The Azure RTOS features a highly customizable deployment image that only bundles the services needed by your code. This allows for a streamlined and efficient development process.

The API is intuitive and consistent, making it easy to work with. Blocking APIs have optional thread timeouts, which can be useful in certain situations.

The Core Scheduler in Azure RTOS has no limits on the number of threads, making it a highly scalable solution. It also supports dynamic queue creation, semaphore creation, mutex creation, event flag group creation, block pool creation, byte pool creation, and timer creation.

Here are some of the key benefits of using Azure RTOS:

  • No limits on the number of threads, queues, semaphores, mutexes, event flag groups, block pools, byte pools, or timers.
  • Optional thread suspension when semaphore or mutex unavailable, with optional timeout on all suspension.
  • Dynamic creation of synchronization objects, such as queues, semaphores, mutexes, and event flag groups.
  • Fastest possible memory allocation and deallocation with dynamic block and byte pool creation.
  • No searching on timer activation or deactivation, with all timers driven from one hardware timer interrupt.

Features

Azure RTOS offers a powerful and flexible operating system for embedded systems. It's designed to scale across a range of hardware, with a customizable deployment image that only bundles the services needed by your code.

One of the key features of Azure RTOS is its intuitive and consistent API. This makes it easy to develop and integrate applications. The API is also blocking, with optional thread timeout, which helps prevent deadlocks and ensures that threads are properly synchronized.

Credit: youtube.com, Understanding Benefits Vs Features (Do You Know The Difference?)

The ThreadX picokernel at the heart of Azure RTOS is optimized for speed and switching between services. It's a real-time kernel, so there's no need to build applications that run from a basic control loop. Instead, the OS manages task switching between threads, using a priority-based scheduler for pre-emptive multitasking.

Azure RTOS offers a range of dynamic creation features, including dynamic queue creation, dynamic semaphore creation, and dynamic mutex creation. These features allow developers to create complex synchronization mechanisms without worrying about the underlying implementation details.

Here are some of the key features of Azure RTOS:

  • Dynamic queue creation
  • Dynamic semaphore creation
  • Dynamic mutex creation
  • Dynamic block pool creation
  • Dynamic byte pool creation
  • Dynamic timer creation

These features are designed to simplify development and improve performance. They allow developers to focus on the application logic, rather than worrying about low-level details like memory allocation and synchronization. With Azure RTOS, developers can create complex, high-performance applications with ease.

Two Answers

The function you are looking for is tx_queue_send(), with TX_NO_WAIT as third parameter.

Credit: youtube.com, Sell With Benefits | How To Turn Features Into Benefits

This function returns immediately regardless of whether the message queue is full or not.

Defines how the service behaves if the message queue is full, and the only valid option for non-threaded calls is TX_NO_WAIT.

TX_NO_WAIT results in an immediate return, which is essential for non-threaded calls like Initialization, timers, or ISRs.

Both tx_queue_send() and tx_queue_front_send() can be called from Initialization, threads, timers, and ISRs.

There is no restriction to use a special function if called from ISRs, unlike in FreeRTOS.

Things to Know Before Getting Started

With IoT and the number of IoT based devices being developed exponentially to harness the benefits, it becomes important to consider using RTOS in the near future.

The presence of a scheduler and the hardware management capability to produce a quick turnaround for running tasks, make RTOS a superior choice for IoT developers.

It's essential to consider using RTOS in your embedded project to take advantage of its benefits.

Credit: youtube.com, Introduction to Azure RTOS

Using RTOS can help you develop IoT devices that can handle tasks efficiently and effectively.

A scheduler is a crucial component of RTOS that helps manage tasks and resources, ensuring that your device runs smoothly and quickly.

RTOS is designed to handle hardware management, making it easier to develop and deploy IoT devices.

Developing with RTOS requires careful planning and consideration to ensure that your project runs smoothly and efficiently.

Azure RTOS is a popular choice for IoT developers due to its ability to handle complex tasks and manage resources effectively.

Components and Tools

Azure RTOS comes with a range of components that make development easier.

The components include a FileSystem, Network, Runtime Analysis, GUI, USBHost, and USBDevice – each designed to simplify specific aspects of the development process.

With these components, developers can focus on writing code without worrying about the underlying infrastructure.

Here's a list of the Azure RTOS components:

  • FileSystem
  • Network
  • Runtime Analysis
  • GUI
  • USBHost
  • USBDevice

This streamlined approach allows developers to write ThreadX code in their preferred development environment, such as NXP's microcontroller development environment, without needing third-party involvement.

See what others are reading: Azure Development

Pre-Certified

Crop hacker silhouette typing on computer keyboard while hacking system
Credit: pexels.com, Crop hacker silhouette typing on computer keyboard while hacking system

Azure RTOS is pre-certified for a number of safety standards, including IEC 61508 SIL 4, IEC 62304 Class C, and ISO 26262 ASIL D certifications.

This means system developers can save time and money by not having to provide 'artifacts' for the software involved in the system.

Using a pre-certified RTOS like Azure RTOS can speed up the certification process and reduce costs.

The platform also provides an EAL4+ Common Criteria security certified environment.

STM32 Classic CoreMW

STM32 Classic CoreMW is a collection of software stacks provided by STMicroelectronics. It includes the ST USB Device Library and ST USB Host Library, which are essential for USB functionality.

The ST OpenBL stack is also part of the Classic CoreMW, and it's available on the ST GitHub repository.

Here are some of the stacks and their corresponding examples and demos:

  • ST USB Device Library
  • ST USB Host Library
  • ST OpenBL

These stacks are supported by STM32CubeMX code generation and customization, making it easier to build your own application.

ThreadX Core Scheduler

Credit: youtube.com, All you need to know about ThreadX open sourcing

The ThreadX Core Scheduler is a powerful tool that's perfect for managing multiple threads in your system. It has a minimal footprint of 2KB FLASH and 1KB RAM.

This scheduler is incredibly fast, with context-switch times measured in sub-microseconds. It's also fully deterministic, meaning it will always behave the same way regardless of how many threads you're running.

One of the key features of the ThreadX Core Scheduler is its priority-based, fully preemptive scheduling. This means that higher-priority threads will always get executed before lower-priority ones.

You have 32 default priority levels to choose from, but you can optionally increase this to 1024 levels if you need more flexibility. Cooperative scheduling within priority levels uses a FIFO (First-In-First-Out) approach to ensure fairness.

The scheduler also includes preemption-threshold technology, which helps prevent priority inversions and ensures that higher-priority threads always get the resources they need.

Here are some of the key features of the ThreadX Core Scheduler:

  • Minimal 2KB FLASH, 1KB RAM footprint
  • Fast, sub-microsecond context-switch
  • Fully deterministic regardless of number of threads
  • Priority-based, fully preemptive-scheduling
  • 32 default priority levels, optionally up to 1024 levels
  • Cooperative scheduling within priority level (FIFO)
  • Preemption-threshold technology

The ThreadX Core Scheduler also offers optional timer services, including per-thread time-slices and timeouts on blocking operations.

The NetX Library

Close Up Photo of Programming of Codes
Credit: pexels.com, Close Up Photo of Programming of Codes

The NetX library is designed to work with the ThreadX kernel, which is ideal for deeply embedded applications that require network connectivity.

It ensures IoT devices can send data to services like Azure IoT smoothly, making it a reliable choice for businesses.

This library is best for IPv4 connections, but if you're planning to deploy thousands of devices, you might want to consider an alternative networking stack that supports IPv6.

IPv4 addresses are limited, and scaling with them can be expensive, so it's worth considering a newer stack for large deployments.

Gui Option

Azure RTOS has a GUI option that makes it more useful for devices that need to interact with users. This GUI option is designed to provide reliable and ultra-fast performance.

Azure RTOS GUIX Studio is a tool that allows embedded developers to design the UI on a system using Azure RTOS. This studio generates appropriate C code on the basis of the input design.

Gold Circuit Board in Close-up Photography
Credit: pexels.com, Gold Circuit Board in Close-up Photography

The GUI option is particularly useful for industries like medical and automotive, where a UI adds rich visualization to those applications. Azure RTOS is pre-certified for these industries, making it a great choice for developers who need to create user-friendly interfaces for their devices.

Azure RTOS GUI option includes several components, such as:

  • FileSystem
  • Network
  • Runtime Analysis
  • GUI
  • USBHost
  • USBDevice

These components work together to provide a comprehensive GUI solution for Azure RTOS devices.

Working with Microcontrollers

Working with microcontrollers is a breeze with Azure RTOS. Its architecture is designed to be easy to port to new silicon architectures.

ThreadX's architecture makes it simple to switch between different microcontrollers. This is especially true with Microsoft's new distribution policy for Azure RTOS.

With this policy, Azure RTOS is delivered as a first-class citizen, with hardware support from top vendors like Qualcomm, Microchip, and NXP.

Developers now have the freedom to choose a platform that meets their requirements. NXP's SDKs will add hardware-specific features, making it a much simpler way to develop.

Credit: youtube.com, A Beginner's Guide to Microcontrollers

You can write your ThreadX code in NXP's MCUXpresso development environment instead of using Microsoft developer tools. This integration makes it seamless to work with Azure RTOS and NXP's microcontrollers.

NXP provides sample code for specific devices, showing how to build both local and network-connected applications. This includes applications for Azure, AWS, and Google Cloud.

By using Azure RTOS, you can take advantage of its modular design and ship more complex devices with its graphic library or Azure IoT integration features. This can be a game-changer for devices that require high performance at a relatively low cost.

Additional reading: Azure Integration

Operating System and Ecosystem

Azure RTOS offers a comprehensive operating system and ecosystem for developers. It's a professional-grade, highly reliable, and market-proven middleware suite that includes an integrated and full-featured RTOS, industrial-grade networking stack, advanced Flash file system, and USB Host and Device stacks.

The operating system is designed to support tiny, smart, connected devices and is available as a software STM32Cube Expansion Package or directly integrated within the matching STM32Cube MCU Package. This means developers can leverage the rich services of Azure RTOS alongside the extensive STM32Cube ecosystem.

Worth a look: Azure Ecosystem

Credit: youtube.com, Azure RTOS and STM U5 Security

Azure RTOS benefits from many additions made by STMicroelectronics, including the ability to use Azure RTOS MW with some level of configurability directly within STM32CubeMX, and the addition of many examples for standard evaluation boards from STMicroelectronics. This reduces the learning curve and ensures a smooth application development experience with Azure RTOS and STM32 MCUs.

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

Here are some of the key features of Azure RTOS:

  • Integrated and full-featured RTOS (ThreadX)
  • Industrial-grade networking stack (NetX Duo)
  • Advanced Flash file system (FileX) and Flash translation layer (FTL) (LevelX)
  • USB Host and Device stacks (USBX)
  • Safety pre-certifications (IEC 61508 SIL4, IEC 62304 Class C, and ISO 26262 ASIL D)
  • Security pre-certifications (EAL4+ for TLS/DTLS and FIPS 140-2 for software cryptographic library)

Operating System

Microsoft's operating system family has expanded to cater to various devices and needs. The company's collection of operating systems now scales from the smallest devices to hyperscale clouds.

Azure RTOS, a professional-grade, highly reliable, and market-proven middleware suite, is a strong addition to Microsoft's edge computing capabilities. It's now powering more than 6.2 billion devices worldwide.

Credit: youtube.com, The Complete Operating Systems Iceberg Explained

Azure RTOS offers an integrated and full-featured RTOS, industrial-grade networking stack, advanced Flash file system, and USB Host and Device stacks. These features make it suitable for devices that need more than firmware but less than a full Azure Sphere-like Linux.

The growth of sensors and IoT-based devices has led to a massive demand for operating systems like Azure RTOS. According to Business Insider Intelligence, there will be around 41 billion connected devices online by 2027.

Azure RTOS has started to gain traction from silicon vendors, and its adoption is expected to increase as the demand for IoT devices grows. The operating system is designed to support devices that fit between Arduino and Raspberry Pi in terms of complexity.

Azure RTOS is complemented by the extensive STM32Cube ecosystem, providing free development tools, software bricks, and software Expansion Packages. This makes it easier for developers to create and deploy connected devices.

Here's a brief overview of Azure RTOS's features and capabilities:

  • Integrated and full-featured RTOS
  • Industrial-grade networking stack
  • Advanced Flash file system and Flash translation layer
  • USB Host and Device stacks
  • Safety pre-certifications (IEC 61508 SIL4, IEC 62304 Class C, and ISO 26262 ASIL D)
  • Security pre-certifications (EAL4+ for TLS/DTLS and FIPS 140-2 for software cryptographic library)

STM32Cube Ecosystem

Credit: youtube.com, Tutorial 4: In-Depth explanation of STM32CUBEMX ecosystem

The STM32Cube ecosystem is a powerful tool for developers working with STMicroelectronics' STM32 microcontrollers. It's designed to make development easier and more efficient.

Azure RTOS integration is planned as a software STM32Cube Expansion Package, enhanced for the STM32 Toolset. This means you can use Azure RTOS MW with some level of configurability directly within STM32CubeMX.

Many examples for standard evaluation boards from STMicroelectronics are included, such as STM32 Nucleo, Discovery kits, and Eval boards. This reduces the learning curve and ensures a smooth application development experience with Azure RTOS and STM32 MCUs.

Here are some key features of Azure RTOS integration in the STM32Cube ecosystem:

  • Ability to use Azure RTOS MW with some level of configurability directly within STM32CubeMX
  • Addition of many examples for standard evaluation boards from STMicroelectronics
  • Addition of material helping with migration effort
  • Addition of training material

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

Frequently Asked Questions

What is Azure GUIX?

Azure GUIX is a Windows application for designing user interfaces for embedded devices. It uses the GUIX library to create layouts for a wide range of hardware devices.

Patricia Dach

Junior Copy Editor

Patricia Dach is a meticulous and detail-oriented Copy Editor with a passion for refining written content. With a keen eye for grammar and syntax, she ensures that articles are polished and error-free. Her expertise spans a range of topics, from technology to lifestyle, and she is well-versed in various style guides.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.