{"id":13470495,"url":"https://github.com/eclipse-threadx/threadx","last_synced_at":"2025-05-13T22:02:55.393Z","repository":{"id":37407518,"uuid":"263076869","full_name":"eclipse-threadx/threadx","owner":"eclipse-threadx","description":"Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.","archived":false,"fork":false,"pushed_at":"2025-04-15T12:47:02.000Z","size":18622,"stargazers_count":3156,"open_issues_count":75,"forks_count":852,"subscribers_count":154,"default_branch":"master","last_synced_at":"2025-05-12T16:08:09.945Z","etag":null,"topics":["eclipse-threadx","embedded","iot","mcu","microcontroller","real-time","rtos"],"latest_commit_sha":null,"homepage":"https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-threadx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-11T15:07:59.000Z","updated_at":"2025-05-11T14:38:39.000Z","dependencies_parsed_at":"2024-08-07T02:28:55.636Z","dependency_job_id":"a50ea589-ff6d-412f-944d-5d3f25e2fcbe","html_url":"https://github.com/eclipse-threadx/threadx","commit_stats":{"total_commits":128,"total_committers":16,"mean_commits":8.0,"dds":0.7890625,"last_synced_commit":"13b700fd3ed763cedcba7dbd17b859077a01aa9c"},"previous_names":["eclipse-threadx/threadx","azure-rtos/threadx"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-threadx%2Fthreadx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-threadx%2Fthreadx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-threadx%2Fthreadx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-threadx%2Fthreadx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-threadx","download_url":"https://codeload.github.com/eclipse-threadx/threadx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036809,"owners_count":22003652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eclipse-threadx","embedded","iot","mcu","microcontroller","real-time","rtos"],"created_at":"2024-07-31T16:00:31.310Z","updated_at":"2025-05-13T22:02:50.385Z","avatar_url":"https://github.com/eclipse-threadx.png","language":"C","readme":"# Eclipse ThreadX RTOS\n\nThis advanced real-time operating system (RTOS) is designed specifically for deeply embedded applications. Among the multiple benefits it provides are advanced scheduling facilities, message passing, interrupt management, and messaging services. Eclipse ThreadX RTOS has many advanced features, including picokernel architecture, preemption threshold, event chaining, and a rich set of system services.\n\nHere are the key features and modules of ThreadX:\n\n![ThreadX Key Features](./docs/threadx-features.png)\n\n## Getting Started\n\nEclipse ThreadX has been integrated to the semiconductor's SDKs and development environment. You can develop using the tools of choice from [STMicroelectronics](https://www.st.com/content/st_com/en/campaigns/x-cube-azrtos-azure-rtos-stm32.html), [NXP](https://www.nxp.com/design/software/embedded-software/azure-rtos-for-nxp-microcontrollers:AZURE-RTOS), [Renesas](https://github.com/renesas/azure-rtos) and [Microchip](https://mu.microchip.com/get-started-simplifying-your-iot-design-with-azure-rtos).\n\nWe also provide [getting started guide](https://github.com/eclipse-threadx/getting-started) and [samples](https://github.com/eclipse-threadx/samples) using development boards from semiconductors you can build and test with.\n\nSee [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/overview-threadx.md) for the high-level overview. \n\n## Repository Structure and Usage\n### Directory layout\n\n    .\n    ├── cmake                        # CMakelist files for building the project\n    ├── common                       # Core ThreadX files\n    ├── common_modules               # Core ThreadX module files\n    ├── common_smp                   # Core ThreadX SMP files\n    ├── docs                         # Documentation supplements\n    ├── ports                        # Architecture and compiler specific files. See below for directory breakdown     \n    │   ├── cortex_m7     \n    │   │   ├── iar                  # Example IAR compiler sample project\n    │   │   │   ├── example build    # IAR workspace and sample project files\n    │   │   │   ├── inc              # tx_port.h for this architecture\n    │   │   │   └── src              # Source files for this architecture\n    │   │   ├── ac6                  # Example ac6/Keil sample project\n    │   │   ├── gnu                  # Example gnu sample project\n    │   │   └── ...\n    │   └── ...        \n    ├── ports_modules                # Architecture and compiler specific files for threadX modules\n    ├── ports_smp                    # Architecture and compiler specific files for threadX SMP\n    ├── samples                      # demo_threadx.c\n    └── utility                      # Test cases and utilities\n\n\n## Branches \u0026 Releases\n\nThe master branch has the most recent code with all new features and bug fixes. It does not represent the latest General Availability (GA) release of the library. Each official release (preview or GA) will be tagged to mark the commit and push it into the Github releases tab, e.g. `v6.2-rel`.\n\n\u003e When you see xx-xx-xxxx, 6.x or x.x in function header, this means the file is not officially released yet. They will be updated in the next release. See example below.\n```\n/**************************************************************************/\n/*                                                                        */\n/*  FUNCTION                                               RELEASE        */\n/*                                                                        */\n/*    _tx_initialize_low_level                          Cortex-M23/GNU    */\n/*                                                           6.x          */\n/*  AUTHOR                                                                */\n/*                                                                        */\n/*    Scott Larson, Microsoft Corporation                                 */\n/*                                                                        */\n/*  DESCRIPTION                                                           */\n/*                                                                        */\n/*    This function is responsible for any low-level processor            */\n/*    initialization, including setting up interrupt vectors, setting     */\n/*    up a periodic timer interrupt source, saving the system stack       */\n/*    pointer for use in ISR processing later, and finding the first      */\n/*    available RAM memory address for tx_application_define.             */\n/*                                                                        */\n/*  INPUT                                                                 */\n/*                                                                        */\n/*    None                                                                */\n/*                                                                        */\n/*  OUTPUT                                                                */\n/*                                                                        */\n/*    None                                                                */\n/*                                                                        */\n/*  CALLS                                                                 */\n/*                                                                        */\n/*    None                                                                */\n/*                                                                        */\n/*  CALLED BY                                                             */\n/*                                                                        */\n/*    _tx_initialize_kernel_enter           ThreadX entry function        */\n/*                                                                        */\n/*  RELEASE HISTORY                                                       */\n/*                                                                        */\n/*    DATE              NAME                      DESCRIPTION             */\n/*                                                                        */\n/*  09-30-2020      Scott Larson            Initial Version 6.1           */\n/*  xx-xx-xxxx      Scott Larson            Include tx_user.h,            */\n/*                                            resulting in version 6.x    */\n/*                                                                        */\n/**************************************************************************/ \n```\n\n## Supported Architecture Ports\n\n### ThreadX\n```\narc_em      cortex_a12        cortex_m0     cortex_r4\narc_hs      cortex_a15        cortex_m23    cortex_r5\narm11       cortex_a17        cortex_m3     cortex_r7\narm9        cortex_a34        cortex_m33    \nc667x       cortex_a35        cortex_m4    \nlinux       cortex_a5         cortex_m55\nrisc-v32    cortex_a53        cortex_m7\nrxv1        cortex_a55        cortex_m85\nrxv2        cortex_a57\nrxv3        cortex_a5x\nwin32       cortex_a65\nxtensa      cortex_a65ae\n            cortex_a7\n            cortex_a72\n            cortex_a73\n            cortex_a75\n            cortex_a76\n            cortex_a76ae\n            cortex_a77\n            cortex_a8\n            cortex_a9\n```\n\n### ThreadX Modules\n[Eclipse ThreadX Modules](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx-modules/chapter1.md) component provides an infrastructure for applications to dynamically load modules that are built separately from the resident portion of the application.\n```\ncortex_a35\ncortex_a35_smp\ncortex_a7\ncortex_m0+\ncortex_m23\ncortex_m3\ncortex_m33\ncortex_m4\ncortex_m7\ncortex_r4\nrxv2\n```\n\n### ThreadX SMP\n[Eclipse ThreadX SMP](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/threadx-smp/chapter1.md) is a high-performance real-time SMP kernel designed specifically for embedded applications.\n```\narc_hs_smp\ncortex_a34_smp\ncortex_a35_smp\ncortex_a53_smp\ncortex_a55_smp\ncortex_a57_smp\ncortex_a5x_smp\ncortex_a5_smp\ncortex_a65ae_smp\ncortex_a65_smp\ncortex_a72_smp\ncortex_a73_smp\ncortex_a75_smp\ncortex_a76ae_smp\ncortex_a76_smp\ncortex_a77_smp\ncortex_a78_smp\ncortex_a7_smp\ncortex_a9_smp\nlinux\n```\n\n## Adaptation layer for ThreadX\n\nThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications. To help ease application migration to ThreadX RTOS, Eclipse ThreadX provides [adaption layers](https://github.com/eclipse-threadx/threadx/tree/master/utility/rtos_compatibility_layers) for various legacy RTOS APIs (FreeRTOS, POSIX, OSEK, etc.).\n\n## Component dependencies\n\nThe main components of ThreadX RTOS are each provided in their own repository, but there are dependencies between them, as shown in the following graph. This is important to understand when setting up your builds.\n\n![dependency graph](docs/deps.png)\n\n\u003e You will have to take the dependency graph above into account when building anything other than ThreadX itself.\n\n### Building and using the library\n\nInstruction for building the ThreadX as static library using Arm GNU Toolchain and CMake. If you are using toolchain and IDE from semiconductor, you might follow its own instructions to use ThreadX RTOS components as explained in the [Getting Started](#getting-started) section.\n\n1. Install the following tools:\n\n    * [CMake](https://cmake.org/download/) version 3.0 or later\n    * [Arm GNU Toolchain for arm-none-eabi](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)\n    * [Ninja](https://ninja-build.org/)\n\n1. Cloning the repo\n\n    ```bash\n    $ git clone https://github.com/eclipse-threadx/threadx.git\n    ```\n\n1. Define the features and addons you need in `tx_user.h` and build together with the component source code. You can refer to [`tx_user_sample.h`](https://github.com/eclipse-threadx/threadx/blob/master/common/inc/tx_user_sample.h) as an example.\n\n1. Building as a static library\n\n    Each component of ThreadX RTOS comes with a composable CMake-based build system that supports many different MCUs and host systems. Integrating any of these components into your device app code is as simple as adding a git submodule and then including it in your build using the CMake `add_subdirectory()`.\n\n    While the typical usage pattern is to include ThreadX into your device code source tree to be built \u0026 linked with your code, you can compile this project as a standalone static library to confirm your build is set up correctly.\n\n    An example of building the library for Cortex-M4:\n\n    ```bash\n    $ cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_m4.cmake .\n\n    $ cmake --build ./build\n    ```\n\n## Licensing\n\nLicense terms for using Eclipse ThreadX are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information for all content, incl. the history of this repo.\n\n## Resources\n\nThe following are references to additional ThreadX RTOS resources:\n\n- **Product introduction**: https://github.com/eclipse-threadx/rtos-docs\n- **Product issues and bugs, or feature requests**: https://github.com/eclipse-threadx/threadx/issues\n- **TraceX Installer**: https://aka.ms/azrtos-tracex-installer\n\nYou can also check [previous questions](https://stackoverflow.com/questions/tagged/threadx-rtos+threadx) or ask new ones on StackOverflow using the `threadx-rtos` and `threadx` tags.\n\n## Security\n\nEclipse ThreadX provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device fully meets the evolving security requirements associated with its specific use case.\n\n## Contribution\n\nPlease follow the instructions provided in the [CONTRIBUTING.md](./CONTRIBUTING.md) for the corresponding repository.\n","funding_links":[],"categories":["C","C/C++程序设计"],"sub_categories":["资源传输下载"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-threadx%2Fthreadx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-threadx%2Fthreadx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-threadx%2Fthreadx/lists"}