{{Short description|Real-time operating system}} {{Infobox OS |name = Eclipse ThreadX |logo = Eclipse ThreadX logo.png{{!}}class=skin-invert |logo size = |screenshot = |caption = |developer = Express Logic (original)<br/>Microsoft (former)<br/>Eclipse (current) |family = |working state = Current |source model = Open source |released = {{Start date and age|1997}} |latest release version = 6.4.1<ref>{{Cite web|url=https://github.com/eclipse-threadx/threadx/releases/tag/v6.4.1_rel|title = Releases · eclipse-rtos/Threadx|website = GitHub}}</ref> |latest release date = {{Start date and age|2024|02|28}} |marketing target = Embedded systems, IoT |programmed in = C |language = |update model = Re-install |package manager = None |supported platforms = ARC, ARM, Blackfin, CEVA, C6x, MIPS, NXP, PIC, PowerPC, RISC-V, RX, SH, SHARC, TI, V850, Xtensa, x86, Coldfire, others |kernel type = Embedded, deterministic, real-time microkernel, picokernel |userland = |ui = Embedded UI support (GUIX) |license = MIT License (as of 2023) }}

'''ThreadX''' is an embedded real-time operating system (RTOS) programmed mostly in the C language. It was originally released in 1997 as '''ThreadX''' when Express Logic first developed it, later it was renamed to '''Azure RTOS''' (2019) after Express Logic was purchased by Microsoft,<ref name="Forbes-20190421"/> then most recently it was renamed again to '''Eclipse ThreadX''' (2023), or "ThreadX" in its short form, after it transitioned to free open source model under the stewardship of the Eclipse Foundation.<ref name="MS-20231121"/>

==History== In 1997, '''ThreadX''' was first released and marketed by Express Logic of San Diego, California, United States. It was developed by William Lamie,<ref name="Embedded-20100903">{{cite web |title=Bill Lamie: Story of a man and his real-time operating systems |url=https://embedded.com/design/operating-systems/4207336/Bill-Lamie--Story-of-a-man-and-his-real-time-operating-systems |publisher=Embedded.com |archive-url=https://web.archive.org/web/20160702142215/https://embedded.com/design/operating-systems/4207336/Bill-Lamie--Story-of-a-man-and-his-real-time-operating-systems |archive-date=July 2, 2016 |date=September 3, 2010 |url-status=dead}}</ref> who was also the original author of Nucleus and PX5 RTOS, and was president and CEO of Express Logic. ThreadX version 4 was introduced in 2001, version 5 was introduced in 2005, and then version 6 was introduced in 2020 (the latest major version). FileX – the embedded file system for ThreadX was introduced in 1999. NetX – the embedded TCP/IP networking stack for ThreadX was introduced in 2002. USBX – the embedded USB support for ThreadX was introduced in 2004. ThreadX SMP for SMP multi-core environments was introduced in 2009. ThreadX Modules was introduced in 2011. ThreadX achieved safety certifications for: TÜV IEC 61508 in 2013, and UL 60730 in 2014. GUIX – the embedded UI for ThreadX was introduced in 2014.

On April 18, 2019, Microsoft purchased Express Logic for an undisclosed sum and it was renamed to '''Azure RTOS'''.<ref name="Forbes-20190421">{{cite news |title=How Does The Express Logic Acquisition Help Microsoft And The IoT Ecosystem |url=https://www.forbes.com/sites/janakirammsv/2019/04/21/how-does-the-express-logic-acquisition-help-microsoft-and-the-iot-ecosystem/ |work=Forbes |date=April 21, 2019 |archive-url=https://web.archive.org/web/20230211175406/https://www.forbes.com/sites/janakirammsv/2019/04/21/how-does-the-express-logic-acquisition-help-microsoft-and-the-iot-ecosystem/ |archive-date=February 11, 2023 |url-status=live}}</ref>

On November 21, 2023, Microsoft announced Azure RTOS would be transitioning to an open source model under the stewardship of the Eclipse Foundation, and making the project available under the permissive MIT License.<ref name="MS-20231121">{{cite web |title=Microsoft Contributes Azure RTOS to Open Source |url=https://techcommunity.microsoft.com/blog/iotblog/microsoft-contributes-azure-rtos-to-open-source/3986318 |website=Microsoft |archive-url=https://web.archive.org/web/20241123064136/https://techcommunity.microsoft.com/blog/iotblog/microsoft-contributes-azure-rtos-to-open-source/3986318 |archive-date=November 23, 2024 |date=November 21, 2023 |url-status=live}}</ref> With Eclipse Foundation as the new home, Azure RTOS was renamed to '''Eclipse ThreadX''', or "ThreadX" in its short form.

==Overview== {{more citations needed section|date=January 2025}} The name ThreadX refers to the threads used as the executable elements, with ''X'' representing context switching.

ThreadX provides priority-based, pre-emptive scheduling; fast interrupt response; memory management; interthread communication; mutual exclusion; event notification; and thread synchronization features. Major distinguishing technological characteristics of ThreadX include a preemption-threshold, priority inheritance, efficient timer management, fast software timers, picokernel design, event-chaining, and small size (minimal size on an ARM architecture processor is about 2 KB).

ThreadX supports multi-core processor environments via either asymmetric multiprocessing (AMP) or symmetric multiprocessing (SMP). Application thread isolation with memory management unit (MMU) or memory protection unit (MPU) memory protection is available with ThreadX Modules.

ThreadX has safety certifications from TÜV and UL and is Motor Industry Software Reliability Association and MISRA C compliant.

ThreadX is the foundation of Express Logic's X-Ware Internet of things (IoT) platform, which includes embedded file system support (FileX), embedded UI support (GUIX), embedded Internet protocol suite (TCP/IP), cloud connectivity (NetX/NetX Duo), and Universal Serial Bus (USB) support (USBX). ThreadX is liked by developers and is a popular RTOS.<ref name="Renesas-2018">{{cite web |title=High Performance RTOS ThreadX: Express Logic |url=https://www.renesas.com/us/en/about/edge-magazine/partner/18-express-logic.html |website=Renesas Electronics |archive-url=https://web.archive.org/web/20190302222455/https://www.renesas.com/us/en/about/edge-magazine/partner/18-express-logic.html |archive-date=March 2, 2019 |date=2018 |url-status=dead}}</ref>

{{As of|2017}}, ThreadX RTOS has become one of the most popular RTOSs in the world, deployed in over 6.2 billion devices, including consumer electronics, medical devices, data networking applications, and SoCs.<ref>{{cite web |title=IoT & Embedded Technology Report |url=https://www.vdcresearch.com/Coverage/IoT-Tech/reports/17-embedded-OS.html |website=VDC Research |archive-url=https://web.archive.org/web/20240515130848/https://www.vdcresearch.com/Coverage/IoT-Tech/reports/17-embedded-OS.html |archive-date=May 15, 2024 |date=December 2017 |url-status=live}}</ref>

===Technology=== ThreadX implements a priority-based, pre-emptive scheduling algorithm with a proprietary feature called preemption-threshold. The threshold provides greater granularity within critical sections, reduces context switching, and has been the subject of academic research on guaranteeing scheduling.<ref>{{cite web |title=Scheduling Fixed-Priority Tasks with Preemption Threshold |url=http://www.cs.utah.edu/~regehr/reading/open_papers/preempt_thresh.pdf |website=University of Utah - Department of Computer Science |archive-url=https://web.archive.org/web/20170330125248/http://www.cs.utah.edu/~regehr/reading/open_papers/preempt_thresh.pdf |archive-date=March 30, 2017 |date=December 1999 |url-status=dead}}</ref>

ThreadX provides a unique construct called event chaining,<ref>{{cite web |title=Event Chaining Enables Real-Time Systems to Respond to Multiple Real-Time Events More Efficiently |url=https://rtos.com/wp-content/uploads/2017/10/EL_Event_Chaining_Reduces_Overhead.pdf |website=Express Logic |archive-url=https://web.archive.org/web/20180614174211/https://rtos.com/wp-content/uploads/2017/10/EL_Event_Chaining_Reduces_Overhead.pdf |archive-date=June 14, 2018 |date=July 21, 2016 |url-status=dead}}</ref> where the application can register a callback function on all APIs that can signal an external event. This helps applications chain together various public objects in ThreadX allowing one thread to block on multiple objects.

ThreadX also provides counting semaphores, mutexes with optional priority inheritance, event flags, message queues, software timers, fixed-sized block memory, and variable-sized block memory. All APIs in ThreadX that block on resources also have an optional timeout.

ThreadX offers multi-core processor support via either AMP or SMP. Application code isolation is available through the ThreadX Modules component.

===Safety certification=== ThreadX (and FileX and NetX Duo) have been precertified by SGS-TÜV Saar to the following safety standards: IEC 61508 SIL 4, IEC 62304 Class C, ISO 26262 ASIL D, and EN 50128 SW-SIL 4.

ThreadX (and FileX and NetX Duo) have been precertified by UL to the following safety standards: UL/IEC 60730, UL/IEC 60335, UL 1998

ThreadX has also been certified to DO-178 standards by various military and aerospace companies. It is supported by popular Transport Layer Security (SSL/TLS) libraries such as wolfSSL.<ref>{{cite web |title=wolfSSL with Improved ThreadX/NetX Support |url=https://www.wolfssl.com/wolfssl-improved-threadx-netx-support/ |website=wolfSSL |archive-url=https://web.archive.org/web/20230330081408/https://www.wolfssl.com/wolfssl-improved-threadx-netx-support/ |archive-date=March 30, 2023 |date=January 16, 2018 |url-status=live}}</ref>

===Packaging=== As of 2017, ThreadX is packaged as part of X-Ware IoT Platform in full source code and with no runtime royalty payment.

==Major components== The major ThreadX components are:

===ThreadX=== ThreadX is the real-time operating system (RTOS).

===FileX and LevelX=== FileX is an optional file system for ThreadX. It supports FAT12, FAT16, FAT32, and exFAT file systems. The latter extends FAT file sizes beyond 4 GB, which is useful for large video files.

It also offers fault tolerance and supports direct NOR and NAND flash memory media through an optional flash wear leveling product called '''LevelX'''.

===GUIX=== GUIX is an optional graphical user interface (GUI) for ThreadX. It provides a 2D computer graphics system that supports multiple display devices with a variety of screen resolutions and color depths. Many predefined graphical widgets are available. A Windows WYSIWYG host tool called GUIX Studio automatically generates C code for GUIX to execute at runtime.

===NetX Duo=== NetX Duo is an optional TCP/IP network system for ThreadX. It supports both IPv4 and IPv6 networking with IPsec network security. TCP and UDP socket layers are provided by TLS / DTLS. Optional protocols include ARP, Auto IP, DHCP, DNS, DNS-SD, FTP, HTTP, ICMP, IGMP, mDNS, POP3, PPP, PPPoE, RARP, TFTP, SNTP, SMTP, SNMP, and Telnet. IoT Cloud protocol support includes CoAP, MQTT, and LWM2M. NetX Duo also supports Thread and 6LoWPAN. In 2017, ThreadX and NetX Duo became a Thread Certified Product.<ref>{{cite web |title=Thread Certified Products |url=https://www.threadgroup.org/technology/ourtechnology#certifiedproducts |website=Thread Group |archive-url=https://web.archive.org/web/20180614050125/https://www.threadgroup.org/technology/ourtechnology#certifiedproducts |archive-date=2018-06-14 |url-status=dead}}</ref>

===USBX=== USBX is an optional Universal Serial Bus (USB) system for ThreadX. It supports both host/device/on-the-go (OTG). Host controller support includes EHCI, OHCI, and proprietary USB host controllers.

It supports these USB Device Classes: Audio, Asix, CDC/ACM, CDC/ECM, DFU, GSER, HID, PIMA, Printer, Prolific, RNDIS, and Storage.

===TraceX=== TraceX is an optional host software that provides a graphical view of ThreadX RTOS events. It requires Windows XP or later.

==Supported ports==

{{Div col|colwidth=22em}}

* ARM classic cores (32bit)<ref name="GitHub-ThreadX-Overview">{{cite web |title=Eclipse - ThreadX - ThreadX Overview |url=https://github.com/eclipse-threadx/threadx |website=GitHub |archive-url=https://web.archive.org/web/20241203085006/https://github.com/eclipse-threadx/threadx |archive-date=December 3, 2024 |url-status=live}}</ref><ref name="GitHub-ThreadX-RTOS-Docs">{{cite web |title=Eclipse - ThreadX - RTOS Docs |url=https://github.com/eclipse-threadx/rtos-docs |website=GitHub |archive-url=https://web.archive.org/web/20241203104237/https://github.com/eclipse-threadx/rtos-docs |archive-date=December 3, 2024 |url-status=live}}</ref> ** ARM7 ** ARM9 ** ARM11 * ARM microcontroller cores (32bit)<ref name="GitHub-ThreadX-Overview"/> ** ARM Cortex-M0 ** ARM Cortex-M0+ ** ARM Cortex-M3 ** ARM Cortex-M4 ** ARM Cortex-M7 ** ARM Cortex-M23 ** ARM Cortex-M33 ** ARM Cortex-M55 ** ARM Cortex-M85 * ARM real time cores (32bit)<ref name="GitHub-ThreadX-Overview"/> ** ARM Cortex-R4 ** ARM Cortex-R5 ** ARM Cortex-R7 * ARM application cores (32bit)<ref name="GitHub-ThreadX-Overview"/> ** ARM Cortex-A5 ** ARM Cortex-A7 ** ARM Cortex-A8 ** ARM Cortex-A9 ** ARM Cortex-A12 ** ARM Cortex-A15 ** ARM Cortex-A17 ** ARM Cortex-A35 * ARM application cores (32bit)<ref name="GitHub-ThreadX-Overview"/> ** ARM Cortex-A53 ** ARM Cortex-A55 ** ARM Cortex-A57 ** ARM Cortex-A72 ** ARM Cortex-A73 ** ARM Cortex-A75 ** ARM Cortex-A76 ** ARM Cortex-A77 * ARM application cores (64bit)<ref name="GitHub-ThreadX-Overview"/> ** ARM Cortex-A34 ** ARM Cortex-A53 ** ARM Cortex-A55 ** ARM Cortex-A57 ** ARM Cortex-A65 ** ARM Cortex-A76 * Other cores<ref name="GitHub-ThreadX-Overview"/><ref name="GitHub-ThreadX-RTOS-Docs"/> ** ARC EM / HS ** Intel x86 (32bit) ** Renesas RXv1 / RXv2 / RXv3 ** RISC-V (32bit) ** Tensilica Xtensa ** TI TMS320C667x (DSP) * Operating systems<ref name="GitHub-ThreadX-Overview"/> ** Linux ** Windows (32bit)

{{Div col end}}

==Products using ThreadX== Some examples of products that use ThreadX: * Small wearable devices. * Hewlett-Packard inkjet printers and all-in-one devices.<ref>{{cite web |title=Hewlett Packard |url=https://www.ghs.com/customers/hp.html |website=Green Hills Software |archive-url=https://web.archive.org/web/20241208134709/https://www.ghs.com/customers/hp.html |archive-date=December 8, 2024 |url-status=live}}</ref> * Intel Management Engine (ME).<ref>{{cite web |title=The Intel Management Engine |url=https://bitkeks.eu/blog/2017/12/the-intel-management-engine.html |website=bitkeks.eu |archive-url=https://web.archive.org/web/20240423045055/https://bitkeks.eu/blog/2017/12/the-intel-management-engine.html |archive-date=April 23, 2024 |date=December 5, 2017 |url-status=live}}</ref> * NASA Deep Impact space probe.<ref>{{cite news |title=Case study: NASA's "Deep Impact" employs embedded systems to score bullseye 80 million miles away |publisher=Military Embedded Systems |date=January 13, 2006 |url=http://mil-embedded.com/article-id/?400= |access-date=March 30, 2015 |archive-url=https://web.archive.org/web/20150404014428/http://mil-embedded.com/article-id/?400= |archive-date=April 4, 2015 |url-status=dead}}</ref> * Raspberry Pi line of single-board computers runs ThreadX as a binary blob on the graphics processing unit (GPU). This controls initial booting, which in turn is used to boot secondary operating systems such as Linux, and continues to operate in a more privileged role even after the boot process.<ref>{{cite web|url=https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ |title=What's Wrong with the Raspberry Pi |website=Own Your Bits |date=February 2, 2019 |archive-url=https://web.archive.org/web/20220531105341/https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ |archive-date=2022-05-31 |url-status=dead |access-date=2024-03-09}}</ref> * AGM M11 mobile phone<ref>{{cite web|url=https://de.agmmobile.com/products/agm-m11-4000-mah-akku-kabelgebundene-ruckwartsaufladung-4g-wlan-hotspot-robuster-aufbau-cloud-telefonie-unterstutzung-ukw-radio-3-5-mm-klinkenanschluss-128-gb-erweiterbarer-speicher |title=AGM M11 |website=AGM |date=May 25, 2026}}</ref>

==See also== {{Portal|Free and open-source software}} * Comparison of real-time operating systems * Embedded operating system

==References== {{Reflist}}

==Further reading== ;ThreadX documentation * [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_ThreadX_User_Guide.pdf ThreadX User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_FileX_User_Guide.pdf FileX User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_GUIX_User_Guide.pdf GUIX User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_NetX_Duo_User_Guide.pdf NetX User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Device_Stack_User_Guide.pdf USBX Device User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Host_Stack_User_Guide.pdf USBX Host User Guide (2020)] - Microsoft * [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Host_Stack_User_Guide_Supplemental.pdf USBX Host Supplemental User Guide (2020)] - Microsoft

;RTOS comparison * [https://github.com/user-attachments/files/17348393/Beningo-RtosPerformance-2024-Report.pdf 2024 RTOS Performance Report] (FreeRTOS / ThreadX / PX5 / Zephyr) - Beningo Embedded Group * [https://web.archive.org/web/20170904172524/http://www.embedded.com/design/operating-systems/4425751/2/Comparing-microcontroller-real-time-operating-systems 2013 RTOS Comparison] (Nucleus / ThreadX / ucOS / Unison) - Embedded Magazine

==External links== ;STM32 * [https://wiki.st.com/stm32mcu/wiki/Introduction_to_Azure_RTOS_with_STM32 Introduction to ThreadX on STM32] - ST * [https://community.st.com/t5/stm32-mcus/how-to-create-a-thread-using-azurertos-and-stm32cubeide/ta-p/49418 Creating a Thread for STM32CubeIDE] - ST

{{Real-time operating systems}} {{Microkernel}}

{{DEFAULTSORT:Threadx}} Category:1997 software Category:Microkernel-based operating systems Category:Microkernels Category:Microsoft operating systems Category:Real-time operating systems Category:Software programmed in assembly language Category:ARM operating systems Category:X86 operating systems