Azure RTOS is a comprehensive suite of multithreading facilities, middleware and Windows tools for developing embedded IoT applications. It features Azure RTOS ThreadX, a small, fast, reliable real-time operating system that is already powering more than 6.2 billion devices worldwide. Most of the volume are components in smart phones, cellular modems, WiFi, Bluetooth, GPS, etc.
Now Azure RTOS is integrated into MCUXpresso SDK2.8.5 and is available from our SDK builder site (https://mcuxpresso.nxp.com) and also directly from MCUXpresso IDE. Support is currently available for i.MX RT1050, i.MX RT1060 and i.MX RT1064 MCUs.
Please select Azure RTOS before you download it.
Below picture is the code structure of evkmimxrt1064_threadx_demo. Azure RTOS kernel is provided as a library, libthreadx.a. You can import the evkmimxrt1064_threadx_lib to generate this library.
Tx_initialize_low_level.S : an assembly file that contains the low level initialization for ThreadX. The primary function of this file is to set up the System Tick handler, which controls the internal timing of ThreadX.
Tx_user.h configuration options.
Options defined in tx_user.h are applied only if the application and ThreadX library are built with TX_INCLUDE_USER_DEFINE_FILE defined.
The Thread_demo.c file contains the application entry point main(). This function is responsible for the following:
Entering the ThreadX kernel
Initializing the board
Start the main application thread
Create a ThreadX application
There are four steps required to build a ThreadX application
Include the tx_api.h file in all application files that uses ThreadX services or data structures.
Create the standard C main function. This function must eventually call tx_kernel_enter to start ThreadX.
Tx_kernel_enter: The entry function coordinates initialization of various ThreadX data structures and then call the application’s definition function tx_application_define.
Create the tx_application_define function. It executes after the basic ThreadX initialization is complete. It is responsible for setting up all of the initial system resources, including threads, queues, semaphores, mutexes, event flags, and memory pools.
After tx_application_define completes, control is transferred to the thread scheduler and from there to each individual thread.
The small Example system is as below picture shows.