{"id":17059184,"url":"https://github.com/flit/argon-rtos","last_synced_at":"2025-08-11T20:11:59.891Z","repository":{"id":12782965,"uuid":"15456572","full_name":"flit/argon-rtos","owner":"flit","description":"Argon RTOS: tiny embedded C/C++ RTOS for Cortex-M","archived":false,"fork":false,"pushed_at":"2021-12-18T20:14:25.000Z","size":18691,"stargazers_count":68,"open_issues_count":9,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T17:53:15.389Z","etag":null,"topics":["cortex-m","embedded","kernel","rtos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-26T16:56:18.000Z","updated_at":"2025-02-24T21:04:19.000Z","dependencies_parsed_at":"2022-09-01T10:10:25.156Z","dependency_job_id":null,"html_url":"https://github.com/flit/argon-rtos","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/flit/argon-rtos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fargon-rtos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fargon-rtos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fargon-rtos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fargon-rtos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flit","download_url":"https://codeload.github.com/flit/argon-rtos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flit%2Fargon-rtos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269948859,"owners_count":24501821,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cortex-m","embedded","kernel","rtos"],"created_at":"2024-10-14T10:33:03.042Z","updated_at":"2025-08-11T20:11:59.834Z","avatar_url":"https://github.com/flit.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Argon RTOS\n==========\n\nSmall embedded RTOS with clean C and C++ APIs for Arm Cortex-M-based microcontrollers.\n\n*Version*: 1.3.0\u003cbr/\u003e\n*Status*: Actively under development. Mostly stable API. Well tested in several real applications.\n\n### Overview\n\nArgon is designed to be a very clean preemptive RTOS kernel with a C++ API. A plain C API upon which the C++ API is built is also available. It is primarily targeted at microcontrollers with Arm Cortex-M processors. A primary goal is for the source code to be highly readable, maintainable, and well commented.\n\nThe kernel objects provided by Argon are:\n\n- Thread\n- Semaphore\n- Mutex\n- Queue\n- Channel\n- Timer\n- Run Loop\n\nArgon takes advantage of Cortex-M features to provide a kernel that never disables IRQs (except for CM0+\u003ca href=\"#fn1\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e).\n\nTimers run on runloops, which lets you control the thread and priority of timers. Runloops enable very efficient use of threads, including waiting on multiple queues.\n\nMutexes are recursive and have priority inheritance.\n\nA memory allocator is not provided, as every Standard C Library includes malloc.\u003ca href=\"#fn2\"\u003e\u003csup\u003e2\u003c/sup\u003e\u003c/a\u003e\n\nThere are no limits on the number of kernel objects. You may create as many objects as you need during runtime via dynamic allocation using `new` or `malloc()`. However, dynamic memory is not required under any circumstance. All kernel objects can be allocated statically, which is often important for determining application memory requirements at link time.\n\n### Documentation\n\nThe Argon documentation is [available online](https://flit.github.io/argon-rtos/doc/).\n\nYou can also generate it locally with Doxygen. The config file is doc/Doxyfile.\n\n### Example\n\nHere's a simple example of the C++ API.\n\n~~~cpp\nAr::ThreadWithStack\u003c2048\u003e myThread(\"my\", thread_fn, 0, 100, kArSuspendThread);\nAr::Semaphore theSem(\"s\");\n\nvoid thread_fn(void * param)\n{\n    while (theSem.get() == kArSuccess)\n    {\n        // do something\n    }\n}\n\nvoid main()\n{\n    myThread.resume();\n}\n~~~\n\nAnd the same example using the plain C API:\n\n~~~c\nuint8_t stack[2048];\nar_thread_t myThread;\nar_semaphore_t theSem;\n\nvoid thread_fn(void * param)\n{\n    while (ar_semaphore_get(theSem, kArInfiniteTimeout) == kArSuccess)\n    {\n        // do something\n    }\n}\n\nvoid main()\n{\n    ar_thread_create(\u0026myThread, \"my\", thread_fn, 0, stack, sizeof(stack), 100, kArSuspendThread);\n    ar_semaphore_create(\u0026theSem, \"s\", 1);\n    ar_thread_resume(\u0026myThread);\n}\n~~~\n\n### Requirements\n\nRequires a Cortex-M based microcontroller.\n\n- ARMv6-M\n- ARMv7-M\n\nTested cores:\n\n- Arm Cortex-M0+\n- Arm Cortex-M4\n- Arm Cortex-M4F\n\nSupported toolchains:\n\n- IAR EWARM\n- Keil MDK (armcc)\n- GNU Tools for Arm Embedded Processors (gcc)\n\nLanguage requirements:\n- C99\n- C++98\n\n### Portability\n\nThe Cortex-M porting layer only accesses standard Cortex-M resources (i.e., SysTick, NVIC, and SCB). It should work without modification on any Cortex-M-based MCU.\n\nThe kernel itself is fairly architecture-agnostic, and should be easily portable to other architectures. All architecture-specific code is isolated into a separate directory.\n\n### Source code\n\nThe code for the Argon kernel is in the `src/` directory in the repository. Public headers are in the `include/` directory.\n\nThe argon-rtos repository is intended to be usable as a submodule in other git repositories.\n\nThe kernel code is written in C++, but mostly uses a C-like style to implement the C API directly. The emphasis is on as little overhead as possible for both C and C++ APIs.\n\n### Contributions\n\nContributions are welcome! Please create a pull request in GitHub.\n\n### Licensing\n\nThe Argon RTOS is open source software released with a BSD three-clause license. See the included LICENSE.txt file for details.\n\nThe repository also includes code with other copyrights and licenses. See the source file headers for licensing information of this code.\n\nCopyright © 2007-2018 Immo Software.\u003cbr/\u003e\nPortions Copyright © 2014-2018 NXP\n\n\u003chr width=\"30%\" align=\"left\" size=\"1\"/\u003e\n\u003cdiv id=\"fn1\"\u003e\u003csup\u003e1\u003c/sup\u003e Cortex-M0+ cores are an exception since they don't have the required ldrex/strex instructions. Even so, IRQs are disabled for only a few cycles at a time.\u003c/div\u003e\n\u003cdiv id=\"fn2\"\u003e\u003csup\u003e2\u003c/sup\u003e Even though it may not be the smallest code, and doesn't support block allocation.\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflit%2Fargon-rtos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflit%2Fargon-rtos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflit%2Fargon-rtos/lists"}