Read the blog post announcing the new partnership between ST and Microsoft around STM32 and Azure RTOS
To improve the accessibility of our content, please find the audio version of this blog post.
X-CUBE-AZRTOS-H7 is the latest chapter in the story that brought Azure RTOS and STM32 MCUs together. The STM32Cube Expansion package, available on GitHub, is out of beta today, and is fully compatible with STM32CubeMX. As a result, engineers can configure its middleware stacks within STM32CubeMX’s graphical user interface, which further integrates Azure RTOS into the STM32 ecosystem and lowers the barrier to entry.
The package is also unique because it includes a lot more application examples than what developers traditionally get with these sorts of solutions. In this instance, the application examples will help developers jumpstart their project on STM32H7 MCUs. For instance, the new solution offers applications revolving around FileX, NetXDuo, ThreadX, and USBX. It is thus one of the most comprehensive integrations of Azure RTOS middleware in the industry. Additionally, it’s a way to help developers experiment with them in minutes. The demos found in the expansion package currently target the NUCLEO-H723ZG board, the STM32H735G-DK or STM32H747I-DISCO Discovery Kits, and the STM32H743I-EVAL evaluation board.
X-CUBE-AZRTOS-H7: Running a Demo Application in 3 Clicks
Exploring an RTOS’s middleware is a daunting task, and X-CUBE-AZRTOS-H7 doesn’t pretend otherwise. However, it does enable developers to run demo applications so quickly and study source codes so easily that it can greatly improve workflows. For instance, it’s possible to run ST’s Tx_FreeRTOS_Wrapper demo in just three clicks. After connecting an STM32H735G-DK to a PC:
- In STM32CubeIDE, select File -> Import, and then
Existing Projects into Workspace.
- In the root directory, choose the folder
- The last step consists of right-clicking on the project that appeared in the Project Explorer, then choosing Debug As -> STM32 Cortex-M C/C++ Application. If a configuration pane appears, clicking OK will suffice.
STM32CubeIDE will build the project and flash it onto the Discovery Kit. The demo is working if the red light at the back of the board suddenly flashes rapidly between green and red.
X-CUBE-AZRTOS-H7: Learning How to Migrate From FreeRTOS to Azure RTOS
The reward for developers is what comes next. The Tx_FreeRTOS_Wrapper demo teaches how to take advantage of ThreadX when coming from FreeRTOS. ThreadX reduces context switching and helps manage thread priorities to optimize performance. However, developers only familiar with FreeRTOS may find the concept a bit disorienting. The demo, therefore, exposes an adaptation layer that defines a thread handled by ThreadX, and shows how to use it. Engineers migrating from FreeRTOS to Azure RTOS can, therefore, benefit from a familiar concept and move to Microsoft’s operating system more efficiently. The application also serves as a testament to ST’s desire to help developers transition to Microsoft’s platform.
X-CUBE-AZRTOS-H7 also serves as an object lesson. Once the demo is running, the main.c file appears within STM32CubeIDE’s debug window, so developers can see it running. It thus shows how the application calls the
tx\_application\_define() function in the
app_tx_freertos.c files to create the
LEDThread\_Entry thread at startup. Hence, X-CUBE-AZRTOS-H7 represents a new solution for teams looking to reduce their time to market by obtaining a production-ready code faster. Moreover, the X-CUBE expansion package serves as a precursor to the other software solutions ST will release for Azure RTOS in the future.